[plug] Home Server LVM/RAID stuff

Patrick Coleman blinken at gmail.com
Wed Aug 20 18:04:59 WST 2008


On Tue, Aug 19, 2008 at 5:03 PM, Trevor Phillips
<trevor.phillips at gmail.com> wrote:
>
> Back to Windows Home Server - this does both these tasks in one. You
> can throw in more disk, have it add to volumes as you want, and you
> can also tag content (I believe it's per FOLDER, not even per volume)
> to keep a redundant copy on separate physical disks. It sounds like
> doing all this, and changing the configuration, is a cinch.

Nothing I know of on Linux will let you do per-folder selection of
whether to store on a redundant volume, unfortunately. You can however
gloat when Windows randomly corrupts all your friends data it so
helpfully stored on a redundant volume (eg.
http://www.theregister.co.uk/2007/12/31/home_server; though to be fair
they patched it last month).

What I'd recommend is the following:
 - Do RAID on physical devices or partitions. I've never tried doing
it on LVM; I'm sure it's possible but it'll be more flexible if you
put the LVM on the RAID. This means you can set up redundant and
non-redundant volume groups, with all the associated LVM magic.
RAIDing LVM means you lose the ability to snapshot a logical volume,
for example, unless you snapshot every volume of a raid set
simultaneously.

 - Create a RAID set large enough for the important data you want to store.
 - Use LVM to make a volume group called say "redundant", with the
physical drive of your raid set
 - Stick your remaining partitions/drives/whatever into a vg "nonredundant"
 - Create your logical volumes to store data. When you create them,
just stick them in either the redundant or non-redundant volume group
as appropriate. You can create a bucketload of LVs, so go as granular
as you want.
- Most filesystems support online expansion, and offline shrinking, so
you can increase the size of the volumes easily.
- If your redundant VG gets full, and you want to replace the disks
with larger capacity ones, use the magic of LVM: Remove one small disk
from your RAID, insert one large disk and create a degraded array from
it, add the new large array to the redundant VG, use pvmove to shift
the data across, replace the remaining small disk with the second
large disk, add the new large disk to the array and off you go. You
can do all that without rebooting or shutting down applications if you
have hotswap drive caddies.

That method also works for resizing partitions, as you mentioned.

Also, back stuff up somewhere. I rekon dirvish is great for that,
mostly because it's about 10 lines in a config file and I can't be
arsed configuring bacula.

Hopefully that helps?

Cheers,

Patrick


-- 
http://www.labyrinthdata.net.au - WA Backup, Web and VPS Hosting



More information about the plug mailing list