Replace a failed boot device with a smaller one

Chaosmachine

Member
Aug 26, 2020
7
0
6
29
Hi everyone,

i stuck around with the problem, that 1 drive(900GB) of my ZFS(raid1) boot devices crashed, actually 1 is running, but nobody knows how long this will work.

I have another bunch of a few drives(600GB) here, but it´s smaller then the old boot drive, is there a chance to get it into the mirror?

I alrdy tried: sgdisk /dev/sda -R /dev/sdb, but getting the error/warining that the old partition is larger then the new drive capacity.

Anyone here who knows which comands to fill in to get the boot device cloned on the new smaller device?


Code:
root@pve-node-1:~# sgdisk /dev/sda -R /dev/sdb
Caution! Secondary header was placed beyond the disk's limits! Moving the
header, but other problems may occur!

Warning! Secondary partition table overlaps the last partition by
586051200 blocks!
You will need to delete this partition or resize it in another utility.

Problem: partition 3 is too big for the disk.
Aborting write operation!
Aborting write of new partition table.
 
Last edited:
I have another bunch of a few drives(600GB) here, but it´s smaller then the old boot drive, is there a chance to get it into the mirror?
Not really - ZFS will refuse to add a second device with less space as mirror to a vdev.

You could setup a new mirror with the 2 600G drives and then use zfs send+recv to get the data over - however this is a bit advanced and you should be comfortable working on the commandline - and know how to partition the drives and make them bootable.

If possible I think the easiest would be to backup all your VMs and config on the node - then setup a new PVE with the smaller drives and restore from backup

I hope this helps!
 
A great, y i´ll try send+reciv and repartitioning the drives, didn´t know that it could be so easy done in that way. Thanks.
 
Last edited:
A great, y i´ll try send+reciv and repartitioning the drives,
fine :) - make sure you have a backup of all data that is important to you - and if possible - let us know how it went :)
 

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!