1. Bicom Systems
  2. Solution home
  3. SERVERware
  4. HOWTOs SERVERware 5

HOWTO :: Manually re-size VPS

If extending storage in GUI fails and the storage bar indicator is unchanged, we have to extend VPS storage manually. To do this log on to the processing host where VPS is running.

 

1. Find out mount point and size of the VPS - name of VPS is PBX

 

 

 Processing ~ # df -h

  Filesystem       Size Used Avail Use% Mounted on

  devtmpfs         10M   0  10M  0% /dev

  tmpfs          16G   0  16G  0% /dev/shm

  tmpfs          16G 1.2M  16G  1% /run

  SYSTEM-a756/rootfs    13G 4.7G 8.4G 36% /

  cgroup_root       10M   0  10M  0% /sys/fs/cgroup

  SYSTEM-a756/rootfs/log 2.0G  61M 2.0G  3% /var/log

  overlayfs        16G   0  16G  0% /usr/portage 

  /dev/sdb         99G  50G  45G 53% /home/lxc/pbx/.volume


  

 

2. Unmount VPS volume to be able to run filesystem check. It's necessary to unmount the block device.

 

  

Processing ~ # umount /home/lxc/pbx/.volume

Processing ~ # umount /home/lxc/pbx/rootfs


 

3. Run filesystem check for ext4 to make sure that there are no errors and to prepare volume for resize.

 

  Processing ~ # e2fsck -fy /dev/sdb

  e2fsck 1.44.5 (18-Dec-2019)

  Pass 1: Checking inodes, blocks, and sizes

  Pass 2: Checking directory structure

  Pass 3: Checking directory connectivity

  Pass 4: Checking reference counts

  Pass 5: Checking group summary information

  /dev/sdb: 83296/6553600 files (1.4% non-contiguous), 13404494/26214400 blocks


 

4. Resize volume

 

  

Processing ~ # resize2fs /dev/sdb

resize2fs 1.45.4 (18-Dec-2019)

Resizing the filesystem on /dev/sdb to 369898 (4k) blocks.

The filesystem on /dev/sdb is now 369898 blocks long.

 


 

5. Attach VPS (it will be mounted automatically)

 

Processing ~ # sw vps-attach -n PBX

VPS 'PBX' attached successfully


 

6. Login to GUI and start your VPS