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
RHEL: XFS basic operations
Viewed 1726 times since Sat, Jun 2, 2018
Tropienie pożeracza dysku
Viewed 1059 times since Thu, May 24, 2018
ZPOOL: Grow a zpool by adding new device(s)
Viewed 905 times since Sun, Jun 3, 2018
How To: Create Self-Signed Certificate – OpenSSL
Viewed 729 times since Mon, Feb 18, 2019
SYS: Configure a local repository. local repo
Viewed 875 times since Mon, Oct 29, 2018
Tcpdump Examples Linux
Viewed 3428 times since Fri, Nov 16, 2018
Create a Linux Swap File
Viewed 831 times since Fri, Jun 8, 2018
Using Kerberos security with Server for NFS
Viewed 1776 times since Wed, Jun 27, 2018
stunnel: Authentication
Viewed 816 times since Fri, Sep 28, 2018
OpenSSL: Find Out SSL Key Length – Linux Command Line
Viewed 751 times since Mon, Feb 18, 2019