Mounting
root@caleston-lp10:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root vagrant-vg -wi-ao---- <9.04g
swap_1 vagrant-vg -wi-ao---- 980.00m
root@caleston-lp10:~# pvdisplay
--- Physical volume ---
PV Name /dev/vda1
VG Name vagrant-vg
PV Size <10.00 GiB / not usable 2.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 2559
Free PE 0
Allocated PE 2559
PV UUID ecXq0T-x7d2-Hma9-rS1w-Mi02-st3y-EqIoiW
root@caleston-lp10:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 252:0 0 10G 0 disk
└─vda1 252:1 0 10G 0 part
├─vagrant--vg-root 253:0 0 9G 0 lvm /
└─vagrant--vg-swap_1 253:1 0 980M 0 lvm [SWAP]
vdb 252:16 0 1G 0 disk
vdc 252:32 0 1G 0 disk
root@caleston-lp10:~# sudo pvcreate /dev/vdb
Physical volume "/dev/vdb" successfully created.
root@caleston-lp10:~# sudo pvcreate /dev/vdc
Physical volume "/dev/vdc" successfully created.
root@caleston-lp10:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 252:0 0 10G 0 disk
└─vda1 252:1 0 10G 0 part
├─vagrant--vg-root 253:0 0 9G 0 lvm /
└─vagrant--vg-swap_1 253:1 0 980M 0 lvm [SWAP]
vdb 252:16 0 1G 0 disk
vdc 252:32 0 1G 0 disk
root@caleston-lp10:~# pvs
PV VG Fmt Attr PSize PFree
/dev/vda1 vagrant-vg lvm2 a-- <10.00g 0
/dev/vdb lvm2 --- 1.00g 1.00g
/dev/vdc lvm2 --- 1.00g 1.00g
root@caleston-lp10:~# sudo vgcreate caleston_vg /dev/vdb /dev/vdc
Volume group "caleston_vg" successfully created
root@caleston-lp10:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 252:0 0 10G 0 disk
└─vda1 252:1 0 10G 0 part
├─vagrant--vg-root 253:0 0 9G 0 lvm /
└─vagrant--vg-swap_1 253:1 0 980M 0 lvm [SWAP]
vdb 252:16 0 1G 0 disk
vdc 252:32 0 1G 0 disk
root@caleston-lp10:~# pvs
PV VG Fmt Attr PSize PFree
/dev/vda1 vagrant-vg lvm2 a-- <10.00g 0
/dev/vdb caleston_vg lvm2 a-- 1020.00m 1020.00m
/dev/vdc caleston_vg lvm2 a-- 1020.00m 1020.00m
root@caleston-lp10:~# sudo lvcreate -L 1G -n data caleston_vg
Logical volume "data" created.
root@caleston-lp10:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 252:0 0 10G 0 disk
└─vda1 252:1 0 10G 0 part
├─vagrant--vg-root 253:0 0 9G 0 lvm /
└─vagrant--vg-swap_1 253:1 0 980M 0 lvm [SWAP]
vdb 252:16 0 1G 0 disk
└─caleston_vg-data 253:2 0 1G 0 lvm
vdc 252:32 0 1G 0 disk
└─caleston_vg-data 253:2 0 1G 0 lvm
root@caleston-lp10:~# sudo mkdir /mnt/media
root@caleston-lp10:~# sudo mkfs.ext4 /dev/mapper/caleston_vg-data
mke2fs 1.44.1 (24-Mar-2018)
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: 187bba4b-326c-401a-a715-dc6f443db9cc
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
root@caleston-lp10:~# sudo mount /dev/mapper/caleston_vg-data /mnt/media/
root@caleston-lp10:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 252:0 0 10G 0 disk
└─vda1 252:1 0 10G 0 part
├─vagrant--vg-root 253:0 0 9G 0 lvm /
└─vagrant--vg-swap_1 253:1 0 980M 0 lvm [SWAP]
vdb 252:16 0 1G 0 disk
└─caleston_vg-data 253:2 0 1G 0 lvm /mnt/media
vdc 252:32 0 1G 0 disk
└─caleston_vg-data 253:2 0 1G 0 lvm /mnt/media
root@caleston-lp10:~# sudo lvresize -L +500M -n /dev/mapper/caleston_vg-data
Size of logical volume caleston_vg/data changed from 1.00 GiB (256 extents) to <1.49 GiB (381 extents).
Logical volume caleston_vg/data successfully resized.
root@caleston-lp10:~# sudo resize2fs /dev/mapper/caleston_vg-data
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/mapper/caleston_vg-data is mounted on /mnt/media; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/mapper/caleston_vg-data is now 390144 (4k) blocks long.
root@caleston-lp10:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 252:0 0 10G 0 disk
└─vda1 252:1 0 10G 0 part
├─vagrant--vg-root 253:0 0 9G 0 lvm /
└─vagrant--vg-swap_1 253:1 0 980M 0 lvm [SWAP]
vdb 252:16 0 1G 0 disk
└─caleston_vg-data 253:2 0 1.5G 0 lvm /mnt/media
vdc 252:32 0 1G 0 disk
└─caleston_vg-data 253:2 0 1.5G 0 lvm /mnt/media
---------------------------
Comments
Post a Comment