Replacing a Soon-to-fail Hard Drive

salt

New Member
May 20, 2024
1
0
1
S.M.A.R.T on my main HDD failed today and I bought a new SSD as a replacement. However, I made a mistake that the HDD is 1500GB and the SSD is only 1000GB. The new SSD can hold all my data because my vm disks on the server are only around 150GB + 90GB from root patition = 240GB. However, the lvm group for the vm disk are too large for the SSD so I can't just copy the data from sector to sector, and from what I read the lvm group can't be shrinked. What is my best choice to replace the drive right now?

I can't seem to find a direct method to migrate proxmox to a new drive on the internet. Is my only option to do a fresh install on the SSD and manually move all my vm over?
 
https://www.youtube.com/watch?v=E60_FC967YE

https://github.com/kneutron/ansitest/tree/master/proxmox

Do a fresh install on the new disk, as the Proxmox installer will wipe it. However, in the Advanced options you can limit the size of the disk and LVM. Leave about 700GB free space after pve LVM+ext4 and you can create a single-disk zfs pool in a new partition there.

There's no real easy way of getting your VMs into the new install without backing up and restoring them. However, having zfs should make it easier to expand if you get a larger disk in the future.
 
and from what I read the lvm group can't be shrinked. What is my best choice to replace the drive right now?
Even if it were possible to shrink (which it maybe) - you wouldn't want to do anything like that on a failing drive.

First thing is to make sure you have (external) backups of all VMs & LXCs. These are ALWAYS necessary & a must have on any system.

Take note/backup of any personal changes you may have made in PVE host itself.

Remove old drive from node - install fresh clean new one.

Install PVE fresh.

Restore VMs & LXCs.

& finally Good luck.
 
  • 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!