-   Linux - Software (
-   -   extend physical volunes (

fusion1275 09-16-2010 01:10 PM

extend physical volunes
Hi there,

Is is possible to extend physical volume disk space from one to another?


PV VG Fmt Attr PSize PFree
/dev/sda1 Zeus-extra lvm2 a- 149.05G 17.05G
/dev/sdb1 Zeus-misc lvm2 a- 394.96G 274.96G

Could I get 50GB from /dev/sdb1 and add it to /dev/sda1 ???


MensaWater 09-16-2010 03:58 PM

Not exactly.

The purpose of LVM is to allow you to combine multiple physical volumes into a single Volume Group with vgcreate. At that point the Volume Group can be thought of as a hyperdisk which can be broken into multiple logical volumes with lvcreate (think of the lvs like partitions of the hyperdisk).

In the Linux LVM implementation what you CAN do is use real partitions of the physical disk as "physical disks" for pvcreate. That is to say instead of adding /dev/sda and /dev/sdb to the volume group you can first create partitions on /dev/sda so that you have /dev/sda1, /dev/sda2, /dev/sda3 etc... for as many as you need as well as /dev/sdb1, /dev/sbd2, /dev/sdb3 etc... You would do pvcreate on these partitions then use the partitions rather than the whole disk in your volume group. (e.g. You could put /dev/sda2 and /dev/sdb3 in VolGroup00, /dev/sda1 and /dev/sdb2 in VolGroup00 etc...).

It only makes sense to partition like that if:
1) You are making multiple Volume Groups or
2) You are using the other partitions for other purposes (e.g. making /dev/sda1 a boot partition and /dev/sdb2 the physical volume for your volume group).

That is to say you COULD make a volume group comprised of /dev/sda1 and /dev/sda2 but since they're on the same physical disk there is no reason to do it that way - you get no redundancy.

All times are GMT -5. The time now is 11:40 PM.