How to use soft link to resolve disk space issue - CloudMinister

Hello,

One of my client is facing disk space issue on his Cheap Linux VPS Server but disk space is still available there in another partition.

He asked me for help.
I checked disk space on his server and I got below results:
root@server [~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_server-lv_root 50G 45G 2.5G 95% /
tmpfs 7.8G 0 7.8G 0% /dev/shm
/dev/sda1 477M 77M 376M 17% /boot
/dev/mapper/vg_server-lv_home 860G 2.7G 814G 1% /home

In this tutorial I am going to use /var folder disk space in /homefolder with the help of soft link concept
As we can see that space is available more then 800GB in /home partition but we are facing issues in / partition due to log folder is making disk space full in / partition.

The client asked me why his Reliable Managed Linux VPS Server is crashed again and again due to a space issue his backup is also failing due to this.

I explained to him that there are only 50 GB of space is assigned to / directory and it’s already full.
There are 2 ways to resolve this issue.

One that he reassign space from /home to /.

but it creates some issue server down, data loss and he is already don’t have a backup for more than 1 week.

So we decided to use another solution
We used soft link as a solution we moved his /var/log folder to /home/var/ directory and then created soft link form /var/log to /home/var/log to resolve his issue.

here is the standard command to create the soft link:
ln -s path-to-actual-folder name-of-link

to confirm, do:
ls -ld name-of-link

We ran the following command on the server to create soft link:
ln -s /home/var/log/ log

then we verified it with the command:
root@server [/var]# ls -ld log
lrwxrwxrwx 1 root root 14 Jun 16 03:03 log -> /home/var/log/

we have restarted all services on his server and also check his website everything is working fine.

Learn how to scale, manage, and optimize your applications with a SLB. Read our solution brief "Get More from Your Enterprise Network".

DOWNLOAD SOLUTION BRIEF

Get started with CloudMinister Today