How to resize main filesystem

If we consider /dev/vda and /dev/sdb as different (physical) disks, this is not easily achievable, to the point that it would be much easier to reinstall the server from scratch and put / into a LVM volume from the start.

If absolutely necessary, this could be done with a lengthy downtime and lots of knowledge about what you need to do. It would be quite error-prone though and I would not recommend to even try.

/dev/vda suggests this is some kind of virtual system. Depending on what the underlying system allows, it might be possible to resize the disk image providing /dev/vda (and if necessary, delete/shrink the image providing /dev/sdb). Talk to your admin/provider. In that case, after the system picks of the larger size of /dev/vda, you could extend /dev/vda1 and then grow the / file system.


I very much doubt that this is literally possible. But what you could do is move files or folders from /dev/vda1 to /dev/sdb and then make them appear in the same place on /dev/vda1 afterward. This would have the effect of increasing the available space on /dev/vda1.

For example, a simple solution would be to move the contents of /var, /home, /opt, or /usr to /dev/sdb and then mount /dev/sdb as whichever folder you moved. That is a pretty common way to handle this. Be careful with /sbin and /root, as they may need to exist before /dev/sdb is mounted in your setup. You would do this by changing the fstab (which may be done via a tool in your setup).

You could also partition /dev/sdb (I presume). Then you could mount it as more than one directory. This would involve adding entries to the fstab.

A third option would be to move the files from /dev/vda1 to /dev/sdb and then symlink them such that they appear in the same place in the file structure. You would often put these symlinks at the folder level. E.g. something like

ln -s /mnt/volume_nyc3_01/usr /usr

You would do this as root (possibly with sudo). This would allow you to put arbitrary folders or files on /dev/sdb while still accessing them at the same place in the file system. I presume you already know how to use du to find which files and folders are taking up the most space.