summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-raid.h
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2002-03-03 15:36:21 +0000
committersos <sos@FreeBSD.org>2002-03-03 15:36:21 +0000
commit8703cd1dab6dbe7f403e5b11f0d2933202c39460 (patch)
treed5f8bfc50fb2ae83f2d3057e77f54c441c8bb65c /sys/dev/ata/ata-raid.h
parent8207872db749971894f9cbcb5baf92b0defdc929 (diff)
downloadFreeBSD-src-8703cd1dab6dbe7f403e5b11f0d2933202c39460.zip
FreeBSD-src-8703cd1dab6dbe7f403e5b11f0d2933202c39460.tar.gz
Major update of the ATA RAID code, part 3:
Add code to properly detach/attach disks that are part of a RAID. Mark a disk that is attached on an ATA channel belonging to a RAID as a spare disk that can be used for rebuilding failed RAID1's. Add support for rebuilding failed RAID1's. Several fixes to the detach/attach code. For replacing a disk in a failed RAID1 do the following: Find the controller channel# of the failed disk. Exec 'atacontrol detach <channel#>' to free the disk from the system. Replace the failed disk with a new one of at least the same size. If your have your disks in drawers/enclosures this can be done with the system still running. Exec 'atacontrol attach <channel#>' to add the disk to the system and mark it as a valid spare for rebuild. Exec 'atacontrol rebuild <array#>' The system will rebuild the array on the fly, the array can still be used during this, although with slower performance. Please let me know of any problems with this! Sponsored by: Advanis Inc. MFC after: 2 weeks
Diffstat (limited to 'sys/dev/ata/ata-raid.h')
-rw-r--r--sys/dev/ata/ata-raid.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-raid.h b/sys/dev/ata/ata-raid.h
index 4061701..fc48e22 100644
--- a/sys/dev/ata/ata-raid.h
+++ b/sys/dev/ata/ata-raid.h
@@ -30,6 +30,7 @@
struct ar_disk {
struct ata_device *device;
+ u_int64_t disk_sectors; /* sectors on this disk */
off_t last_lba; /* last lba used */
int flags;
#define AR_DF_PRESENT 0x00000001
@@ -208,6 +209,9 @@ struct promise_raid_conf {
u_int32_t checksum;
} __attribute__((packed));
-int ata_raid_probe(struct ad_softc *);
+int ata_raiddisk_probe(struct ad_softc *);
+int ata_raiddisk_attach(struct ad_softc *);
+int ata_raiddisk_detach(struct ad_softc *);
void ata_raid_attach(void);
+int ata_raid_rebuild(int);
OpenPOWER on IntegriCloud