How to attach Block Storage on a Ubuntu 16.04 ISPConfig Server

How to add more storage for a client in ISPConfig on a Digital Ocean Server

Here just a quick How To video to show you how you can attach additional SSD Storage a ISPConfig client.

This scenario is just great when a client has already hosted something on your server, and wants to have some extra storage for his hosting account. Another useful thing is, when you want to have separate disks, which you can expand just as you need, for www or for vmail in ISPConfig.

So the first thing you want to do, is to stop apache with:

service apache2 stop

then just run a quick check for your clients directory with:

ls -lah /var/www/clients/

Then you want to create a new directory in /tmp/ (or any other directory of your choice) with:

mkdir /tmp/client-x-back

and then, after you have checked everything, and all things are fine, you can copy your clients files over to the folder in tmp with:

rsync -av /var/www/clients/client1/ /tmp/client-x-back/


ls -lah /tmp/client-x-back/

You can take a look at the files you have copied over.

Then open your droplet in Digital Ocean, click on Volume, and create one. And then you can attach the Block Storage with this single line:

sudo mount -o discard,defaults /dev/disk/by-id/scsi-0DO_Volume_client1 /var/www/clients/client1; echo /dev/disk/by-id/scsi-0DO_Volume_client1 /var/www/clients/client1 ext4 defaults,nofail,discard 0 0 | sudo tee -a /etc/fstab

Please make really sure you adjust this line to your needs. Afterwards, you can copy back your clients files with:

rsync -av /tmp/client-x-back/ /var/www/clients/client1/

Rund a:

service apache2 start

to start Apache again, and you are good to go.

Leave a Reply

Your email address will not be published. Required fields are marked *