[SOLVED] Zpool Rename Fails - Proxmox 6.2.4

gb00s

Well-Known Member
Aug 4, 2017
34
2
48
44
I migrated my data from one pool named 'pool1' to another pool named 'pool2' via zfs send ... | zfs recv ... Worked all well. Data were transferred and I destroyed the 'pool1' afterwards and physically removed the disks from the system.

zpool status gives me a normal output:

root@pve1:~# zpool status
pool: pool2
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
pool2 ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
scsi-35000cca2556853fc ONLINE 0 0 0
scsi-35000cca255619e4c ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
scsi-35000cca2555ef1f4 ONLINE 0 0 0
scsi-35000cca2555c6948 ONLINE 0 0 0

errors: No known data errors

zpool list output:

root@pve1:~# zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
pool2 10.9T 823G 10.1T - - 0% 7% 1.00x ONLINE -

All good so far. Now, in order not to be forced to edit every single link in scripts etc from 'pool1' to 'pool2' I thought to just rename 'pool2' into 'pool1'. So I exported the 'pool2' via zpool export pool2 and tried to import the pool2 and rename it with zpool import pool2 pool1. It always gives me the output:

root@pve1:~# zpool import pool2 pool1
cannot import 'pool2': no such pool available
root@pve1:~#

What am I missing? It worked several times before now and I have no idea how to even force it with adding options to the import command.

Any help would be much appreciated. Thank you in advance.
 
Hi,
if you have the pool configured as a ZFS storage in PVE, you'll need to disable that storage before exporting. Otherwise PVE will periodically automatically re-import the pool.
 
Hi @Fabian_E ,

thank you for the reply. Ok, I followed your advice and the new zfs export pool2 and zpool import pool2 pool1 was successful. Zpool status shows ...

root@pve1:~# zpool status
pool: pool1
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
pool1 ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
scsi-35000cca2556853fc ONLINE 0 0 0
scsi-35000cca255619e4c ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
scsi-35000cca2555ef1f4 ONLINE 0 0 0
scsi-35000cca2555c6948 ONLINE 0 0 0

errors: No known data errors
root@pve1:~#

Unfortunately, the PVE didn't take it in real-time and did not update /etc/pve/storage.cfg and showed the 'pool2' as unavailable.

Screenshot_2020-11-04_23-09-44.png

After editing the /etc/pve/storage.cfg all was fine.

Thank you.
 
Unfortunately, the PVE didn't take it in real-time and did not update /etc/pve/storage.cfg and showed the 'pool2' as unavailable.

After editing the /etc/pve/storage.cfg all was fine.
Glad, you could solve it. Yes, updating the storage.cfg is up to the admin. zpool doesn't know about that file and PVE doesn't know that you ran the zpool commands.
 
  • Like
Reactions: gb00s

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!