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

Re: LVM root?



On Thu, Oct 12, 2006 at 07:04:59PM -0400, dtutty@porchlight.ca wrote:
> 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.  

True but you generally have no need to resize a raid.  If you get more
disks, you make another raid and add a partition on that raid to your
existing LVM, and then you can resize your existing LVM volumes to take
up more space spread across all your disks.

> 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.

Simple answer: You reinstall.  There are ways to kind of do it, but it
is a lot of manual work, and somewhat prone to screwing up.

> 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.

You can only add drives to raid5 with a good hardware raid card I
believe (fake raids generally suck at raid5 since it is rather cpu
intensive and needs a dedicated xor engine).  Raid1 is simpler, and is
all the boot loaders currently support (since with raid1 the disks are
identical, the boot loader just ignores raid and reads from one disk).

Technically you could install pretending to have raid1, by starting with
degraded mode, and then adding an identical disk later as if you were
replacing a broken disk.  Given the cost of disks though, it hardly
seems worth it.  I don't think 250GB disks are going to get that much
cheaper.  For example checking a local computer store's prices:
SATA II:
 80GB: $59
160GB: $72
250GB: $90
320GB: $125

Seems to me that the electronics and case and such must cover about the
first $50 of the drive price, with the capacity being the rest of the
cost.  A pair of 250GB drives is hardly expensive anymore.  Compared to
the cost of RAM, CPU, motherboard, video card, etc, you are nuts (in my
not so humble opinion) if you think you can justify not buying two hard
drives for raid1 anymore.

> 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.

I always think if you are on a limited budget, stick with your current
machine until you can afford to buy something worth your money.  My main
machine is an athlon 700 with 768MB ram and a lot of disk space (running
raid1 on everything).  I have a mythtv system with an athlon 1700+ with
a pair of 120GB SATA drives running raid1.  The time it would take to
reinstall a machine and restore from backups is worth an awful lot more
than a few dollars for a second disk.

--
Len Sorensen



Reply to: