[RESOLVED]Proxmox with btrfs raid1 rootfs

tyjtyj

Member
Feb 7, 2022
12
5
8
43
I simulate disk fail on the raid1 btrfs which is also my root for proxmox ve 7.1-7.

When one of the disk failed, the system will not boot.
It stuck at initramfs, i am unable to mount the system as the initramfs does not have mount.btrfs

The system will boot normally with both disk exits.

How do I make the system to boot on degraded system even if on of the disk missing ?

This is my /etc/fstab if that matters
Code:
UUID=e115f582-3078-4d22-a8e3-xxxxxxxxxxx / btrfs defaults,nofail,degraded,noatime,x-systemd.mount-timeout=1min 0 1
UUID=D86D-XXXX /boot/efi vfat defaults 0 1
proc /proc proc defaults 0 0

my knowledge for system kernel is limited if there is any things need to be edit, please specific the file full path.

PS: I need to get the system back up until the replacement disk arrive thus, running on degraded mode is fine.
 
To answer to my own question
Create a copy of /proc/cmdline to /etc/kernel/cmdline
add to end of the line
rootflags=rw,degraded
eg.
initrd=\EFI\proxmox\5.13.19-2-pve\initrd.img-5.13.19-2-pve BOOT_IMAGE=/boot/vmlinuz-5.13.19-2-pve root=UUID=e115f582-3078-4d22-a8e3-xxxxxxxxxxx ro quiet rootflags=rw,degraded

run

proxmox-boot-tool refresh

and

proxmox-boot-tool init /dev/sdx2 <-- depending on your raid1 mirror... usually /dev/sdb2
 
  • Like
Reactions: rhu and nibblerrick