[mythtv-users] LVM and ext3, reduction?

Ben Curtis mythtv at nosolutions.com
Sat Oct 28 02:18:46 UTC 2006



So I recently migrated my video system to LVM.  I have a 320GB drive, that
currently is one big LVM partition with one logical volume filling the
whole thing.

I have another drive, that's going to be my "flow over" drive.  I would
rather not use this drive, but want to be able to add 50GB if I start to
get close to my size limit, then after I've deleted some stuff, drop it
back down.  So, I'm running ext3, and I've created a shell script to add
50GB, pretty darn easy, right:

lvresize -L +50GB /dev/VGforMyth/video
e2fsck -f /dev/VGforMyth/video
resize2fs /dev/VGforMyth/video

So question #1.  Say I fill up my 320, add the 50 gigs, and use 10 gigs of
it.  I later delete a few shows that are physically stored on the 320,
freeing up 20 gigs.  Can I do this:

pvmove /dev/hda3

And then reduce the size by 50G, where hda3 is the drive containing the 50
gigs?  I would like the end result to be no data on hda3.

Next question, I don't quite get how to do the shrink, I understand the
commands to be:

e2fsck -f /dev/volume_group/logical_volume XXXXXXX
resize2fs /dev/volume_group/logical_volume
lvresize -L YYYYYYY /dev/volume_group/logical_volume

where XXXXX is the block size of the final volume, and YYYYY is the MB
size of the final volume.  But how do you find out what the block size
would be?


Thanks,
Ben



Ben



More information about the mythtv-users mailing list