Linux - Ubuntu - Resize partition - OVH.txt
# Stop running services to prevent data modification or alerts
service monit stop
service munin-node stop
service apache2 stop
service mysql stop
# Continuously unmount the required partition, as OVH automatically remounts it when running fdisk
# Run this in tmux or open a new terminal
while true; do clear; umount /dev/sdb1; mount; sleep 1; done
# Increase the disk size on OVH's control panel
# Delete and recreate the partition. DO NOT DELETE THE EXT4 SIGNATURE!
fdisk /dev/sdb
# Verify the partition
e2fsck -f /dev/sdb1
# Resize the filesystem
resize2fs /dev/sdb1
# Stop the script that unmounts the partition, and mount it
mount /dev/sdb1 /var/www
# Restart services
service mysql start
service apache2 start
service munin-node start
service monit start
# Check that eveything works