ZFS: Remove an existing zfs filesystem

ZFS: Remove an existing zfs filesystem

# Tested on RHEL 6 & 7

# Choose the F.S. to remove

zfs list
   NAME           USED  AVAIL  REFER  MOUNTPOINT
   c_pool         349M  19.2G    30K  /c_pool
   c_pool/zfs01   349M   675M   349M  /zfs01
   c_pool/zfs02    30K  19.2G    30K  /filesystem02    <----
   m_pool         100K  9.78G    30K  /m_pool


ZPOOL=c_pool
ZFSFS=zfs02
MNTPT=`zfs list | grep $ZPOOL/$ZFSFS | awk '{print$NF}'`; echo $MNTPT
   /filesystem02


# Remove F.S.

zfs destroy $ZPOOL/$ZFSFS

rmdir $MNTPT


# Check

zfs list
   NAME           USED  AVAIL  REFER  MOUNTPOINT
   c_pool         349M  19.2G    30K  /c_pool
   c_pool/zfs01   349M   675M   349M  /zfs01
   m_pool         100K  9.78G    30K  /m_pool
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
What is OS Watcher Utility and How to use it for Database Troubleshooting ?
Viewed 24398 times since Thu, Jun 21, 2018
Linux Audit The Linux security blog about Auditing, Hardening, and Compliance lynis
Viewed 1023 times since Thu, Jan 16, 2020
How To Find Largest Top 10 Files and Directories On Linux / UNIX / BSD find
Viewed 1313 times since Mon, Oct 29, 2018
Expand or grow a file system on a Linux VMWare VM without downtime
Viewed 10444 times since Fri, Jul 27, 2018
RHEL: How to rebuild and/or patch a RPM package
Viewed 6009 times since Sat, Jun 2, 2018
RHEL : How to deal with “CLOSE_WAIT” and “TIME_WAIT” connection
Viewed 15997 times since Thu, Feb 14, 2019
RHEL: Extending a multipath LUN
Viewed 2547 times since Sun, May 27, 2018
tcpdump
Viewed 7346 times since Fri, Jul 27, 2018
Linux Find Large Files
Viewed 1616 times since Mon, Oct 29, 2018
RHEL: iSCSI target/initiator configuration on RHEL6
Viewed 6880 times since Sat, Jun 2, 2018