Professional Documents
Culture Documents
Configuring LVM Redhat
Configuring LVM Redhat
com/manage-and-create-lvm-parition-using-vgcreate-lvcreate-and-
lvextend/
1. First create physical volumes on top of the disks /dev/sdb, /dev/sdc do:
lvs
lvdisplay
5. mount the LV
mount /dev/vg00/vol_projects /projects
mount /dev/vg00/vol_backups /backups
-------
resizge LV
# lvreduce -L -2.5G -r /dev/vg00/vol_projects ====> this will unmount the LV
# lvextend -L +2G -r /dev/vg00/vol_backups ====> this is online
# lvextend -l +100%FREE -r /dev/vg00/vol_backups
It is important to include the minus (-) or plus (+) signs while resizing a logical
volume. Otherwise, you’re setting a fixed size for the LV instead of resizing it.
-----
extend VG by adding additional disks (Physical volumns)
-----
Mounting Logical Volumes on Boot and on Demand
# blkid /dev/vg00/vol_projects
# blkid /dev/vg00/vol_backups
add to /etc/fstab
UUID=b85df913-580f-461c-844f-546d8cde4646 /home/projects ext4 defaults 0 0
UUID=e1929239-5087-44b1-9396-53e09db6eb9e /home/backups ext4 defaults 0 0
# mount -a
=====
crate LV snapshot
lvcreate -L 10GB -s -n vol_projects_snap /dev/vg00/vol_projects
this will create a snapshot for the LV (it is very very fast, instaniouns)