silver hard drive interals

Resizing Filesystems

As my personal website at box.buoyantair.co grows, I am trying to keep up with the amount of data that is being uploaded by me or the applications that generate the data (TTRSS for example). This is the process I use to resize my filesystem once I upgrade the volume size in Hetzner. I hope you like this little code snippet!

  1. use df -aTh to list all the mounted file systems, and find the filesystem you want to resize.
df -aTh
  1. Unmount the filesystem you want to resize.
sudo umount /dev/sdb
  1. Run e2fschk to check the filesystem.
sudo e2fsck -f /dev/sdb
  1. Run resize2fs to resize the filesystem.
sudo resize2fs /dev/sdb
  1. Mount the filesystem again.
sudo mount /dev/sdb /mnt/
  1. Verify that the filesystem is resized.
df -aTh
en_USEnglish