Proxmox 4, two HDD , one for OS and other for VM , change first HDD with new one

mfaridi

Renowned Member
Oct 17, 2015
83
0
71
I installed Proxmox 4 on HP server , and HP server has two HDD , one of them 80GB and another one is 1TB HDD. this HP server work for us over 5 years , without any error , we have another HP too , yesterday first HDD is faild and OS can not boot .
So I want change first HDD , I install OS on 80GB and VMs are on Second HDD . I want replace 80 GB HDD with 2TB Western Digital Black HDD ,
what I must do when I want move OS to another HDD , without lose of DATA or reinstallation of OS?
 
Last edited:
Re: Proxm,ox 4 two HDD , one for OS and other for VM , change first HDD with new one

Any Idea or guide

DO I have to new installatiin in new HDD ?
 
Last edited:
Re: Proxm,ox 4 two HDD , one for OS and other for VM , change first HDD with new one

I (personally, I take no responsibility, you must understand what are doing) would:
- copy 80 GB "old" install /etc/ somewhere else, you need it later (especially /etc/pve). If it's dead you are in troubles.
- take notes on IP and other custom configuration that can be handy later
- disconnect the HD that holds the VMs (to be sure not to damage it)
- install the new HD
- install Proxmox bare metal on the new HD (it takes just some minutes) and configure basically
- connect the HD with the VMs
- mount the VM hd as you did with the old one, check fstab and so on
- copy /etc/pve/storage.cfg
- copy the vm configs from /etc/pve/qemu-server/ of old system to new one (of from /etc/pve/nodes/YOURNODENAMEHERE/)

at this point, after reboot, you should be able to see the VM storage from Proxmox GUI and have it working
If you can't restore storage.cfg and the <VMs>.conf you have to create the former again (don't know the second hd how is seen... just as directory type mounted somewhre?) and recover the latter from VM backups (don't know if you can extract just the .conf file or you have to restore the whole VM (with a UNUSED destination VMid not to overwrite the current disks of your current vm!!!) and then read it)
regards
 
Re: Proxm,ox 4 two HDD , one for OS and other for VM , change first HDD with new one

I (personally, I take no responsibility, you must understand what are doing) would:
- copy 80 GB "old" install /etc/ somewhere else, you need it later (especially /etc/pve). If it's dead you are in troubles.
- take notes on IP and other custom configuration that can be handy later
- disconnect the HD that holds the VMs (to be sure not to damage it)
- install the new HD
- install Proxmox bare metal on the new HD (it takes just some minutes) and configure basically
- connect the HD with the VMs
- mount the VM hd as you did with the old one, check fstab and so on
- copy /etc/pve/storage.cfg
- copy the vm configs from /etc/pve/qemu-server/ of old system to new one (of from /etc/pve/nodes/YOURNODENAMEHERE/)

at this point, after reboot, you should be able to see the VM storage from Proxmox GUI and have it working
If you can't restore storage.cfg and the <VMs>.conf you have to create the former again (don't know the second hd how is seen... just as directory type mounted somewhre?) and recover the latter from VM backups (don't know if you can extract just the .conf file or you have to restore the whole VM (with a UNUSED destination VMid not to overwrite the current disks of your current vm!!!) and then read it)
regards
Thanks
I wish Proxmox has option for get backup from important config files and we can restore it next time
this process is so hard and I am afraid I lose my DATA
 
Re: Proxm,ox 4 two HDD , one for OS and other for VM , change first HDD with new one

Can we find another way ? easy and with low risk
 
Re: Proxm,ox 4 two HDD , one for OS and other for VM , change first HDD with new one

Just want to add a comment. AFAIK, the only risk you have is overwrite the disk that store the vm, that's why I suggest you to *disconnect* it when you install the OS.
After the os (proxmox) is installed, is just a matter of "rejoin" the storage and restore VM config files, if you have a backup of them or you can access the old disk.
And about backup of important config files, is just a matter of create yourself a cronjob and a script to store them daily on your backup storage
 

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!