LVM basic
Article Number: 154 | Rating: Unrated | Last Updated: Sat, Jun 2, 2018 9:38 PM
SCAN a new disk
ls -l /sys/class/scsi_host/ grep mpt /sys/class/scsi_host/host?/proc_name fdisk -l echo "- - -" > /sys/class/scsi_host/host2/scan
OVERVIEW OF DISKS and PARTITIONS
lsblk
Summary of Volume Groups
vgs (Volume Group Status)
Summary of Logical Volumes
lvs (Logical Volume Status)
Volume Group
|
Logical Volume
|
vgdisplay vgdisplay vg_gsp_1 |
lvdisplay lvdisplay vg_gsp_1
|
vgextend vg_gsp_1 /dev/sdc1
vgreduce vg_gsp_1 /dev/sdc1
|
lvextend /dev/vg_gg1/lv_root /dev/sdc1 lvextend --size +2G /dev/vg_gsp_1/lv_gpdisk_1
lvreduce /dev/vg_gg1/lv_root /dev/sdc1
|
vgcreate vg_gsp_1 /dev/sdb1
|
lvcreate -L 6G -n lv_gpdisk_2 vg_gsp_1 lvcreate -n lv_gpdisk_2 -l 100%FREE vg_gsp_1 lvremove /dev/vg_gsp_1/lv_gspvol_001
|
| |
mkfs -t ext4 /dev/vg_gsp_1/lv_gpdisk_1
mkfs.xfs /dev/vg_gsp_1/lv_gpdisk_1 resize2fs /dev/vg_gg1/lv_root
|
SHRINK VOLUME
umount /gspmount1 resize2fs -p /dev/vg_gsp_1/lv_gspvol_001 1G e2fsck -f /dev/vg_gsp_1/lv_gspvol_001 resize2fs -p /dev/vg_gsp_1/lv_gspvol_001 1G lvreduce -L 1G /dev/vg_gsp_1/lv_gspvol_001 mount /dev/vg_gsp_1/lv_gspvol_001 /gspmount1
INCREASE ROOT
vgdisplay vg_rhce lvdisplay vg_rhce vgextend vg_rhce /dev/sdc1 lvextend /dev/vg_rhce/lv_root /dev/sdc1 lsblk df -h resize2fs /dev/vg_gg1/lv_root or xfs_growfs /dev/vg_gg1/lv_root df -h
|
Posted - Sat, Jun 2, 2018 9:38 PM. This article has been viewed 3021 times.
Filed Under:
Linux
There are no attachments for this article.
There are no comments for this article. Be the first to post a comment.
Related Articles

www.unixarena.com
Viewed 3193 times since Fri, Jul 27, 2018
How to create stunnel with systemd? stunnel
Viewed 12118 times since Thu, Jan 16, 2020
What UUIDs can do for you
Viewed 2737 times since Tue, Jul 17, 2018
RHEL: Services basic management - systemd
Viewed 20356 times since Sat, Jun 2, 2018
Understanding logrotate utility part 1
Viewed 2684 times since Fri, Nov 30, 2018
Deskshare TLS over Stunnel
Viewed 3671 times since Fri, Sep 28, 2018