[mythtv-users] Anyone using LVM2 w/ ext3 for video storage
David
myth at dgreaves.com
Fri Apr 1 21:14:26 UTC 2005
Jeff Simpson wrote:
>>Lots of other people responded, but I need to add my 2 cents. There
>>is nothing unreliable about LVM. I've used it on many production
>>servers, many people use it for their MythTV system. You just don't
>>have it configured correctly. Have you read the LVM HOWTO? It's very
>>useful and easy to find on google, it may be included with your LVM
>>install.
>>
>>
>That part about LVM that I'm curious about (and anyone who knows this,
>feel free to chime in) is what happens when you want to remove / move
>a drive?
>
>If I accidently put the drives back in my system in the wrong place
>(for example, hdb and hdg get swapped), does LVM know which partition
>goes where?
>
yes - it writes unique identifiers to each drive.
I suggest that when you set up a system like this you rehearse various
failure scenarios - force an error and do a resync with raid, add a PV
to an LVM VG, grow the filesystems, swap disks etc etc
Then, should the worst occur you have at least typed in the commands...
> is there a way to tell it which drives should be in the
>volume group if they change without having to re-create the whole
>thing?
>
it knows. (it scans all devices for tags and reassembles the LV
intelligently)
> (obviously if I remove a drive with data on it, it will mess
>up, but if I swap around a few of them or put them at different device
>labels, can LVM be trained about the change?)
>
>
no - it won't mess up - it just tells you that a drive is missing.
(of course, until you replace the drive you won't be able to access it -
and here isn't the place to go into emergency recover scenarios - but
they exist)
>I really like the idea of LVM, and I especially like having a single
>partition made up of three 160 gig drives - but I'm worried about what
>might happen if any of those three drives needed to be moved, removed,
>etc. Do I automatically lose all my data
>
To answer your question...
First, if any one of the drives failed you'd probably lose all your data
(so if I had those 3 drives, I'd have a 320Gb raid5 array and feel safe
that if I ever lost a disk then my data would be OK)
If you just moved a drive eg from one channel to another it'd be fine -
you'd never notice.
If you removed a drive without warning the LV would just refuse to mount
until you put it back - then it'd be fine.
If you wanted to remove one you'd have to shrink your filesystem to
320Gb (ext3 and reiser can do this, xfs can't, jfs I don't know)
Then you'd deallocate the drive and remove it.
HTH
David
More information about the mythtv-users
mailing list