VirtualBox

2020-09-25

  • 1 Increase size for /dev/mapper/centos-root
  • 2 Access Shared Folder

1 Increase size for /dev/mapper/centos-root

Situation: Host is Windows 10, Guest is CentOS 7. First make sure VirtualBox in Windows 10 has been given enough space. Then execute commands to increase the size.

  • vgdisplay shows the size available to create or extend logical volumes.
  • Extend the volume: lvextend /dev/mapper/centos-root -L +2G.
  • Extend the file system: xfs_growfs /dev/centos/root.
  • Use df -h to check the results.

how to increase the size for /dev/mapper/centos-root?

resize2fs: Bad magic number in super-block while trying to open

2 Access Shared Folder

sudo usermod -G vboxsf -a jcshi

Then log out and log in for it to take effects.

.
Created on 2020-09-25 with pandoc