SSH access - Reallocate disk space

I understand that this is a question that is asked quite often, but unfortunately most answers involve using a LiveCD which in this case isn't possible. I'm currently using a dedicated server running Ubuntu 14.04 LTS on a host that allocates most of the disk space to the /home directory. Unfortunately, I have run out of disk space on the root directory, effectively breaking my server. My conundrum is that I already have quite a bit of data set up on the server, making it difficult to back everything up locally and reinstall the dedicated server using a better allocation.

Essentially what I'm looking for is a way to allocate everything currently on the .home directory to the / directory. From what I've read, there's no way to reallocate disks while in operation, so I really don't know where to go from here. My host does offer a "Rescue Mode" which appears to create a temporary virtual machine that mounts the current file tree in a /mnt directory, but I'm not too sure if I can repartition the disk through that. It also has an option to "Netboot", which I haven't tried yet but is always a possibility.

I am not too sure where to go from here, so any help you can provide would be much appreciated!


Ideally you should add another disk and migrate parts of your system to that but you might not get that option with your hosting solution.

As an emergency measure you could create a loopback partition in your /home folder and the mount it for use as one of the other folders like var or usr. This is a security issue as it potentially gives your user account root access so make sure you don't put the loopback on a webroot or otherwise share location.

How to make loopbacks http://www.walkernews.net/2007/07/01/create-linux-loopback-file-system-on-disk-file/

Then edit your /etc/fstab file and add an entry mounting the loopback in the right place then copy the files over to it.

Ultimately this will probably make your server worse for anyone else to understand and will negatively effect performance under heavy load . This is a bizarre reallocation of disk space, the proper solution is to deploy your system with LVM which abstracts the partitioning of disks so that you can mostly reallocate on the fly.