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
SSH Essentials: Working with SSH Servers, Clients, and Keys
Viewed 1141 times since Wed, Jun 27, 2018
“Too many authentication failures” with SSH
Viewed 1867 times since Mon, May 21, 2018
RHEL: Force system to prompt for password in Single User mode
Viewed 1356 times since Sat, Jun 2, 2018
Set Up SSH Tunneling on a Linux / Unix / BSD Server To Bypass NAT
Viewed 86 times since Fri, May 15, 2020
Linux Cluster Tutorial
Viewed 450 times since Sat, Sep 29, 2018
Linux - Cannot login from remote console but can access via ssh
Viewed 539 times since Fri, Jun 8, 2018
RHEL: Allowing users to ’su’ to "root" / Allowing ’root’ to login directly to the system using ’ssh’
Viewed 898 times since Sat, Jun 2, 2018
Monitoring bezpieczeństwa Linux: integracja auditd + OSSEC cz. I
Viewed 681 times since Fri, Apr 5, 2019
RHEL: Handling SCSI disks
Viewed 1010 times since Sun, May 27, 2018
15 Linux Yum Command Examples – Install, Uninstall, Update Packages
Viewed 858 times since Thu, Oct 25, 2018