From owner-svn-src-stable@FreeBSD.ORG Mon Sep 9 21:05:02 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6F2FE562; Mon, 9 Sep 2013 21:05:02 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5BC41243F; Mon, 9 Sep 2013 21:05:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r89L520F019677; Mon, 9 Sep 2013 21:05:02 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r89L51uo019649; Mon, 9 Sep 2013 21:05:01 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201309092105.r89L51uo019649@svn.freebsd.org> From: Sean Bruno Date: Mon, 9 Sep 2013 21:05:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r255430 - stable/8/usr.sbin/mfiutil X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2013 21:05:02 -0000 Author: sbruno Date: Mon Sep 9 21:05:01 2013 New Revision: 255430 URL: http://svnweb.freebsd.org/changeset/base/255430 Log: MFC r254906 -- add SYSPD (real jbod) support to mfiutil Add support to reconfigure a drive as SYSPD (real JBOD in LSI terminology). Adds command "mfiutil syspd " to change a drive to SYSPD. Drive will then be scanned/reported immediately as /dev/mfisyspdX by the host. "mfiutil good " clears SYSPD mode, remove /dev/mfisyspdX and sets disk into UNCONFIGURED mode. Tested on Dell H310 SAS/SATA RAID controller. Modified: stable/8/usr.sbin/mfiutil/mfi_drive.c stable/8/usr.sbin/mfiutil/mfiutil.8 stable/8/usr.sbin/mfiutil/mfiutil.c Directory Properties: stable/8/usr.sbin/mfiutil/ (props changed) Modified: stable/8/usr.sbin/mfiutil/mfi_drive.c ============================================================================== --- stable/8/usr.sbin/mfiutil/mfi_drive.c Mon Sep 9 21:00:03 2013 (r255429) +++ stable/8/usr.sbin/mfiutil/mfi_drive.c Mon Sep 9 21:05:01 2013 (r255430) @@ -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; Modified: stable/8/usr.sbin/mfiutil/mfiutil.8 ============================================================================== --- stable/8/usr.sbin/mfiutil/mfiutil.8 Mon Sep 9 21:00:03 2013 (r255429) +++ stable/8/usr.sbin/mfiutil/mfiutil.8 Mon Sep 9 21:05:01 2013 (r255430) @@ -88,6 +88,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 @@ -352,6 +355,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. @@ -630,6 +638,10 @@ Add the drive in slot 2 in the main chas .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 Modified: stable/8/usr.sbin/mfiutil/mfiutil.c ============================================================================== --- stable/8/usr.sbin/mfiutil/mfiutil.c Mon Sep 9 21:00:03 2013 (r255429) +++ stable/8/usr.sbin/mfiutil/mfiutil.c Mon Sep 9 21:05:01 2013 (r255430) @@ -65,8 +65,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 - fail a physical drive\n"); - fprintf(stderr, " good - mark a bad physical drive as good\n"); + fprintf(stderr, " good - set a failed/SYSPD drive as UNCONFIGURED\n"); fprintf(stderr, " rebuild - mark failed drive ready for rebuild\n"); + fprintf(stderr, " syspd - set drive into use as SYSPD JBOD\n"); fprintf(stderr, " drive progress - display status of active operations\n"); fprintf(stderr, " drive clear - clear a drive with all 0x00\n"); fprintf(stderr, " start rebuild \n"); @@ -97,7 +98,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