[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Adding third drive to existing raid0 set



Tom, please keep your responses on the list.

On Wed, Sep 19, 2007 at 10:04:17PM -0400, Tom Moore wrote:
> Ok, this seems to be true.
> If I want to be able to enlarge a file system like this in the future could
> I use lvm to do this and how does lvm work?

yes, you can use lvm to do this, provided you use it in conjuction
with an extendable fs. Ext2/3 do this by default now. I don't use the
others and can't say whether they do or not. There are, of course,
ways to "extend" a file system without actually mucking about at the
file system level. An easy way is to add partitions to the system and
them move mount points around to make use of it. Its common, for
example, to put /home and /usr on seperate partitions and if you're
running out of room using one big / partition, this is certainly one
good way to go. 

as far as how lvm works, my google-fu turns up these to good sources:

http://tldp.org/HOWTO/LVM-HOWTO/
http://www.howtoforge.com/linux_lvm

with the first being the better. In simple terms, LVM takes a bunch of
disks (called physical volumes or pv's), groups them all together into
a "volume group" or vg which you can then carve up into arbitrary
"logical volumes" (lv's) that you then treat like regular disks --
creating filesystems, mounting them etc. These lv's are easily
resized, as are the vg's underneath them. LVM is a layer that lies
between the physical drives and the filesystems.

> Does it work in conjunction with the raid tools like mdadm or is this
> something completely different?

It is something completely different, but they compliment each other
nicely. One of the downfalls of LVM is that (like your raid0) if you
lose one disk, you pretty much lose the whole filesystem. This isn't
always true, but for practical purposes, might as well be. The
combination of raid and lvm is pretty powerful -- you get the security
of redudant storage media with the flexibility of lvm. Its what I use
on my home fileserver and I think its great. I have 4 disks in a raid5
array (raid 5 being a good balance between redundancy and space
efficiency, IMO. raid5 is also nice because you can add more disks
later). I have layered lvm over the top of this by taking that one
large raid5 md device (/dev/md2, in this case) and using it as a pv
for the lvm array. So I'm not really using one part of lvm; the part
that combines disks together; as that's being done by raid. I'm using
the other part though that allows me to create and manage filesystems
on the fly, adjusting partitions as needed. Its actually something I
use quite regularly. For example, the other day I needed to transfer
about 60gb from a colleague's portable drive for  project we were
working on. It took me all of 5 minutes (most of it spend review man
pages) to carve out a nice partition (lv), set up a filesystem on it,
mount it, and share it over the network. 

hth

A

Attachment: signature.asc
Description: Digital signature


Reply to: