Create lvm step by step
Create LVM
In this example /dev/sdc is used which is 3G
Step 1: Creating physical volume (pv)
- Command to create pv is "pvcreate /dev/sdc"
- Command to verify the pv is "pvs"
Step 2: Creating volume group (vg)
- Command to create vg is "vgcreate <vgname> </dev/sdc>"
- Command to verify the vg is "vgs"
Step 3: Creating logical volume (lv)
- Command to create lv is "lvcreate -n <lvname> -L 1G <vgname>"
-n specify the logical volume
-L absolute value
After creating lv thats how its looks
Step 4: Create file system using xfs or ext4,ext3
Create file system on lvm using xfs or ext
Step 5: Mount persistently in /etc/fstab
In /etc/fstab entry will be like
</dev/datavg/datalv> </mnt/datalvm> <xfs> defaults 0 0
Follow this link to know about whats is lvm & why we create it:
https://linuxgeekseasywords.blogspot.com/2022/09/what-is-logical-volume-manager-lvm-and.html
very helpful
ReplyDeleteMuchas Gracias! As a beginner, I appreciate how clear and
ReplyDeletestraight to the point Thumbs up👍🏻