The relevant init scripts were updated so as to automatically share
ZFS datasets using "zfs share -a" at boot time.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
action $"Mounting ZFS filesystems not yet mounted: " $ZFS mount -a || return 152
+ action $"Exporting ZFS filesystems: " $ZFS share -a || return 153
+
read_mtab "^/dev/zd"
read_fstab "^/dev/zd"
return $rv
fi
+ einfo "Exporting ZFS filesystems"
+ $ZFS share -a
+ rv=$?
+ if [ $rv -ne 0 ]; then
+ eerror "Failed to export ZFS filesystems."
+ eend $rv
+ return $rv
+ fi
+
eend 0
return 0
}
log_begin_msg "Mounting ZFS filesystems"
$ZFS mount -a
log_end_msg $?
+
+ log_begin_msg "Exporting ZFS filesystems"
+ $ZFS share -a
+ log_end_msg $?
fi
touch $LOCKFILE
fi
done < <(zfs list -H);
+ # export the filesystems
+ echo -n "exporting ZFS filesystems..."
+ if zfs share -a; then
+ echo -e "done";
+ else
+ echo -e "failed";
+ fi
+
;;
action $"Mounting automounted ZFS filesystems: " $ZFS mount -a || return 152
+ action $"Exporting ZFS filesystems: " $ZFS share -a || return 153
+
# Read fstab, try to mount zvols ignoring error
read_fstab "^/dev/(zd|zvol)"
template=$"Mounting volume %s registered in fstab: "