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: Allowing users to ’su’ to "root" / Allowing ’root’ to login directly to the system using ’ssh’
Viewed 2697 times since Sat, Jun 2, 2018
HowTo: Create CSR using OpenSSL Without Prompt (Non-Interactive)
Viewed 13872 times since Mon, Feb 18, 2019
Linux - How to unlock and reset user’s account
Viewed 4189 times since Fri, Jun 8, 2018
LVM: Extend an existing Logical Volume / Filesystem
Viewed 2314 times since Sat, Jun 2, 2018
RHEL: Enabling standard ftp/telnet
Viewed 3281 times since Sun, May 27, 2018
Zabijanie wszystkich procesów użytkownika
Viewed 2537 times since Thu, May 24, 2018
Logowanie za pomocą kluczy Secure Shell
Viewed 2795 times since Thu, May 24, 2018
How To Find Largest Top 10 Files and Directories On Linux / UNIX / BSD find
Viewed 3694 times since Mon, Oct 29, 2018
YUM CRON Enabling automatic updates in Centos 7 and RHEL 7
Viewed 11795 times since Fri, Oct 26, 2018
Linux Cluster Tutorial
Viewed 1960 times since Sat, Sep 29, 2018