[SOLVED] Convert zpool from dev letter to UUID

Pedulla

Well-Known Member
Aug 1, 2017
58
8
48
Oregon, USA
I have a zpool created using dev letters (sdX) and need to convert it to UUID.

Is a conversion possible w/o destroying the contents of the zpool?

- or -

Is it a matter of blowing it up and doing it over?

Thanks in advance.

PS. I initially created it this way because there was no way in the GUI to include a log device and didn't understand the volatility of sdX.
PVE 7.1-8
 
Last edited:
That seems too easy.
I'll backup and give it a shot and report back to close this one out.

I assume you identify the name of the pool in the first command? (I have multiple pools)
 
It is that easy. Try it in a VM if you need to be sure

Yes, if you have multiple pools you would need to specify the pool name to export
 
Well I'll be dipped, it was that easy. I didn't even have to know the ID's of the drive, it just found them by the pool name that the drives were already associated to. Pretty cool.
Once I shut down all the VM's that were using the pool and disabled the pool in the proxmox web ui under datacenter.storage (not sure if that was necessary) I ran:
# zpool export -f poolname ... wait... # zpool import -d /dev/disk/by-id poolname

Reenabled the pool from the UI and fired the VM's back up... Joy!

The -f in the export may or may not have been necessary but as I was figuring out what VM's were still connected to the pool, it found its way into the command.

@bobmc Thank you so much.

That pool ran for about a week in the degraded state, so I suspect re-silvering will take a bit.
Proxmox is cool
ZFS is cool
@bobmc is cool
 
  • Like
Reactions: bobmc
zpool export

zpool import -d /dev/disk/by-id <name of pool>
The guide i followed, showed this, i did this on a new zpool tho, but it worked wounderfull and no problems, and now my disks are mounted by uuid.
It is really this easy.
 
I did this and the import triggered the destruction of my zpool. 10TB of data deleted, about 1TB of hadn't yet been backed up. Losing my mind.
I tried:
zpool import -D
to see if I could recover that lost pool, but it wasn't found.
 
Last edited:
I did this and the import triggered the destruction of my zpool.
Really? As long as yo do not actually write data to the disks with the exported pool... everything might still be there!

What is the full output (in [CODE]...[/CODE]-tags please) of:
  • zpool import
  • zpool import -n -F
  • zpool import -d /dev/disk/by-id/
  • zpool import -n -F -d /dev/disk/by-id

"man zpool-import" shows more options...
 
Really? As long as yo do not actually write data to the disks with the exported pool... everything might still be there!

What is the full output (in [CODE]...[/CODE]-tags please) of:
  • zpool import
  • zpool import -n -F
  • zpool import -d /dev/disk/by-id/
  • zpool import -n -F -d /dev/disk/by-id

"man zpool-import" shows more options...
All cmds return message "no pools available to import".
 

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!