You are not logged in.

#1 2005-03-10 07:17:50

Cotton
Member
From: Cornwall, UK
Registered: 2004-09-17
Posts: 549

LVM - is it worth it?

With my shiny new 160 G drive, I've been wondering about using LVM2, having read all about the advantages.

However, it is a relatively involved procedure to set it up, and I am wondering whether it really is worth the hassle.

If I allocate 30 G to Arch and the rest to /home (with a 1 G swap file), am I ever likely to be able to take advantage of the LVM benefits.

Also, if I did use LVM for Arch and /home and subsequently Arch needed to be reinstalled, leaving the /home partiton intact, I'm not sure how easy it would be to point to the old LVM'd /home partition without messing it up.

Any comments?

Offline

#2 2005-03-10 09:03:50

incinerator
Member
From: Edinburgh, Scotland
Registered: 2005-02-15
Posts: 80

Re: LVM - is it worth it?

Setting up lvm/lvm2/whatever for every partition except / (and /boot) is no problem at all. If you want to boot from lvm/lvm2 you will need an initial ramdisk (initrd) for your kernel.

However, I found that using lvm/lvm2 is quite cumbersome, I'd rather use evms. Evms is a nice frontend (command line, ncurses or gtk) to an abundance of things like dm,md,lvm,lvm2 etc.

I used evms to set up my new 5x300GB RAID-5 array, and it took me only a couple of minutes to do that. Unfortunately there is no evms package for Arch Linux (yet?). However, evms should compile from source without to many problems, also evms provides an example intitrd you can use to make your system able to boot from an evms volume.

As soon as you upgrade you hard disk or migrate data between hard disk, resize partitions etc. the benefits of using evms or lvm will become obvious. E.g. migrating data from one disk to another can be done without unmounting the filesystem, the users accessing the filesystem won't even notice.

Cheers,
Dominik

Offline

#3 2005-03-10 23:17:25

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: LVM - is it worth it?

For just one hd it's overkill and probably not worth it, other than a learning experience.

Offline

#4 2005-03-13 16:47:16

Cotton
Member
From: Cornwall, UK
Registered: 2004-09-17
Posts: 549

Re: LVM - is it worth it?

Incinerator - thanks for that and i3839, its certainly an experience!

A PKGBUILD for anyone who wants to try out evms:

pkgname=evms
pkgver=2.5.2
pkgrel=1
pkgdesc="Unified system for handling disk storage management tasks"
url="http://evms.sourceforge.net/"
source=(http://kent.dl.sourceforge.net/sourceforge/evms/$pkgname-$pkgver.tar.gz)
md5sums=('5374d003f4478db737720c9b62e7cb86')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr
  make || return 1
  make DESTDIR=$startdir/pkg install
}

Offline

#5 2005-03-22 04:32:52

jaawood
Member
From: Chicago, IL
Registered: 2005-01-30
Posts: 31
Website

Re: LVM - is it worth it?

You are my hero.  Period.  Now, this is my question.  I have two 80 gig drives which I am looking to put into a raid 1 array.  How would I do that with evms?  Would I first have to install arch to one 80 gig, then install evms, then somehow synchronize the two drives, and configure the initrd, etc. in order to boot from the raid array?


<html>
<a href="http://www.jrspc.net">My Website</a>

Offline

#6 2005-03-22 09:36:08

incinerator
Member
From: Edinburgh, Scotland
Registered: 2005-02-15
Posts: 80

Re: LVM - is it worth it?

I dunnow about the initrd stuff but for a RAID-1 you won't need a special grub/lilo config as the data is simply mirrored, that should make things a wee bit easier.

I can't tell you any specifics though, as none of my computers boot from RAID. I'd try to follow these instructions (which is tfm byraway). Some googling may help, too.

The new Ubuntu release will come with full evms support in its installer, which will make you able to directly install onto an evms setup. Even the current release has all the stuff there. Afaik it is not well tested and doesn't really work, though.

I remember that I once successfully set up a RAID-1 to boot for an Ubuntu install. There is a dedicated howto at the Ubuntu wiki. I wasn't using evms though.

Cheers,
Dominik

Offline

#7 2005-03-22 22:56:27

Cotton
Member
From: Cornwall, UK
Registered: 2004-09-17
Posts: 549

Re: LVM - is it worth it?

You're going to have to contact someone with some RAID experience (try the Arch channel on IRC), as I decided not to implement LVM & RAID together, due to limited time for experimentation (and potential foul ups).

Also, the opportunity for commonn mode failures (power supply voltage increases, fire or theft) left me wondering whether RAID was actually any use to me.  In the end, I put each of my new drives in different machines and mirrored directories I didn't want to lose.   Seemed to be the best use of the space available.

Managed to master LVM with help from ubermartian's description:

http://bbs.archlinux.org/viewtopic.php? … light=lvm2

and that works a treat.  Fairly straightforward once you grasp whats going on.  Resizing partitions on the fly is amazing!

Regarding evms, although the app runs and recognised all my partitions, it never showed the current mount points. Not sure whether that was because I needed to recompile the kernel using the instructions on the evms home page, or whether I wasn't doing something correctly. 
Anyway,  I didn't use it to manage my partitions as using the comand line helped me understand things better.   

Maybe incinerator can help some more.

Offline

#8 2005-03-24 09:53:27

incinerator
Member
From: Edinburgh, Scotland
Registered: 2005-02-15
Posts: 80

Re: LVM - is it worth it?

I had similiar problems when I run the evms control app the first time. Evms marked existing disks as "compatibility volumes". In the beginning that will prevent you from creating regions, containers etc. There is two things to do:

1.) Mask out all the hard disks you don't want to run evms on.
Edit /etc/evms.conf, here is a sample snippet:

sysfs_devices {
   include = [ * ]
   exclude = [ hda hdc ]
}

E.g. this will mask out hda and hdc, preventing accidental deletion of partitions you need to boot your system with. If you are using a 2.4 kernel you will have to do a similiar change to the section "legacy_devices"

2.) Remove the "compatibiliy volumes" from the other disks (if they are empty). Once they are removed you can start fiddling around creating regions, containers etc.

I created a RAID-5 region consisting of my five 300GB disks, then I created an LVM2 container on the RAID region. Inside the LVM2 container you can create one or more LVM regions, which can then be made evms or compatibiliy volumes. As soon as a region, segment or container is made an emvs/compatibility volume it will be a logical volume and have a /dev/evms/volume_name entry in your /dev tree. That logical volume can then be used like a disk partition, you can create whatever filesystem you like or make it a swap "partition". I also chose not to create the filesystem from within evms but used the command line to properly tune the ext3fs settings for my RAID array (stripe size, journal size etc.). Also, I used my /etc/fstab to mount it, not the evms client. However, in my case the mountpoint is visible in the evms client (I use evmsn byraway).

Sound more complicated than it is, but the user guide is really good to follow along and will explain all the special terms, too.

Cheers,
Dominik

Offline

Board footer

Powered by FluxBB