mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
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
|
||||
|
||||
log_begin_msg "Unsharing ZFS filesystems"
|
||||
"$ZFS" unshare -a
|
||||
log_end_msg $?
|
||||
|
||||
log_begin_msg "Unmounting ZFS filesystems"
|
||||
"$ZFS" umount -a
|
||||
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"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user