Keep losing RAID in VM with HD pass through after Proxmox server is shutdown

axsim

Member
Jun 19, 2021
13
1
8
I'm running Proxmox 8.1.4 and have an Ubuntu server 22.04.4 LTS VM that was a hardware server and I virtualized it. I successfully configured 3 hard drives from the Proxmox host to the Ubuntu VM. Those three drives were setup as a RAID 5 with mdadm before I virtualized it. I successfully re-added the RAID and updated the mdadm.conf file and ran update-initramfs -u. The RAID has a logical group called vault-vg and a logical volume called Vault on it that I mount with the UUID in the fstab. Everything works great. I reboot the vm, it remounts the RAID as it should. I shut down the vm and start it back up and it remounts the RAID as it should. However, If I shut down the vm and the proxmox host, and then power them both back up, the Ubuntu server vm loses the RAID. That causes the VM to fail to start and I have to go into emergency mode and comment out the Vault mount, then force the vm to power off. It never shut down or reboots gracefully at that point. Then once the VM is powered back up I have to do the following steps every time...

mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd
mdadm --detail --scan >> /etc/mdadm/mdadm.conf
update-initramfs -u
vi /etc/fstab and uncomment the RAID
mount -a

Is there a way to fix this? Am I even using the passthrough correctly? Should I create the RAID on the Proxmox server then pass that through to the VM?

Here are some of the logs I found....
Apr 18 21:30:03 falcon udisksd[803]: Error loading modules: Error opening directory “/usr/lib/x86_64-linux-gnu/udisks2/modules”: No such file or directory

Apr 18 21:30:46 falcon udisksd[803]: Error probing device: Error sending ATA command IDENTIFY DEVICE to '/dev/sdd': Unexpected sense data returned:
0000: 70 00 05 00 00 00 00 0a 00 58 00 01 21 04 00 00 p........X..!...
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
(g-io-error-quark, 0)
Apr 18 21:30:46 falcon udisksd[803]: Error probing device: Error sending ATA command IDENTIFY DEVICE to '/dev/sdb': Unexpected sense data returned:
0000: 70 00 05 00 00 00 00 0a 00 58 00 01 21 04 00 00 p........X..!...
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
(g-io-error-quark, 0)
Apr 18 21:30:46 falcon kernel: sde: sde1
Apr 18 21:30:46 falcon systemd-udevd[14908]: sde1: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sde1' failed with exit code 1.
Apr 18 21:30:47 falcon udisksd[803]: Error probing device: Error sending ATA command IDENTIFY DEVICE to '/dev/sdc': Unexpected sense data returned:
0000: 70 00 05 00 00 00 00 0a 00 58 00 01 21 04 00 00 p........X..!...
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
(g-io-error-quark, 0)
 

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!