mirror_zfs/cmd
Richard Yao 1cbae971c5 Handle ZPOOL_STATUS_HOSTID_MISMATCH in zpool status
Verbatim imports can cause hostid mismatches, but things otherwise work. `zpool
status` does not handle this and will fail when assertions are enabled:

```
zpool: ../../cmd/zpool/zpool_main.c:4418: status_callback: Assertion `reason == ZPOOL_STATUS_OK' failed.

Program received signal SIGABRT, Aborted.
```

Lets instead add a case to display an informative message such as this:

```
  pool: rpool
 state: ONLINE
status: Mismatch between pool hostid and system hostid on imported pool.
        This pool was previously imported into a system with a different hostid,
        and then was verbatim imported into this system.
action: Export this pool on all systems on which it is imported.
        Then import it to correct the mismatch.
   see: http://zfsonlinux.org/msg/ZFS-8000-EY
  scan: scrub repaired 0 in 0h8m with 0 errors on Thu Apr 17 19:43:57 2014
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          sda       ONLINE       0     0     0

errors: No known data errors
```

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2342
2014-05-19 10:16:29 -07:00
..
arcstat sighandler() should take 2 arguments 2014-03-20 11:03:46 -07:00
dbufstat Python 3 fixes 2013-11-08 14:30:29 -08:00
fsck_zfs Add /sbin/fsck.zfs helper 2013-01-09 16:54:58 -08:00
mount_zfs Add full SELinux support 2013-12-19 10:37:31 -08:00
vdev_id vdev_id: support per-channel slot mappings 2014-01-17 11:17:54 -08:00
zdb cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
zed Replace zed_file_create_dirs() with mkdirp() 2014-04-09 13:32:54 -07:00
zfs Check the dataset type more rigorously when fetching properties. 2014-05-06 10:41:46 -07:00
zhack Add missing libzfs_core to Makefiles 2013-11-20 15:44:15 -08:00
zinject Make command line guid parsing more tolerant 2014-04-02 13:10:08 -07:00
zpios Fix error message in zpios 2014-01-29 15:11:56 -08:00
zpool Handle ZPOOL_STATUS_HOSTID_MISMATCH in zpool status 2014-05-19 10:16:29 -07:00
zstreamdump Add missing libzfs_core to Makefiles 2013-11-20 15:44:15 -08:00
ztest ztest: Switch to LWP rwlock interface 2014-05-01 15:53:58 -07:00
zvol_id cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
Makefile.am Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00