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

Re: LVM root?



dtutty@porchlight.ca writes:

> On Wed, Oct 11, 2006 at 05:20:58PM -0400, dtutty wrote:
>> On Wed, Oct 11, 2006 at 12:27:12PM -0400, Lennart Sorensen wrote:
>> > On Wed, Oct 11, 2006 at 06:04:43PM +0200, Daniel Tryba wrote:
>> > > Adding a disk creates an other copy of /, and with the newer
>> > > kernels a raid5 array can be expanded, so it can be used by the LVM.
>> > > 
>  
> Where can I find documentation on what is currently possible with raid
> and lvm?  The software-raid howto says that resizing is impossible/very
> difficult.  
>
> If I install without raid, how difficult is it to add raid1 to / when I
> add a second drive later on?  I had planned that my first upgrade (in a
> few months) would be a second 1GB ram stick then a TV tuner card, then a
> second larger drive for space/performance when removing commercials from
> old VHS tapes (and making DVDs).  By then, larger drives will be
> cheaper.

Not much. But it requires some fiddling around. What you do is you set
up raid1 on the second disk in degraded mode (one disk missing). Then
you copy your system over and reboot into the raid (still in degraded
mode). If everything works then you add the old disk to the raid.

> The downside of raid1 to me has always been that if I want to add 'a'
> drive, I have to add 'a pair/set'.  I would like to be able to do this:
>
> Start with one drive with lvm
> Add a second drive and provide raid redundancy to / (e.g. raid1)
> 	and improve performance to the video-editing working directory
> 	(since I havn't got it installed, I don't know if this is /home
> 	or /var/tmp or what)
> Add a third or more drives to add capacity while getting raid
> redundancy.  This sounds like raid5.  Later-added drives will probably
> be larger capacity.

Indeed, with raid1 you have to add disks in pairs, tripplets, however
many copies you have set up. So when you go from 2 disks to 3 disks
you convert from raid1 to raid5. The kernel has recently gotten
support to do this on-the-fly in the background so you don't even have
to umount and shutdown the raid anymore.

You do have a problem with the disk size though. The raid1 and raid5
will always be as small as the smallest disk. So when you get a bigger
disk later you would make a partition roughly as big as the old disks
for the raid and the rest you can use for something else.

For example I have a raid5 over all disks the size of the smallest. A
raid1 on the bigger disks for / and swap and whatever is still left
over I use for a debian mirror without raid. If a disk fails I loose
nothing that can't be easily replaced.

> If one can add a drive to raid5 and extend the pv onto it, then extend
> the LV and the filesystem on it, while maintaining data redundancy,
> that's almost perfect.  Perfect would be transparent data integrety
> verification.
>
> The question for me, on a limited budget, is how to start.  One disk,
> with everything in place for adding a second, larger disk later.

Sounds good to me.

MfG
        Goswin



Reply to: