How to move Proxmox and all containers VM to a new hard drive?

micah

New Member
Jul 29, 2016
10
1
1
34
I am switching around my setup so I need to move my current install with all my VMs/containers/storage to a new hard drive.

What's the best way to do this? DD the entire old hard drive to the new then remove the old? Or install a new Proxmox to the new drive and copy over everything needed? And if copying, what is all needed? Just my config and lvm storage, or is there more?

Old and new drives are the same size and I can do the copying from a live USB with Proxmox offline if that's easiest.
 
Everything you wrote works. If the drive is exactly the same size (please check via fdisk -l), then copying via dd is the simplest way.

One question though: Why to move to a new harddisk if the destination has the same size? Moving one to a mirrored setup with two disks is one thing, but moving the data to another disk of the exact same size makes no sense to me (you wrote hard disk, so no migration from hd->ssd, right?)
 
Great. Yeah, same size, exact same model of drive. When I pop in the new drive it would become /dev/sdd. When I dd then remove the old drives will the new drive still be /dev/sdd and I'll need to edit fstab, or will it become sda? Having multiple drives and my OS being at the end is just begging for a headache or an accidental format down the line so if thats the case I'd just as soon set up new and copy over. I could just try it but I'm expecting DD to take hours so if you knew and could save me the time that would be great.

I'm actually doing the exact opposite of your question. When I setup I went RAID1 for my OS but I'm just about out of hard drive space for storage (not OS, I mean my other storage drives) and have no HD budget right now so I want to move from the two disk RAID1 to a single drive and use the other for storage.

I had one other drive that's the same size that I just got a caddy for so I can use that to migrate.

Old setup:

2 x 146 GB RAID1 - OS
1 x 500 GB RAID0 - storage
1 x 146 GB RAID0 - storage
1 free drive in a bag waiting to be used

New setup:

1 x 146 GB RAID0 - OS
1 x 500 GB RAID0 - storage
3 x 146 GB RAID5 - storage

Nothing on my OS is all that important, if I lost the drive it would be more of a hassle then anything to reset up but would be fine. Just a homelab. So this way I can add 146 GB to my storage and have some raid safety.

It will stay this way until i get some free money at which point I'll want to migrate back to two 146 drives in RAID1 for the OS and 4 1TB in RAID5 for storage, or something similar.
 
Okay, I assume you have your 500 GB storage with your VMs. Create a (offline) backup of all VMs to that 500 GB storage and pull the drive out. Reinstall and use RAID5 over 4 disks (or ZFS instead of hardware raid) and restore the VMs to the newly installed raid. I hate raid0, it's the stupidest thing one can do, so you will want at least raid1. Your have more power with 4 drives than with 3 and have your system more secure. Best would be ZFS, but if you're not familiar with it, then leave it.
 
The (currently two) storage drives-500 and 146 GB are just NFS shares. That is what I want to increase in size - put the one 146 GB to by three of them in raid5.

Nothing is really raid0, at least I mean not multiple drives. I had to format to raid0 in order for Proxmox to see them, I couldn't just use a blank drive.

I would like to keep my OS contained on one HD with all VM storage, have one 500 GB NFS share then the three raid5 146 drives as another NFS share.
 
...
Nothing is really raid0, at least I mean not multiple drives. I had to format to raid0 in order for Proxmox to see them, I couldn't just use a blank drive.
Hi,
raid0 with only one drive looks that you use the wrong bios settings (sata port in fake-raid mode - the bios don't name this fake-raid but it's such one).
Think about change this setting for the new disk, otherwise the disk will not work on another server with normal (or different) sata/raid-ports.

Or is this an LSI-Controller?? Than it's true with raid0 - bad luck - except you can switch the controller to it-mode (not all LSI-controller support this).
In this case, I would use an internal sata-port.

Udo
 
Hi,
raid0 with only one drive looks that you use the wrong bios settings (sata port in fake-raid mode - the bios don't name this fake-raid but it's such one).
Think about change this setting for the new disk, otherwise the disk will not work on another server with normal (or different) sata/raid-ports.

Or is this an LSI-Controller?? Than it's true with raid0 - bad luck - except you can switch the controller to it-mode (not all LSI-controller support this).
In this case, I would use an internal sata-port.

Udo
Hmm I'll be home in an hour or so, I'll look at my bios settings and see if I can see anything that sounds like what you're describing. The server is a Dell 2950, SAS drives.

I thought it was weird that I had to do this, I was expecting to pop in a drive, boot Proxmox and format it but the drive wouldn't appear without setting up RAID0 on them.

This is my first server and first time using any form of RAID so I just shrugged it off.
 
Yeah, that's normal with the "real" hardware RAID. I would never run anything with only one disk. Still suggest building 4x146 in RAID5 and use them as one LVM for everything. This is the fastest way.
 

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!