lvm:increase_the_capacity_of_an_lvm_volume_group
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
lvm:increase_the_capacity_of_an_lvm_volume_group [2016/07/07 10:46] – [Troubleshooting] peter | lvm:increase_the_capacity_of_an_lvm_volume_group [2019/11/30 13:50] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== LVM - Increase the capacity of an LVM volume group ====== | ||
- | |||
- | To increase the capacity of an existing LVM volume group by adding more physical volumes. | ||
- | |||
- | Suppose that /dev/vg01 is a volume group composed of three 100GB physical volumes, giving it a total capacity of 300GB. | ||
- | |||
- | The existing physical volumes are named /dev/sda, /dev/sdb and / | ||
- | |||
- | ===== Prerequisites ===== | ||
- | |||
- | With older versions of LVM it was necessary for physical volumes to be explicitly initialized using **pvcreate** before being added to a volume group. | ||
- | |||
- | ===== Method ===== | ||
- | |||
- | Physical volumes can be added to a volume group using the **vgextend** command: | ||
- | |||
- | <code bash> | ||
- | vgextend vg01 /dev/sdd /dev/sde | ||
- | </ | ||
- | |||
- | The first argument is the name of the volume group to be extended. | ||
- | |||
- | If successful you should see a response of the form: | ||
- | |||
- | < | ||
- | Volume group " | ||
- | </ | ||
- | |||
- | If the physical volumes have not previously been initialized using **pvcreate** then there will be some additional diagnostic messages, for example: | ||
- | |||
- | < | ||
- | No physical volume label read from /dev/sdd | ||
- | Physical volume "/ | ||
- | No physical volume label read from /dev/sde | ||
- | Physical volume "/ | ||
- | Volume group " | ||
- | </ | ||
- | |||
- | ===== Testing ===== | ||
- | |||
- | You can check the new capacity of the volume group using the **vgs** command: | ||
- | |||
- | <code bash> | ||
- | vgs vg0 | ||
- | </ | ||
- | |||
- | This should give a response of the form: | ||
- | |||
- | < | ||
- | VG #PV #LV #SN Attr | ||
- | vg01 5 | ||
- | </ | ||
- | |||
- | ===== Next steps ===== | ||
- | |||
- | The extra capacity added to the volume group should now be available for use, either by creating new logical volumes or by expanding the size of existing ones. In the latter case, if the logical volume contains a filesystem then you will probably want to expand that too. See: | ||
- | |||
- | Increase the size of an LVM logical volume | ||
- | Increase the size of an ext2, ext3 or ext4 filesystem | ||
- | for details of some of these processes. | ||
- | |||
- | See also | ||
- | |||
- | Replace one of the physical volumes in an LVM volume group | ||
- | |||
- | |||
- | ===== Troubleshooting ===== | ||
- | |||
- | * [[LVM: | ||
lvm/increase_the_capacity_of_an_lvm_volume_group.1467888389.txt.gz · Last modified: 2020/07/15 09:30 (external edit)