[mythtv-users] Reviving a myth system after hardware failure on /var

Simon Hobson linux at thehobsons.co.uk
Fri Nov 7 08:20:01 UTC 2014


UB40D <ub40dd at googlemail.com> wrote:

>> I usually use partition
>> labels now instead of UUIDs to avoid that problem. 
> 
> I prefer the UUIDs, despite that problem, because if I move the drives around physically, or add/remove drives, then I don't have to rewrite the fstab for previous partitions that may have changed name. That used to be a pain in the pre-UUID days!

If you use filesystem labels then the label stays with the partition regardless of what you do. It's not like using device names which depend on the order they are connected.
With EXTn type filesystems, use e2label to apply a label, then you can use "LABEL=text" as the device identifier in fstab.



UB40D <ub40dd at googlemail.com> wrote:

> That's an interesting approach but I've never investigated software raid yet.
> 
> If I do it over drives of different sizes, will I lose the extra space on the bigger drive?
> I have a bunch of drives in the machine and tend to upgrade them one by one, when they fill up or fail, with whatever the largest affordable drive is at the time of upgrade (nowadays 4 TB). So there will always be smaller and larger drives in there.

I held off for a long time as it looked "daunting". Once you get the hang of it, it's actually fairly simple.
You can mix and match what you use. The "traditional" way of doing RAID is for the controller to array the whole drives together and present one big volume to the OS which is then partitioned. With MD, it's easier to do it partition by partition.

I typically make my boot partition as a mirror as that means any single member of the set can also be used (read only) if needed although I believe GRUB now supports booting from MD arrays. Then my other volumes are mirrored, RAID5 or RAID6 depending on the drives I have and the requirements.
As Karl has explained, for each array, each member has to be the same size - and MD will warn if the sizes are significantly different when creating an array.

One other trick that could be useful for a Myth system is that you can tell it to use one member of a mirrored pair as a "master" - ie tell MD to do most reads from only one member. Thus you could mirror a partition on your "OS drive" with one on a "recording drive" and configure MD so it will treat the latter as a "write only" drive. If your DB is tuned to keep most data in cache then there will be little activity (mostly reads) on the recordings drive.
It's also a way of mirroring an SSD with a spinning disk without losing too much of the benefit of the SSD.

Simon Hobson




More information about the mythtv-users mailing list