[mythtv-users] Re: LVM and a new hard drive

Mitch Anderson mitch at metauser.net
Fri Nov 4 02:18:26 EST 2005


Joshua Fechner wrote:
> What if I don't want to save any of the data on the 20GB drive? Should I
> just forget that command? Excuse my noobness but I have never worked with
> LVM (except in using DiskDruid). I am comfortable with fdisk. Anyway, do I
> fdisk the 80GB and tell fdisk that it's an LVM physical volume, format it
> using jfs, and just lvextend? I understand most of that, but what's the jfs
> formatting command? 

If you didn't want to save any data on the 20GB drive, you would create 
one partion on the 80GB drive, set as type LVM (8e).  Once the partion 
is created, you would add the partion to be a physical volume "pvcreate 
<drive partition>".  Then you would need to add this physical volume 
into your already created volume group "vgextend <volume group> <drive 
partition>".  From here i'm not exactly sure if you were to add the 80GB 
into the logical volume, that when you remove the 20GB it might 
automatically copy over the data... if you don't care one way or the 
other, I would remove the 20GB drive from the vg, by issuing a "vgreduce 
<20GB drive>" then check how many extents are left in the volume group 
with "vgdisplay" (look for "free PE / Size") first number is the 
extents, second is the size.  Then, run "lvextend -l <number of free 
extents> <logical volume>".  Then you would need to extend your JFS file 
system.  I don't have any so I don't know the command for this, however, 
it probably starts with "jfs"  (least thats how ext2/3 [ext2online] and 
xfs's [xfs_growfs] tools are named)

I've used <drive partion> as substitues for the actual device, for me 
its /dev/sda, and my volume group is VolGroup01, a logical volume would 
be /dev/VolGroup01/HOME which is mounted as my /home partion.

Hope that helps,
Mitch


More information about the mythtv-users mailing list