[mythtv-users] Adding a second disk to current LVM

Mathew Mrosko mythtv at matmrosko.com
Fri Jun 24 01:38:43 UTC 2005

On Thursday 23 June 2005 06:27 pm, A JM wrote:
> I've read the docs with regard to adding a second hard drive to an
> existing LVM group and I need some clarification and maybe a slight
> how to.
> The VG "VGforMyth" has been created and is working fine. I've added a
> second hard drive and have created a primary partition on the drive
> using the entire disk and have changed the Hex code to 8e so I think
> the drive is about ready.
> Here is my confusion, according to the docs I'm supposed use
> "pvcreate" to create the PV then "vgextend" to add the volume to the
> group, is that it? Don't I need to tell the VG that it's been enlarged
> or something?

There are other parts of the docs that say once you add it to the vgextend you 
need to resize it to include all "PE" portions to make the size bigger.  Some 
say to just keep resizing it bigger until it is full, but look for the 
command (i think it's pvdisplay) and the line that has "Total PE: XXXXX" will 
be your key to make it use the whole drive.  This is in the LVM HOWTO.

> This drive has not been formatted so doesn't that process also need to
> take place? I've never seen an OS that could write to a drive not
> formatted and I don't see mention of that in the docs?

IIRC pvcreate puts the info on the drive that the LVM will need, as far as the 
XFS stuff, read on!

> > My original  
> drive in the VG is formatted with XFS so I assumed I would need to
> format the new drive the same?

The new drive will be ready for XFS when you run the command to GROW the xfs 
size.  One of the great things about XFS is that you can leave it mounted 
when you grow the FS.  This is also in the HOWTO.

> Thanks for any light you can shed.
Sorry it wasn't too technical, and sort of "RTFM" format, but still, I hope 
that helps!

mythtv [at] matmrosko [dot] com

More information about the mythtv-users mailing list