speaking up LVM

Alan McKinnon alan at linuxholdings.co.za
Mon Sep 11 14:59:52 UTC 2006

On Monday 11 September 2006 15:56, Thilo Six wrote:
> Hello
> Now after a suppestion from Alexander Skwar i have tried out
> LVM and installed edgy in there.
> ...and indeed LVM rocks.  ;)
> Now i have just some basic question about the possibilities
> with LVM:
> scenario 1:
> i have setup a physikal volume and a volume group in there
> with plenty space.
> Now i create a logical volume for / (lets say 1,5 gig) and
> and one for /var (500megs). both with ext3.
> Now i need to make / and /var bigger.
> Is it really just some cli hacks to accomplish that, or are
> there any pitfalls?

No pitfalls, to make an lv bigger you increase the size of the 
lv using lvresize, then resize the filesystem it holds using 
the correct tool for the filesystem. To reduce an lv, perform 
these actions the other way round.

For reiser, it's resize_reiserfs, for ext2/ext3 it's resize2fs 
(or ext2online to make it bigger without having to unmount). To 
reduce a filesystem, you *have* to umount it first.

> scenario 2:
> same setup as above
> I would like to move the content of /var lv into / lv
> directly and use the freed space for / lv (reorder partition
> setup).
> Possible without reinstalling?

yes! Make sure nothing is using the contents of /var, then 
remount it somewhere else (eg /mnt/tmp), then move everything 
to /var (which is now part of /). Delete the /var/entry in 

> scenario 3:
> i have put my backup into lvm, after system crash i need to
> put things back (boot from livecd, or something).
> How about the difficulty to recover data from the backup
> since it is an lvm. lvm adds extra complexity which increase
> by definition error rate. e.g. I am "allways" able to access
> the backup partition from a live cd, it only needs to be
> mounted.
> Which requirements must be fullfilled in that case with lvm?

You need the lvm software to be available and intact. This 
sounds like an extra point of failure, but actually it's just a 
tiny bit more stuff needed than what you must have to boot. To 
boot you need a kernel working, a working 
bash, /lib, /bin, /sbin available and intact and a few more 
bits besides. Oh yeah, all the kernel drivers you plan to use 
must be uncorrupt, the drives themselves must be fine. So you 
don't have an extra massive point of failure, you have one more 
link needed in a chain that's already a few hundred links long. 
And that chain already works well, so you have little to worry 


More information about the ubuntu-users mailing list