Creating lvm – how to make partition
How to make partition on free existing volume group.
vgdisplay /dev/vg01
— Volume group —
VG Name vg01
VG Access read/write
VG Status available/resizable
VG # 0
MAX LV 256
Cur LV 6
Open LV 6
MAX LV Size 2 TB
Max PV 256
Cur PV 1
Act PV 1
VG Size 278.81 GB
PE Size 32 MB
Total PE 8922
Alloc PE / Size 1825 / 57.03 GB
Free PE / Size 7097 / 221.78 GB
1- create Logical volume
lvcreate -L 40G -n dbdir vg01
2- Format the new volume with a file system
mkfs.ext3 /dev/vg01/dbdir
3- Create a mount point on your system
mkdir /oracle10
4- mount the new drive
mount /dev/vg01/dbdir /oracle10
5- Create a fstab entry to mount it properly after reboots
vim /etc/fstab
put the following entry
/dev/vg01/dbdir /oracle10 ext3 defaults 0 0
save the file and exit
Note:Please backup your /etc/fstab before doing this
Note: to test that you did not do any mistakes run the following command
mount -a
you should get back to the prompt with no errors
Category: Linux Administration
