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
Top 4 Reasons for Node Reboot or Node Eviction in Real Application Cluster (RAC) Environment
Viewed 20014 times since Thu, Jun 21, 2018
Installing and Configuring an OCFS2 Clustered File System
Viewed 4903 times since Sat, Jun 2, 2018
SPRAWDZONA KONFIGURACJA RSYSLOG I LOGROTATE, JAKO ZEWNĘTRZNEGO SERWERA SYSLOG
Viewed 2709 times since Fri, Nov 30, 2018
OEL 7 – How to disable IPv6 on Oracle Linux 7 – Follow Up
Viewed 8421 times since Wed, Jul 25, 2018
tcpdump usage examples
Viewed 1569 times since Fri, Jul 27, 2018
Df command in Linux not updating actual diskspace, wrong data
Viewed 1982 times since Wed, May 30, 2018
how to list all hard disks in linux from command line
Viewed 1505 times since Mon, Jan 28, 2019
Modifying the inode count for an ext2/ext3/ext4 file system
Viewed 10688 times since Fri, Sep 18, 2020
How to Clear RAM Memory Cache, Buffer and Swap Space on Linux
Viewed 1392 times since Mon, Nov 23, 2020
RHEL: Displaying/setting kernel parameters - ’sysctl’
Viewed 1952 times since Sat, Jun 2, 2018