How to increase the storage space on VMWare for VXG Server
Option #1 - Expand an existing Hard Drive (SCSI)
1. First of all, turn off your Virtual machine with the VXG server if it was launched.
2. You need to expand the Hard Disk in VMWare WorkStation (Example: expand from 10Gb to 15Gb)
It will show a success message:
3. Power on the virtual machine and log in.
4. Check the disk size
# lsblk
(You can see that /sda changed from 10GB -> 15GB. Now we need to allocate /sda2 )
5. Resize dev/sda2 by parted (partition editor)
# parted
(parted) p
(parted) resizepart
(parted) 2 (your lvm volume)
(parted) 16.1GB (choose the same size as your Disk /dev/sda:)
(parted) quit
6. Apply these changes at the core level
# pvresize /dev/sda2
7. Find the PATH of our root lvm volume
# fdisk -l
8. Resize the root lvm volume
# lvextend -r -l +100%FREE /dev/mapper/cl-root
9. Check the new size of the lvm volume (cl-root)
# lsblk
10. Reboot the Virtual Machine
Option #2 - Add a new Hard Drive (SCSI)
This option allows using VXG Server on VMWare with 2 disks, one for storage and one for the system files.
1. First of all, turn off your Virtual machine with the VXG server if it was launched.
2. You need to add a Hard Drive in VMWare WorkStation
3. Turn on this virtual machine and log in.
4. Check your added disk
# lsblk
5. Install lvm if necessary
# yum install lvm2
For Ubuntu, Debian type of OS:
apt-get install lvm2
6. Mark your added PV (/sdb) disk for LVM
# pvcreate /dev/sdb
PV - Physical Volume
You can check your PV with:
# pvdisplay
7. Create a VG at your PV (/dev/sdb).
# vgcreate cl2 /dev/sdb
VG - Volume Group
“cl2” - enter the name of your VG
You can check your VG with:
# vgdisplay
8. Create an LVM disk with all free disk space from /sdb.
# lvcreate -l 100%FREE -n storage cl2
“storage” - enter the name of your LVM
“100%FREE” - allocate all free disk space to this new LVM
You can check your LVM with:
# lvdisplay
9. Create filesystem of your LVM (/dev/cl2/storage)
# mkfs.xfs /dev/cl2/storage
(you can use xfs or ext4 filesystem for storage)
10. Create a directory for storage mounting
#mkdir /storage
(from the root directory in our example)
11. Add your LVM to automounting. (edit fstab by vi editor)
# vi /etc/fstab
press “i” to start editing the file and add a string:
/dev/mapper/cl2-storage /storage xfs defaults 0 0
press “Esc” and then “ZZ” to save and exit the editor
12. Reboot your system
# reboot -n
13. Check your mounted LVM
# lsblk
14. You need to set the Storage of your VXG Server to your new LVM (/storage) on a separate disk.
Please find the full manual here.
In our case we need to:
a) Stop VXG Server if it was started.
# ./stop.sh
b) Copy your data to the new storage directory (if you need it) and remove the old docker volume for recordings
# docker volume rm vxg_server_record
c) Edit /docker-compose.override.yml file: (set your new PATH of LVM storage)
version: "3.3"
volumes:
record:
driver_opts:
type: none
o: bind
device: /storage
d) Start VXG Server
# ./start.sh