How to destroy a zfs filesystem in solaris?
-
# zfs destroy test_pool/fs1/admin
If you get an error message like below, you can use the -f option to force destroy the zfs filesystem:
# zfs destroy test_pool/fs1/admin cannot unmount ’test_pool/fs1/admin’: Device busy
# zfs destroy -f test_pool/fs1/admin
To destroy a zfs filesystem and all its dependent children:
# zfs destroy test_pool/fs1 cannot destroy ’test_pool/fs1’: filesystem has children use ’-r’ to destroy the following datasets: test_pool/fs1/admin
# zfs destroy -r test_pool/fs1
To destroy a zfs filesystem and all its dependents, including cloned file systems:
# zfs destroy -r test_pool/fs1/admin cannot destroy ’test_pool/fs1/admin’: filesystem has dependent clones use ’-R’ to destroy the following datasets: test_pool/clones/admin_clone
# zfs destroy -R test_pool/fs1/admin
WARNING: no confirmation prompt appears with any of the above commands so use with extreme caution.
© Lightnetics 2024