Moving boot disk to new disks

Bubbagump210

Member
Oct 1, 2020
53
33
23
45
I installed PVE on a disk, its 120GB. I want to move the boot disk to (2) SSDs in a ZFS mirror that are 500GB. I'm wondering if this will work.

Boot to live CD
dd old boot disk to new boot disk
Boot on new boot disk
Add additional boot disk as mirror

Will this work? Then, will the rest of the unused 380GB be available to be added as a new pool?
 
I don’t know if it is worth the pain, thus the question. If it’s easy and works, then yes as it save me migrating a ton of VMs in this case.

I’m not sure I follow the LVM mention. The boot disk is ZFS. I don’t believe ZFS and LVM have anything to do with each other unless you’re saying there is some EUFI helper non-ZFS partition that would get nuked?
 
You've provided bare minimum information in your question. In my answer I assumed most common installation method.

If your current disk is ZFS, dd or otherwise copy it to larger disk. Make sure you can boot. Extend the underlying volume/filesystem to the remaining available space using ZFS tools. Add second disk as mirror.
I am sure there are multiple guides online for each of these operations. Don't discard or modify your original disk until you are sure you have stable environment.


Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Apologies, I see how my wording was not clear. Yes, the rpool is ZFS.

What I ended up doing that was much faster.

1. Put in new disk
2. sgdisk /dev/disk/by-id/existingdrive -R /dev/disk/by-id/newdrive
3. sgdisk -G /dev/disk/by-id/newdrive
4. zpool attach rpool /dev/disk/by-id/newdrive-part3 and wait for resilver to complete
5. pve-efiboot-tool format /dev/sdX2 (sdX being the new drive)
6. pve-efiboot-tool init /dev/sdX2 (sdX being the new drive)
7. pve-efiboot-tool refresh

To be super sure this worked, I pulled out the old drive and let the new drive boot. It worked perfectly. Then I "replaced" the drive I pulled out with itself.
 
Last edited:
I know it is an year old post but it helped me a lot (since one of the 2 drive I am using is failed)

4. zpool attach rpool /dev/disk/by-id/newdrive-part3 and wait for resilver to complete
Thank you!
then only thing to change is the point 4. It should be

4. zpool attach rpool /dev/disk/by-id/existingdrive /dev/disk/by-id/newdrive-part3 and wait for resilver to complete
 
  • Like
Reactions: divStar
I know it is an year old post but it helped me a lot (since one of the 2 drive I am using is failed)


Thank you!
then only thing to change is the point 4. It should be

4. zpool attach rpool /dev/disk/by-id/existingdrive /dev/disk/by-id/newdrive-part3 and wait for resilver to complete
I'm almost certain either syntax will work. Assuming the original disk is not already in a mirror, the command assumes you are adding the new disk to the data set as a mirror. Regardless, future Googlers, if my syntax doesn't work, try crc-error-79's.

 
  • Like
Reactions: crc-error-79
I'm almost certain either syntax will work. Assuming the original disk is not already in a mirror, the command assumes you are adding the new disk to the data set as a mirror. Regardless, future Googlers, if my syntax doesn't work, try crc-error-79's.

Hello! I just did exactly this and sadly only @crc-error-79 's way of executing zpool attach rpool worked for me. However: it all really worked and I tested this by removing a drive and rebooting. Might try this with another drive, too.

One more noteworthy thing though: sometimes the SATA drive might not appear (even though it's configured for hotplug). In this case you have to follow https://forum.proxmox.com/threads/please-help-me-with-enabling-hdd-hotplugging.136847/ to manually initiate a drive rescan. Once the drive re-appears under /dev/disk/, the ZFS pool automatically stops being degraded.

Thank you all so much for the information! It definitely helped me save some time!
 
  • Like
Reactions: Kingneutron

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!