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
RHEL: Extending a vmdk (Virtual Machine disk)
Viewed 3760 times since Sun, May 27, 2018
Szybkie sprawdzenie zewnętrznego adresu IP i hosta
Viewed 3086 times since Thu, May 24, 2018
RHEL: Route network packets to go out via the same interface they came in
Viewed 2647 times since Sat, Jun 2, 2018
RHCS6: Debug and test multicast traffic between two hosts
Viewed 6213 times since Sun, Jun 3, 2018
RHEL: Adding a boot entry to GRUB/GRUB2 configuration
Viewed 4058 times since Sun, May 27, 2018
LVM: Reduce root PV/VG
Viewed 4875 times since Sat, Jun 2, 2018
What Is /dev/shm And Its Practical Usage
Viewed 7441 times since Tue, Mar 12, 2019
ZFS: Verify/change properties of a zfs filesystem
Viewed 2267 times since Sun, Jun 3, 2018
Yum Update: DB_RUNRECOVERY Fatal error, run database recovery
Viewed 3584 times since Fri, Jan 17, 2020
How To Add Swap Space on Ubuntu 16.04
Viewed 2098 times since Fri, Jun 8, 2018