Can I move a zpool from Ubuntu 22.04.3 LTS to PROXMOX 7.3.3 without loosing data?

Hello all, I just configured a pool with two 4TB SSD drives, the pool seems healthy, and I have no data in it yet.

pool: ssdpool
 state: ONLINE
  scan: scrub repaired 0B in 00:00:00 with 0 errors on Fri Jan  5 13:02:43 2024
config:

	NAME                                                 STATE     READ WRITE CKSUM
	ssdpool                                              ONLINE       0     0     0
	  mirror-0                                           ONLINE       0     0     0
	    usb-Samsung_SSD_870_EVO_4TB_XXX-0:0              ONLINE       0     0     0
	    usb-CT4000MX_500SSD1_XXX-0:0                     ONLINE       0     0     0

errors: No known data errors

The pool is currently connected via USB, two SSD enclosures, and the version of ZFS running on the Ubuntu system is:

$ zfs --version
zfs-2.1.5-1ubuntu6~22.04.2
zfs-kmod-2.1.9-2ubuntu1.1

My question is, can I disconnect the two SSD drives, move them to the PROXMOX server, physically connect them, and import the pool on the existing zpool zfspool on that system without losing the data? I wonder if will be possible. Adding an existing mirror into another existing zpool zfspool for a total of two mirrors mirror-0 and mirror-1 both with two 4TB SSD drives each.

The ZFS version running on the PROXMOX 7.3.3 is:

# zfs --version
zfs-2.1.6-pve1
zfs-kmod-2.1.6-pve1

And if this is possible I plan to add the mirror to the current pool in PROXMOX with zpool add zfspool mirror disk/by-id disk/by-id

Thank you in advance for any suggestions.

Sincerely,

It depends on the versions of ZFS in use on the platforms and I see you have included that information. One wrinkle is that the module and utility versions on Ubuntu do not match and that makes the hair on my neck crawl, but it may be normal for Ubuntu.

If the pool was created with a lower version than what is on Proxmox and never upgraded (*) it should import w/out difficulty. If the pool has features not supported by the Proxmox version, it may import readonly. In that case you need to create a pool on another device, copy your pool to that and then recreate the pool on the desired devices.

(*) I almost never upgrade a pool unless there is a new feature I really want/need. My servers are often running older versions (of Debian) than my desktop/laptop and by not upgrading, the pools are usually compatible.

HTH

2 Likes

Thank you for the input @HankB would you mind pointing me to a reliable tutorial or if you can provide the commands for how would you proceed would be appreciated, if you cannot, no big deal. I think I will give it a try testing with some dummy data in the pool, move the drives physically to my PROXMOX mirror and see if I can add it to it as a second mirror to the primary zpool. Thanks again!

Sincerely,

I’m happy to help. Lacking familiarity with Proxmox I’m reluctant to suggest commands, but at the end of your first post you have

zpool add zfspool mirror disk/by-id disk/by-id

I’m pretty sure if you want to import the pool you want

zpool import -d /dev/disk/by-id 

zpool add will add disks (vdevs) to an existing pool in a way that cannot always be undone.

It is often very wise to try things out on test pools (created from files) before you actually perform the operation. You can find some of my explorations scripted at https://github.com/HankB/Fun-with-ZFS

1 Like

Assuming this won’t be the pool used for booting the machine, I can confirm that his should pretty much be all that’s necessary in PVE.

To use the storage in the PVE interface, you could then add it as a data store.

Thank you again @HankB I will give it a try then and report back.

I will also take a look at your github space.

Sincerely,

Hello, @tvcvt correct, as I mentioned in the original post, my goal is to add the existing mirror to an existing zpool in PROXMOX that is used currently as a data store for Disk image and Container

Appreciate your input.

Sincerely,