Correct procedure for zpool removal

frankz

Member
Nov 16, 2020
354
23
23
Hello everyone, I don't have a problem to ask but a simple confirmation on a disk removal procedure on clustered ZFS pools.

I have a pool called "ZSHARE" on 3 nodes and three disks. I wanted to remove the 3 discs so I thought I'd proceed like this:

Deactivation of the pool for the 3 nodes

Removal of the pool via GUI

Possible export if present from shell

Physical removal of disks.

Are the sequences and procedure correct?

Thank you
 
I'm not sure: do you want to import the pool on other machine or not ?
  1. One of these:
    1. Remove pool via gui. Correct me if im wrong: this just will remove entries from the file.
    2. Edit /etc/pve/storage.cfg, remove entries linked to your pool (consider that you may have subdirectories referenced here.)
  2. One of these:
    1. Case you do not care about information there: zpool destroy <POOLNAME>
    2. Case you want to import the pool on other machine: zpool export <POOLNAME>
  3. For each device in the pool:
    1. echo 1 > /sys/block/sdX/device/delete
    2. Remove disk
Greetings,
 
  • Like
Reactions: lkProx
I'm not sure: do you want to import the pool on other machine or not ?
  1. One of these:
    1. Remove pool via gui. Correct me if im wrong: this just will remove entries from the file.
    2. Edit /etc/pve/storage.cfg, remove entries linked to your pool (consider that you may have subdirectories referenced here.)
  2. One of these:
    1. Case you do not care about information there: zpool destroy <POOLNAME>
    2. Case you want to import the pool on other machine: zpool export <POOLNAME>
  3. For each device in the pool:
    1. echo 1 > /sys/block/sdX/device/delete
    2. Remove disk
Greetings,
Thanks for the information, no the pool should not be imported so just deactivate and remove, the last removal procedure should delete the pool from storage.cfg, at least I think.
 
I'm not sure: do you want to import the pool on other machine or not ?
  1. One of these:
    1. Remove pool via gui. Correct me if im wrong: this just will remove entries from the file.
    2. Edit /etc/pve/storage.cfg, remove entries linked to your pool (consider that you may have subdirectories referenced here.)
  2. One of these:
    1. Case you do not care about information there: zpool destroy <POOLNAME>
    2. Case you want to import the pool on other machine: zpool export <POOLNAME>
  3. For each device in the pool:
    1. echo 1 > /sys/block/sdX/device/delete
    2. Remove disk
Greetings,
Hi, I wanted to give you feedback. I did the procedure like this:

I removed the ZFS datastore from the storage menu after deactivating it.

I checked storage.cfg and the system had removed the mount point.

I ran the destroy from the GUI.

I checked for any pool from shell, making sure I have any ZFS Pool or disk from the ZFS list command.

Rebooted the cluster then node by node is removed the disk hardware. Everything went well. Thank you for your info.
 
Great,

You've done it through the gui. Perfect.

If you can reboot it's fine. I usually can't do it so I use to delete the disk interface via /sys.

You're welcome.

Greetings,
Chema.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!