More LVM questions

Paul Howarth paul at city-fan.org
Thu Aug 4 07:30:04 UTC 2005


On Thu, 2005-08-04 at 00:55 -0600, Philip Prindeville wrote:
> If I just got an identical disk to /dev/sda (as /dev/sdb), and I want to
> create an identical /dev/sdb2 partition (to /dev/sda1) in size,

Use fdisk to create a partition with the same number of cylinders as
sda1.

> then
> create a logical volume as LogVol01 that's identical in size and
> properties to LogVol00 (which was created by the default install
> procedures) and then add it to VolGroup00, what are the steps
> to do this?

Create a physical volume on sdb2:
# pvcreate /dev/sdb2

Add sdb2 to Volume Group VolGroup00:
# vgextend VolGroup00 /dev/sdb2

Get details of LogVol00 (particularly size in extents (LE)):
# lvdisplay /dev/VolGroup00/LogVol00

Create LogVol01 with same size (n):
# lvcreate --extents n --name LogVol01 VolGroup00

That should do it. The default LogVol00 won't have any "special" options
and will fill the original partition sda1, so this procedure should
result in what you're after.

However, do you really want a separate logical volume rather than
extending LogVol00 to make it bigger?

Paul.
-- 
Paul Howarth <paul at city-fan.org>




More information about the fedora-list mailing list