ZFS Quietly Degraded

raidinator

New Member
Oct 30, 2022
1
0
1
I am just getting started with Proxmox and I would like to install it on a software RAID1 array with 2 SATA drives.

I read on the Wiki that ZFS is officially supported and highly recommended, and I am sold on that idea (https://pve.proxmox.com/wiki/Software_RAID)

I installed Proxmox and rebooted with drive 1 physically removed from the computer, and it happily boots and runs without any complaints.

Now if I boot in with drive 2 physically removed, it continues to work as well.

Finally booting with both drives, after resilvering the drive it loses the changes I made to drive 1 and the pool reflects only the changes to drive 2.

If there is a loose SATA cable, this scenario could happen in real life.

Is there any way to set up Proxmox / ZFS so that it does NOT start my VMs / Containers if the pool is in degraded mode, to avoid any data loss? Also to avoid relying on a script to email me that the RAID is degraded? I prefer if my collegues just point out that the server is down, and then I investigate and replace the damaged drive / cable.
 
I do understand your reasons behind the thought and still this is not how these systems (RAID, MDADM, ZFS) are designed.

What you could do is to not autostart VMs, then issue a script that checks for health and starts the VMS if all is fine.

But what then if a disk goes within operation? How should the system behave?

I have built something that checks raid and plays ugly noises via the pcspeaker and wven issues an emergency light via a remote PDU but in the end you need some sort of monitoring / event handling.