ZPOOL: Remove an existing zpool

ZPOOL: Remove an existing zpool

# Tested on RHEL 6 & 7

# WARNING: Pay special attention to any existing F.S. on the pool.
# 'destroy' command will remove all pool's F.S. without asking for confirmation

POOLMNTP=`zfs list $POOLNAME | tail -1 | awk '{print$NF}'`; echo $POOLMNTP

# Check

zpool status $POOLNAME
     pool: my_pool
    state: ONLINE
    scan: none requested

           NAME        STATE     READ WRITE CKSUM
           my_pool     ONLINE       0     0     0
             sdb       ONLINE       0     0     0

   errors: No known data errors

zfs list | grep $POOLNAME
   my_pool         381K  9.78G    33K  /my_pool
   my_pool/zfs01    30K  9.78G    30K  /my_pool/zfs01
   my_pool/zfs02    30K  9.78G    30K  /my_pool/zfs02
   my_pool/zfs03    30K  9.78G    30K  /my_pool/zfs03

# (are you sure?!) Remove zpool

zpool destroy $POOLNAME

0 (0)
Article Rating (No Votes)
Rate this article
There are no attachments for this article.
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
15 Linux Yum Command Examples – Install, Uninstall, Update Packages
Viewed 1446 times since Thu, Oct 25, 2018
RHEL: Extending a vmdk (Virtual Machine disk)
Viewed 1615 times since Sun, May 27, 2018
RHEL: How to change a USER/GROUP UID/GID and all owned files
Viewed 6273 times since Sat, Jun 2, 2018
ZFS: Remove an existing zfs filesystem
Viewed 830 times since Sun, Jun 3, 2018
linux ssh How to Hide the OpenSSH Version Details when Telnet to Port 22
Viewed 916 times since Wed, Apr 22, 2020
Używanie rsync poprzez Secure Shell
Viewed 37515 times since Thu, May 24, 2018
debian How to Upgrade Debian 8 Jessie to Debian 9 Stretch
Viewed 1065 times since Sun, Sep 23, 2018
zabbix linux How to solve apache error No space left on device: Cannot create SSLMutex
Viewed 213 times since Wed, Nov 11, 2020
Linux Chage Command to Set Password Aging for User
Viewed 702 times since Tue, Sep 11, 2018
How to Install and use Lsyncd on CentOS 7 / RHEL 7 rsync
Viewed 1801 times since Wed, Oct 31, 2018