[mythtv] Problems with using LVM for large storage

Eric Thelin eric.thelin at gmail.com
Sun May 15 23:46:24 UTC 2005


I have been using myth with three drives in an LVM array running XFS.  I 
just found out about the disadvantage of LVM.  One of my drives failed.  
This caused a total loss of the array.  This really got me thinking about 
the problems caused by myth's requirement that all recordings are put in
the same directory.  I know the official solution to growing beyond one 
drive is to use LVM to make one giant virtual drive.  But I haven't heard
or thought much about the down side that every drive you add to that array 
reduces the reliability of the entire volume.  I would much rather see a
situation where a failing drive only takes its portion of the total 
storage with it.

But this is the developer
list so I am not here to complain without proposing solutions.  I have a 
few ideas.  First, for the short term I have written a simple script that
moves all recordings from the primary record directory to another drive 
(chosen at random from a list) and creates a symlink in the original 
location.  For safty sake it waits until the file hasn't been modified 
for four hours to let scheduled jobs finish.  There are more advanced ways
to make sure myth is done writting the file but this will do for now.  If 
anyone knows of any weakness with this concept please let me know.  Once I
test this a little more and give this opportunity for feedback I plan 
submit it for inclusion in the contrib directory.  The better solution
seems to be to make myth capable of handling multiple record directories.
This would also allow us to simplify the installation by removing the 
reliance on LVM for large scale installs.  We could either implement the
same type of solution as my perl script or full handling of the multiple 
paths.  If we add a field to the recorded table to store the destination 
path and modify all routines that read or write the files directly to use
that complete path.

I will submit my move script either in its current incarnation or as a 
script to be run as a user job to be run automaticly.  

Eric


More information about the mythtv-dev mailing list