[CFR][ZFS] Show "previous device location" for removed vdevs
Justin T. Gibbs
gibbs at scsiguy.com
Tue Jun 14 20:51:56 UTC 2011
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
-------------- next part --------------
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);
More information about the freebsd-fs
mailing list