Create LVM Partition Linux
Scan Disk RHEL 6
echo “- – -” > /sys/class/scsi_host/host0/scan
Create Partition
#fdisk /dev/sdb
pilih option “n”
pilih option “p”
pilih option “w”
Crete Physical Volume LVM
#pvcreate /dev/sdb
Create Volume Group LVM
#vgcreate -s 256 U01VG /dev/sdb
Create Logical Volume LVM
#lvcreate -n U01LV -l 100%FREE U01VG
Format Partition
#mkfs.xfs /dev/U01VG/U01LV
Mounting Partition
#mkdir /u01
#mount /dev/U01VG/U01LV /u01
#vi /etc/fstab
add this line :
/dev/mapper/U01VG-U01LV /u01 xfs defaults 0 0
Extend Volume Group
#vgextend rhel /dev/sdb
Extend Logical Volume
#lvextend -l 100% lvname
#lvextend -L +30G lvname
Resizing Mount Point
#xfs_growfs /dev/mapper/rhel-var_log
Rename Logical Volume Name
#lvrename /dev/vgdata/u01 /dev/vgdata/u02
Remove LVM Partition
#umount /u01
#lvremove /dev/vgdata/u01
#vgremove vgdata
#pvremove /dev/sdc