Hi,

I Apologise if this has already been discussed. I couldn't find any information already on the forum about this.

My server is running out of space and to increase the storage I now have to power it off, increase the disk size and resize it. This will cause downtime.

I probably do have plenty of space I just need to clear up my server.

However, it got me thinking. Is there or will there be an option to choose where to store website data?

I was considering adding additional block storage to my server which would then remove the need to manually resize my server's disk.

All website data is stored in /var/www - this can be a separate partition or mount point. If you have an existing server and you want to move /var/www to it, this is possible manually. Something like this. These instructions were hand written by me and might contain errors - make sure you understand the commands you are running and check your backups before proceeding.

Firstly, stop services:

systemctl stop enhcontrold
systemctl stop appcd
systemctl stop docker

Now rename the old /var/www and make an empty /var/www in its place

mv /var/www /var/www_old
mkdir /var/www

Now attach the new storage with the cloud provider. You should see its device path in the output of lsblk. Edit /etc/fstab and create a new mount for the new storage on /var/www. Example:

/dev/sdc /var/www defaults 0 0

You may also want to add the _netdev option.

Now move the website data back

mv /var/www_old/* /var/www/

And lastly start your services up:

systemctl start docker
systemctl start appcd
systemctl start enhcontrold
Write a Reply...
Follow @enhancecp