More disk space...
Submitted by dave on Fri, 07/06/2018 - 15:20
Method 1 : Add a u01 on /dev/sdb
If you need more disk space it looks like the EL Linux VMs were supplied with an extra unmounted disk. It is available at /dev/sdb but not partitioned. To make use of it:
# View partition info vagrant ssh su cat /proc/partitions parted -l
# Partition the unused drive fdisk /dev/sdb n p 1 enter enter w
# format mkfs.ext4 /dev/sdb1
# mount it mkdir /u01 mount /dev/sdb1 /u01
# update fstab /dev/sdb1 /u01 ext4 defaults 0 0
Method 2 : Add Swap via LVM
Format the raw device
fdisk /dev/sdb n p 1 "enter" "enter" t 8e w q fdisk -l
Increase the Logical Volume
pvdisplay lvmdiskscan pvcreate /dev/sdb1 vgdisplay vgextend vg_main /dev/sdb1 pvscan lvdisplay lvextend /dev/vg_main/lv_swap /dev/sdb1
Turn Swap off/on to Use new space
swapoff -v /dev/vg_main/lv_swap mkswap /dev/vg_main/lv_swap swapon -va swapon -s
https://www.rootusers.com/how-to-increase-the-size-of-a-linux-lvm-by-adding-a-new-disk/
https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s2-swap-extending-lvm2.html