r/openbsd•
2kittens

Softraid newbie here, how do when things break?

I've created a softraid RAID 1 volume out of two identical drives and exposed it to the network via NFS. Everyone can store media on it now, but what happens when a drive fails? Will the raid volume still be mountable and accessible like normal, in degraded but working form, or do i have to replace the failed drive first and rebuild? Excuse my naivety i'm new to raid :) Additionally, what is the best way to keep an eye on the volume's health? sysctl hw.sensors.softraid0? I'm using 6.5 -stable amd64.

Posted Sep 11, 2019, 3:43 AM UTC

63
DamienCouderc•

First you must know that if you bought the drives together and that one drive start to fail there is a good chance that the second will fail soon.

It happened twice for me when i tried to replace the failing disk and to rebuild the degraded volume.

So if you want to keep your data safe just remember that RAID is not a backup.

6
calrogman•

Yes, you can still mount and use your softraid volume while it is degraded. To monitor the health of the volume, use sensorsd.

5
[deleted]•

[deleted]

3
SaturnFive•

You could check out man 8 atactl to monitor the SMART attributes of individual drives.

atactl <device> readattr will print out raw SMART attributes for your review and atactl <device> smartstatus will let you know if any SMART thresholds have been exceeded, which especially useful in your crontab(1).

2