command pvcreate,vgcreate,lvcreate,lvextend
First go the hard disk
#fdisk /dev/hda
Press n to create the 3 new partitions each of 100Mb in size.
Press p to see the print partition table.
Press t to change the partition id of all the three partitions created by you to 8e (Linux LVM).
8e represent as the Linux LVM Files system. So create LVM.
Press wq to save and exit from fdisk utility in linux.
Use fdisk -l to list the partition table.
Pvcreate Syntax
#pvcreate [device path]
Vgcreate Syntax
#vgcreate [vgdevice path] [pdevice path]
Lvcreate Syntax
#lvcreate -L [SIZE] -n [lvdevicename] [Volume-Group path]
Lvextend lvreduce Syntax
#[lvexted|lvreduce] -L [SIZE] [DEVICEPATH]
Create LVM using Pvcreate command
# pvcreate /dev/hda6 /dev/hda7 /dev/hda8
# pvdisplay
#vgcreate /dev/vg0 /dev/hda6 /dev/hda7 /dev/hda8
#vgdisplay vg
#lvcreate -L +10M -n lv0 /dev/vg0
-L is used to define Logical Volume size.
-n is used to define the name.
By using mkfs command create ext3 file system
#mkfs.ext3 /dev/vg0/lv0
#lvdisplay /dev/vg0/lv0
#mkdir disk
#mount /dev/vg0/lv0 /mnt
#df -h disk
LVM Reduce Extended
http://studentwebsite.blogspot.com/2010/05/lvm-extend-reduce-lvextend-lvreduce.html Linux redhat RHEL 5
NOTE:
1)b -block device with partition without FS c-character device raw device parition with FS.2)/dev/emcpowera - it is Storage Device
0 Comments