Add UNSHARING of filesystems and EXPORTING pools
As a 'stop' action ensure the filesystem is unshared before it is unmounted, just in case. Additionally, export the pool so it may be cleanly imported by a different host. Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2003
This commit is contained in:
parent
fb8e608d9d
commit
8c091798f2
|
@ -106,10 +106,21 @@ stop()
|
||||||
{
|
{
|
||||||
[ ! -f "$LOCKFILE" ] && return 3
|
[ ! -f "$LOCKFILE" ] && return 3
|
||||||
|
|
||||||
|
log_begin_msg "Unsharing ZFS filesystems"
|
||||||
|
"$ZFS" unshare -a
|
||||||
|
log_end_msg $?
|
||||||
|
|
||||||
log_begin_msg "Unmounting ZFS filesystems"
|
log_begin_msg "Unmounting ZFS filesystems"
|
||||||
"$ZFS" umount -a
|
"$ZFS" umount -a
|
||||||
log_end_msg $?
|
log_end_msg $?
|
||||||
|
|
||||||
|
log_begin_msg "Exporting ZFS pools"
|
||||||
|
"$ZPOOL" list -H -o name | \
|
||||||
|
while read pool; do
|
||||||
|
"$ZPOOL" export $pool
|
||||||
|
done
|
||||||
|
log_end_msg $?
|
||||||
|
|
||||||
rm -f "$LOCKFILE"
|
rm -f "$LOCKFILE"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue