Date: Tue, 14 Jun 2011 14:51:50 -0600 From: "Justin T. Gibbs" <gibbs@scsiguy.com> To: fs@FreeBSD.org Subject: [CFR][ZFS] Show "previous device location" for removed vdevs Message-ID: <4DF7C9E6.1030800@scsiguy.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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
[-- Attachment #2 --]
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DF7C9E6.1030800>
