- added the hard disk (it was a virtual hard disk in this case)
- created a partition and assigned it the lvm partition type id using fdisk
- created the physical volume
pvcreate /dev/sdb1 - created a volume group called system with the earlier created physical volume:
vgcreate system /dev/sdb1 - created a logical volume to take up all the free space
lvcreate -n storage -l 100%FREE system - created an ext3 file system on the logical volume
mkfs.ext3 /dev/system/storage - Made an entry in /etc/fstab
/dev/system/storage /storage ext3 defaults 1 2
Posts from work and out of work experiences. I have gained so much from the online community and hope some of this content will be of help to you.
Wednesday, July 20, 2011
Setting up the first LVM partition
Most of the LVM setups I have created have been done by the OS installer. I wanted to add more disk space to a server that did not have any LVM partitions setup. Below are the steps that I took:
Subscribe to:
Post Comments (Atom)
To add space to an existing lvm partition:
ReplyDeletepvcreate /dev/sdb
vgextend VolGroup0 /dev/sdb
lvextend -l +100%FREE /dev/VolGroup0/LogVol00
resize2fs /dev/VolGroup0/LogVol00