Add the RAID rebuild command.
This commit is contained in:
parent
6f87be981b
commit
0df4b5542c
@ -46,6 +46,9 @@
|
||||
.Ic reinit
|
||||
.Ar channel
|
||||
.Nm
|
||||
.Ic rebuild
|
||||
.Ar raid
|
||||
.Nm
|
||||
.Ic mode
|
||||
.Ar channel
|
||||
.Op Ar mastermode slavemode
|
||||
@ -86,8 +89,9 @@ Both devices on the channel are reset and
|
||||
initialized to the parameters the ATA driver has stored internally.
|
||||
Devices that has gone bad and no longer responds to the probe, or devices
|
||||
that has physically been removed are removed from the kernel.
|
||||
Likewise
|
||||
are devices that show up during a reset, probed and attached.
|
||||
Likewise are devices that show up during a reset, probed and attached.
|
||||
.It Ic rebuild
|
||||
Rebuild a RAID1 array on a RAID capable ATA controller.
|
||||
.It Ic mode
|
||||
Without the two mode arguments the current transfer modes of both
|
||||
devices are printed.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2000,2001 Søren Schmidt
|
||||
* Copyright (c) 2000,2001,2002 Søren Schmidt
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -71,6 +71,8 @@ str2mode(char *str)
|
||||
if (!strcasecmp(str, "UDMA66")) return ATA_UDMA4;
|
||||
if (!strcasecmp(str, "UDMA5")) return ATA_UDMA5;
|
||||
if (!strcasecmp(str, "UDMA100")) return ATA_UDMA5;
|
||||
if (!strcasecmp(str, "UDMA6")) return ATA_UDMA6;
|
||||
if (!strcasecmp(str, "UDMA133")) return ATA_UDMA6;
|
||||
if (!strcasecmp(str, "BIOSDMA")) return ATA_DMA;
|
||||
return -1;
|
||||
}
|
||||
@ -274,6 +276,11 @@ main(int argc, char **argv)
|
||||
warn("ioctl(ATAREINIT)");
|
||||
info_print(fd, iocmd.channel, 0);
|
||||
}
|
||||
else if (!strcmp(argv[1], "rebuild") && argc == 3) {
|
||||
iocmd.cmd = ATAREBUILD;
|
||||
if (ioctl(fd, IOCATA, &iocmd) < 0)
|
||||
warn("ioctl(ATAREBUILD)");
|
||||
}
|
||||
else if (!strcmp(argv[1], "mode") && (argc == 3 || argc == 5)) {
|
||||
if (argc == 5) {
|
||||
iocmd.cmd = ATASMODE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user