2026-03-12 21:01:38
This commit is contained in:
31
tiddlywiki/LVM - create PV_VG_LV and file system.txt
Executable file
31
tiddlywiki/LVM - create PV_VG_LV and file system.txt
Executable file
@@ -0,0 +1,31 @@
|
||||
# display device informations
|
||||
fdisk -l /dev/xvdf
|
||||
|
||||
# create PV and VG
|
||||
pvcreate /dev/xvdf
|
||||
vgcreate vg_fra /dev/xvdf
|
||||
|
||||
vgdisplay vg_fra -v
|
||||
|
||||
# create LV using 100% of free space in the VG
|
||||
lvcreate -n lv_fra -l 100%FREE vg_fra
|
||||
|
||||
# extend LV using 100% of free space in the VG
|
||||
lvextend -l +100%FREE /dev/vg-test/lv-test
|
||||
|
||||
# create XFS file system on LV
|
||||
mkfs.xfs /dev/vg_fra/lv_fra
|
||||
|
||||
# mount the file system
|
||||
mkdir -p /fra
|
||||
mount /dev/vg_fra/lv_fra /fra
|
||||
|
||||
df -hT /fra
|
||||
|
||||
# fstab entry
|
||||
/dev/mapper/vg_fra-lv_fra /fra xfs defaults 1 1
|
||||
|
||||
|
||||
umount /fra
|
||||
mount -a
|
||||
df -hT
|
||||
Reference in New Issue
Block a user