Sun 9 Dec 2007
LVM2 Guide
Posted by Internat under Debian, Linux
No Comments
Well i got a few more drives today for my file server, and one of the things i couldnt remember was how to add to the LVM device that exists that stores all my loot.
First off there is
pvdisplay
which shows you which physical drives are alocated to what volume group
lvdisplay
which gives you details about the actually logical volume, such as its status etc.
Now the part that initially tripped me up was forgetting to create the partition to LVM type on the raid
pvcreate /path/to/device
It’ll show up something like this
pvcreate /dev/md3
Physical volume “/dev/md3” successfully created
Next step is to add it to the existing group
vgextend /path/to/device
channel:/etc/lvm# vgextend vg00 /dev/md3
Volume group “vg00” successfully extended
Now that its in the volume group and its extended that group to incorporate all the devices, you need to extend the logical volume.
lvextend -l +536551 /dev/vg00/lv_space
Where 536551 is the extents listed as free as shwon by pvdisplay
Now that that is done, its just a matter of extending the file system..