diff options
author | sbruno <sbruno@FreeBSD.org> | 2013-08-26 12:05:38 +0000 |
---|---|---|
committer | sbruno <sbruno@FreeBSD.org> | 2013-08-26 12:05:38 +0000 |
commit | e4264da0148d9f7d7d4e66dad41550def2e64dbe (patch) | |
tree | e0f0cc34245ac38b5dc002e539dad0e53acdfad7 /usr.sbin | |
parent | 8e4fda6171062a2b63109d623bfc1741c66cc671 (diff) | |
download | FreeBSD-src-e4264da0148d9f7d7d4e66dad41550def2e64dbe.zip FreeBSD-src-e4264da0148d9f7d7d4e66dad41550def2e64dbe.tar.gz |
Add support to reconfigure a drive as SYSPD (real JBOD in LSI
terminology).
Adds command "mfiutil syspd <drive#>" to change a drive to SYSPD. Drive
will then be scanned/reported immediately as /dev/mfisyspdX by the host.
"mfiutil good <drive#>" clears SYSPD mode, remove /dev/mfisyspdX and
sets disk into UNCONFIGURED mode.
Tested on Dell H310 SAS/SATA RAID controller.
MFC after: 2 weeks
Sponsored by: Yahoo! Inc.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/mfiutil/mfi_drive.c | 14 | ||||
-rw-r--r-- | usr.sbin/mfiutil/mfiutil.8 | 12 | ||||
-rw-r--r-- | usr.sbin/mfiutil/mfiutil.c | 5 |
3 files changed, 29 insertions, 2 deletions
diff --git a/usr.sbin/mfiutil/mfi_drive.c b/usr.sbin/mfiutil/mfi_drive.c index 1927fac..2bc902e 100644 --- a/usr.sbin/mfiutil/mfi_drive.c +++ b/usr.sbin/mfiutil/mfi_drive.c @@ -474,6 +474,20 @@ rebuild_drive(int ac, char **av) MFI_COMMAND(top, rebuild, rebuild_drive); static int +syspd_drive(int ac, char **av) +{ + + if (ac != 2) { + warnx("syspd: %s", ac > 2 ? "extra arguments" : + "drive required"); + return (EINVAL); + } + + return (drive_set_state(av[1], MFI_PD_STATE_SYSTEM)); +} +MFI_COMMAND(top, syspd, syspd_drive); + +static int start_rebuild(int ac, char **av) { struct mfi_pd_info info; diff --git a/usr.sbin/mfiutil/mfiutil.8 b/usr.sbin/mfiutil/mfiutil.8 index 6dcc927..8346922 100644 --- a/usr.sbin/mfiutil/mfiutil.8 +++ b/usr.sbin/mfiutil/mfiutil.8 @@ -91,6 +91,9 @@ .Cm rebuild Ar drive .Nm .Op Fl u Ar unit +.Cm syspd Ar drive +.Nm +.Op Fl u Ar unit .Cm drive progress Ar drive .Nm .Op Fl u Ar unit @@ -372,6 +375,11 @@ Mark a failed that is still part of an array as a good drive suitable for a rebuild. The firmware should kick off an array rebuild on its own if a failed drive is marked as a rebuild drive. +.It Cm syspd Ar drive +Present the drive to the host operating system as a disk SYSPD block device in +the format /dev/mfisyspdX. Clear this flag with +.Cm good +.Ar drive .It Cm drive progress Ar drive Report the current progress and estimated completion time of drive operations such as rebuilds or patrol reads. @@ -679,6 +687,10 @@ Add the drive in slot 2 in the main chassis as a hot spare for volume mfid0: .Pp .Dl Nm Cm add s2 mfid0 .Pp +Reconfigure a disk as a SYSPD block device with no RAID +.Pp +.Dl Nm Cm syspd 0 +.Pp Configure the adapter to run periodic patrol reads once a week with the first patrol read starting in 5 minutes: .Pp diff --git a/usr.sbin/mfiutil/mfiutil.c b/usr.sbin/mfiutil/mfiutil.c index 2fb5adf..a8d9ef8 100644 --- a/usr.sbin/mfiutil/mfiutil.c +++ b/usr.sbin/mfiutil/mfiutil.c @@ -66,8 +66,9 @@ usage(void) fprintf(stderr, " show patrol - display patrol read status\n"); fprintf(stderr, " show progress - display status of active operations\n"); fprintf(stderr, " fail <drive> - fail a physical drive\n"); - fprintf(stderr, " good <drive> - mark a bad physical drive as good\n"); + fprintf(stderr, " good <drive> - set a failed/SYSPD drive as UNCONFIGURED\n"); fprintf(stderr, " rebuild <drive> - mark failed drive ready for rebuild\n"); + fprintf(stderr, " syspd <drive> - set drive into use as SYSPD JBOD\n"); fprintf(stderr, " drive progress <drive> - display status of active operations\n"); fprintf(stderr, " drive clear <drive> <start|stop> - clear a drive with all 0x00\n"); fprintf(stderr, " start rebuild <drive>\n"); @@ -103,7 +104,7 @@ static int version(int ac __unused, char **av __unused) { - printf("mfiutil version 1.0.14"); + printf("mfiutil version 1.0.15"); #ifdef DEBUG printf(" (DEBUG)"); #endif |