How do you increase disk file system with vyos?


#1

So in our setup, we use VMware esxi and the vyos router is setup as a guest.

How do we tell vyos to increase its disk allocation after doing the disk increase in VMware.


#2

Found this as vyos is on debian linux version, this should work, need to test this out


#3

Tested this in test lab, vyos 1.1.7 as virtual guest on Vmware ESXi 5.5 host with objective of increasing the Disk size from 4GB to 8GB.
Reference:


https://communities.vmware.com/thread/492752?start=0&tstart=0

a. Vyos router disk space – 4GB uses /dev/sda1

b. Log into vyos console - Take note of the start and end cylinders
• fdisk -l
c. Increase the VM disk space from 4GB to 8GB
• Select the VM
• Select Settings
• Change the harddisk size(G) from 4 to 8
• Click ok

d. Take a vmware disk snapshot, as a backup

e. Login via root – some commands don’t work on sudo

f. Rescan the Disk in root
• First identify the scsi disk
ls /sys/class/scsi_device
ls /sys/class/scsi_disk/
2:0:0:0
i. The scsi disk is 2:0:0:0
• Rescan the Disk
• echo 1 > /sys/class/scsi_device/2:0:0:0/device/rescan
g. Recheck the disk size
• fdisk -l

h. Delete the existing partion
• fdisk /dev/sda
• p (print partition)
• d (delete partition)
• p (print partition)

i. Create a new partition and take note of the Start and increase the End cylinder
• n (create a new partition)
• p (select primary)
• 1 (select 1 since this only partition)
• 2 (this first cylinder saw in b) )
• 12191 (last cylinder - 1 )
• w (press w for writing change)

j. Recheck the partition by running partprobe; if there is an error – just reboot
• partprobe - In our case the device busy so this requires a reboot

k. Reboot & relogin
• reboot

l. Confirm that partition size
• partx /dev/sda

m. Tell the Linux Kernel about the Change in disk size
• resize2fs /dev/sda1

n. Reconfirm the increase disk size
• df –h (the Disk increased to 8GB)


#4

I would just spin up the machine using gparted live CD http://gparted.org/livecd.php
Simply resize data partition in gui, and apply changes