Proxmox won't boot with degraded btrfs RAID1

Sep 14, 2020
57
6
13
47
In a standard installation of Proxmox version 7.3, the server was installed over a raid1 btrfs array of two mirrored disks. That was the boot disk. After working a few days, there was a problem with the hardware (probably) and the system crashed. Upon restarting, I noticed that one of the disks in the raid was not recognized by the hardware. The first of the HDD's is really broken. Luckily, the second one is working.

I believed that this would not be a big problem, after all a raid1 is for that. That's when I had the surprise: The system doesn't boot with just one disk, because it's in the "degraded" state.

When I turn on the server, it starts to boot but stops at the initramfs screen. From then on, I don't know how to proceed.

I tried to find it on the internet, but I didn't find a good tip for when the system has already been restarted with the raid degraded.

Question: Now that the system is stopped, how can I make it boot even though it is degraded, so that later I can replace the broken disk?

Tanks!
 
Thanks for the answer.

I had already found the publication of this link, but unfortunately it does not solve my case, because I no longer have the second disk working to boot and set the flags that it suggests. So the suggestion in that post would be to put "rootflags=degraded" on the kernel command line in /boot/grub/grub.cfg.

Or, placing it as permanent, change the content of the GRUB_CMDLINE_LINUX_DEFAULT="quiet" variable in /etc/default/grub to keep the same flags, leaving GRUB_CMDLINE_LINUX_DEFAULT="rootflags=degraded".

But in fact, I don't have access to this file in the initramfs. It does not mount internal root or /boot or even /etc.

So how could I put this parameter on grub startup? If it was the old (legacy) grub I think it would be easier. But since this is modern grub, I don't know how to do it without being able to boot and mount the root folder of the system that is locked inside the raid1 of the degraded btrfs.

That is, I can't mount raid1 to access the file where I would put the configuration and create the new grub configuration that would allow me to mount the degraded raid... Which comes first, the chicken or the egg?

If I could mount btrfs on the degraded raid1, I could rebuild raid1 using a fresh disk.

Please, would anyone know how to help?
 
I tried to mount it from the Proxmox installation pen drive, but I couldn't, because it couldn't mount the degraded Btrfs. In theory, I would have to put the flags to allow this volume mounting in the Kernel line of the live Linux disk, I believe. It will be? How would you do that? Very complicated to recover the server in a moment of urgency.
 
every time i have this silly little thought of making money hosting, i read forum entries like these and i'm like "NOPE!" my brain hurts just reading this. good content though :D
 

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!