set_default_debug_nodes $node
}
+set_hostid () {
+ local hostid=${1:-$(hostid)}
+
+ if [ ! -s /etc/hostid ]; then
+ printf $(echo -n $hostid |
+ sed 's/\(..\)\(..\)\(..\)\(..\)/\\x\4\\x\3\\x\2\\x\1/') >/etc/hostid
+ fi
+}
+
# Facet functions
mount_facets () {
local facets=${1:-$(get_facets)}
formatall() {
stopall
+ # Set hostid for ZFS/SPL zpool import protection
+ do_rpc_nodes "$(comma_list $(remote_nodes_list))" set_hostid
+
# We need ldiskfs here, may as well load them all
load_modules
[ "$CLIENTONLY" ] && return