Trying to recover or reinstall proxmox 8

olu

Member
Feb 15, 2023
34
0
6
Hello please can anyone help, i have a proxmox server which was working okay until yesterday after a power cut refuse to boot. It gets stuck on /dev/mapper/pve-root recovering journal and after this noting happens. I have tried resuce boot, recoverying nothing works. Please any suggestions, i am thinking about reinstalling but afraid i will lose my data. All my data like my vms are on a seperate disk from my boot pve disk. Unfountnaly i have not done a backup . is there a way to either repair the booting or reinstall proxmox whitout losing my data.
Thanks.
 
All my data like my vms are on a seperate disk from my boot pve disk
If any of your data/VMs is critical, I'd make a dd image of that drive to another spare drive - just in case - before doing anything else.
To do that boot up with some live USB but don't mount any of the existing drives. Then make the dd image of the data/VMs disk to another (spare) disk that you will attach.
If you don't have a spare disk big enough - make at least a zipped dd image - on another disk.
 
Last edited:
Hi,

Boot into a Live Environment from USB, and umount the pve-root then and fsck command

Bash:
umount /dev/mapper/pve-root
fsck /dev/mapper/pve-root
 
Hi,

Boot into a Live Environment from USB, and umount the pve-root then and fsck command

Bash:
umount /dev/mapper/pve-root
fsck /dev/mapper/pve-root
Please when you say bootinto a Live Eniroment what do you mean? I have a installation iso on a usb but it allows me to go into debug mode but not sure what you mean by live enviroment. or is there a usb boot for proxmox. sorry very little knowledge on this.
 
If any of your data/VMs is critical, I'd make a dd image of that drive to another spare drive - just in case - before doing anything else.
To do that boot up with some live USB but don't mount any of the existing drives. Then make the dd image of the data/VMs disk to another (spare) disk that you will attach.
If you don't have a spare disk big enough - make at least a zipped dd image - on another disk.
Please how do i make dd image?
 
To make a compressed image in your case:


1. Search web for live USB - such as Gparted, (check that the live USB OS flavor shouldn't mount drives automatically)

2. Burn a USB stick with it's ISO - on another computer

3. Attach a keyboard & monitor to your PVE computer PC

4. Boot the PC (PVE) with the above USB stick (check your BIOS boot order for this)

5. Then find a spare USB drive and attach it to the computer (PVE)


6. Then do the following command:

Code:
lsblk

7. Then identify from the output which disk is the one that contains your VMs & LXCs - I'm going to call it /dev/sdX - yours will be different - check carefully

8. Then identify from the output which disk is the one that contains your attached spare USB drive/partition - I'm going to call it /dev/sdY - yours will be different - check carefully

9. Then mount the attached spare USB drive like this:
Code:
# replace /sdY with your actual spare attached USB drive/partition - see 8 above
mount /dev/sdY /mnt

10. Then issue the following command to make a compressed image of the source drive (the one that contains your VMs & LXCs - I've called it /dev/sdX - see 7 above) to the destination (/mnt - see 9 above)
Code:
# replace sdX - as 7 above
dd if=/dev/sdX status=progress conv=sync,noerror | gzip -c > /mnt/vms_lxcs_drive_backup.img.gz
This will create an image called vms_lxcs_drive_backup.img.gz on sdY (your spare USB drive/partition). It can take some time depending on the size of /dev/sdX.

11. When finished issue the following command to unmount the USB spare attached drive:
Code:
# replace sdY with your attached USB spare drive/partition - as above
umount /dev/sdY /mnt

Shutdown the computer and unattach the spare USB drive.

Thats it - you should have a backup image of your VMs & LXCs drive on the spare USB drive.
 
To make a compressed image in your case:


1. Search web for live USB - such as Gparted, (check that the live USB OS flavor shouldn't mount drives automatically)

2. Burn a USB stick with it's ISO - on another computer

3. Attach a keyboard & monitor to your PVE computer PC

4. Boot the PC (PVE) with the above USB stick (check your BIOS boot order for this)

5. Then find a spare USB drive and attach it to the computer (PVE)


6. Then do the following command:

Code:
lsblk

7. Then identify from the output which disk is the one that contains your VMs & LXCs - I'm going to call it /dev/sdX - yours will be different - check carefully

8. Then identify from the output which disk is the one that contains your attached spare USB drive/partition - I'm going to call it /dev/sdY - yours will be different - check carefully

9. Then mount the attached spare USB drive like this:
Code:
# replace /sdY with your actual spare attached USB drive/partition - see 8 above
mount /dev/sdY /mnt

10. Then issue the following command to make a compressed image of the source drive (the one that contains your VMs & LXCs - I've called it /dev/sdX - see 7 above) to the destination (/mnt - see 9 above)
Code:
# replace sdX - as 7 above
dd if=/dev/sdX status=progress conv=sync,noerror | gzip -c > /mnt/vms_lxcs_drive_backup.img.gz
This will create an image called vms_lxcs_drive_backup.img.gz on sdY (your spare USB drive/partition). It can take some time depending on the size of /dev/sdX.

11. When finished issue the following command to unmount the USB spare attached drive:
Code:
# replace sdY with your attached USB spare drive/partition - as above
umount /dev/sdY /mnt

Shutdown the computer and unattach the spare USB drive.

Thats it - you should have a backup image of your VMs & LXCs drive on the spare USB drive.
Thank you i will give that a try
 
Please note that this will only create an image (which you could later use to restore to the drive - in case your drive were to get corrupted).
This does not deal with your main problem - of restoring your PVE - to access your data/VMs & LXCs.
 
Hi,

Boot into a Live Environment from USB, and umount the pve-root then and fsck command

Bash:
umount /dev/mapper/pve-root
fsck /dev/mapper/pve-root
I have tried but all i get is /dev/mapper/pve-root: recovering journal and it just stays on that for hours going no where. Please any help
 
i am confuse with that statement live booting? what i have done is burn the install iso onto a usb stick and went into debug mode then run those commands. Not even sure am doing it right
 
You could, but maybe an easier way in tour case, would be:

Boot from a Proxmox installer USB, then choose Debug mode, and at the prompt type exit.
You'll then be able to try the fsck command.

Did you already backup/image your VM/CT disk?
 
First do: umount /dev/mapper/pve-root
and then: fsck /dev/mapper/pve-root

You maybe facing a reinstall if all fails.