ZFS 0.7.0 come with new multi-modifier protection, this patch
enables it by default, on mkfs.
This also ensures canmount is off for pools that were not just
created.
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: If9b87e9786e0eaefe5ac9a536edcdca3d1012585
Reviewed-on: https://review.whamcloud.com/28051
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
+ * Set Options on ZPOOL
+ *
+ * ALL - canmount=off
+ * 0.7.0 - multihost=on
+ */
+ php = zpool_open(g_zfs, pool);
+ if (php) {
+ if (pool_exists)
+ zpool_set_prop(php, "canmount", "off");
+
+ zpool_set_prop(php, "multihost", "on");
+
+ zpool_close(php);
+ }
+
+ /*
* Create the ZFS filesystem with any required mkfs options:
* - canmount=off is set to prevent zfs automounting
* - xattr=sa is set to use system attribute based xattrs
* Create the ZFS filesystem with any required mkfs options:
* - canmount=off is set to prevent zfs automounting
* - xattr=sa is set to use system attribute based xattrs