Install pakage LVM dist based in debian
apt install lvm2
Create partition LVM type 8e
cfdisk /dev/sdb
or
fdisk
Create phisical volume
pvcreate /dev/sdb1
Create Group Volume
vgcreate vg /dev/sdb1
Extends group volume
vgextend vg /dev/sdb1
Create logical volumen
lvcreate testing -L 1.99G -n storage
Make system file ext4
mkfs.ext4 /dev/mapper/testing-storage
Add automount fstab
vi /etc/fstab
add next line
/dev/mapper/testing-storage /storage ext3 defaults 0 2
note check if filesytem is ext
lvextend -L+931GB /dev/vg/lv_home
Extend the ext4 file system
resize2fs /dev/vg/lv_home
if next error
resize2fs: Bad magic number in super-block while trying to open
Check your file system
If your filesytem is xfs run
xfs_growfs /dev/mapper/centos-root
Check with
df -lh
0 Comments