From owner-freebsd-fs@FreeBSD.ORG Tue Jun 14 20:51:56 2011 Return-Path: Delivered-To: fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A057A106566C for ; Tue, 14 Jun 2011 20:51:56 +0000 (UTC) (envelope-from gibbs@scsiguy.com) Received: from aslan.scsiguy.com (www.scsiguy.com [70.89.174.89]) by mx1.freebsd.org (Postfix) with ESMTP id 724B88FC15 for ; Tue, 14 Jun 2011 20:51:56 +0000 (UTC) Received: from Justins-MacBook-Pro.local (207-225-98-3.dia.static.qwest.net [207.225.98.3]) (authenticated bits=0) by aslan.scsiguy.com (8.14.4/8.14.4) with ESMTP id p5EKrHk8015664 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Tue, 14 Jun 2011 14:53:17 -0600 (MDT) (envelope-from gibbs@scsiguy.com) Message-ID: <4DF7C9E6.1030800@scsiguy.com> Date: Tue, 14 Jun 2011 14:51:50 -0600 From: "Justin T. Gibbs" User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: fs@FreeBSD.org Content-Type: multipart/mixed; boundary="------------080601000502040509010506" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (aslan.scsiguy.com [70.89.174.89]); Tue, 14 Jun 2011 14:53:17 -0600 (MDT) Cc: Subject: [CFR][ZFS] Show "previous device location" for removed vdevs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2011 20:51:56 -0000 This is a multi-part message in MIME format. --------------080601000502040509010506 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit When a vdev cannot be found during ZFS pool import/mount time, "zpool status" reports the device GUID and a "device was at" message as a user aid. This patch provides the same behavior when a device is removed post zpool mount/import. -- Justin --------------080601000502040509010506 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="zpool.diffs" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="zpool.diffs" diff -u -r -x cscope.out -x out -x ctl -x compile vendor/FreeBSD/head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c SpectraBSD/head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c --- vendor/FreeBSD/head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c 2011-02-28 13:51:22.120585187 -0700 +++ SpectraBSD/head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c 2011-06-08 17:22:53.450540438 -0600 @@ -1084,7 +1209,8 @@ } if (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_NOT_PRESENT, - ¬present) == 0) { + ¬present) == 0 || + vs->vs_state <= VDEV_STATE_CANT_OPEN) { char *path; verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0); (void) printf(" was %s", path); --------------080601000502040509010506--