freebsd-nq/man/man8
Olaf Faaland b9373170e3 Add zgenhostid utility script
Turning the multihost property on requires that a hostid be set to allow
ZFS to determine when a foreign system is attemping to import a pool.
The error message instructing the user to set a hostid refers to
genhostid(1).

Genhostid(1) is not available on SUSE Linux.  This commit adds a script
modeled after genhostid(1) for those users.

Zgenhostid checks for an /etc/hostid file; if it does not exist, it
creates one and stores a value.  If the user has provided a hostid as an
argument, that value is used.  Otherwise, a random hostid is generated
and stored.

This differs from the CENTOS 6/7 versions of genhostid, which overwrite
the /etc/hostid file even though their manpages state otherwise.

A man page for zgenhostid is added. The one for genhostid is in (1), but
I put zgenhostid in (8) because I believe it's more appropriate.

The mmp tests are modified to use zgenhostid to set the hostid instead
of using the spl_hostid module parameter.  zgenhostid will not replace
an existing /etc/hostid file, so new mmp_clear_hostid calls are
required.

Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #6358
Closes #6379
2017-07-25 13:22:03 -04:00
..
.gitignore Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
fsck.zfs.8 Fix NAME section of manpages zhack and fsck.zfs. 2014-03-10 09:19:17 -07:00
Makefile.am Add zgenhostid utility script 2017-07-25 13:22:03 -04:00
mount.zfs.8 zfs.8 & mount.zfs.8: fix a few typos 2016-05-16 12:26:31 -07:00
vdev_id.8 vdev_id support for device link aliases 2012-12-03 14:04:47 -08:00
zdb.8 OpenZFS 8067 - zdb should be able to dump literal embedded block pointer 2017-07-07 11:28:01 -07:00
zed.8.in Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zfs.8 Add port of FreeBSD 'volmode' property 2017-07-12 13:05:37 -07:00
zgenhostid.8 Add zgenhostid utility script 2017-07-25 13:22:03 -04:00
zinject.8 Inject zinject(8) a percentage amount of dev errs 2017-06-16 17:21:11 -07:00
zpool.8 Add zgenhostid utility script 2017-07-25 13:22:03 -04:00
zstreamdump.8 Add zstreamdump(8) command to examine ZFS send streams. 2012-09-02 14:54:27 -07:00