Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: M/s VIKASH TECH on August 17, 2021, 05:47:21 PM

Title: Which files should I remove to decrease the /dev/mapper/centos-root size.
Post by: M/s VIKASH TECH on August 17, 2021, 05:47:21 PM
I have went through the portal and have found ways to increase the size of /dev/mapper/centos-root partition.
But as of now I am not having proper arrangements to make a backup of the entire data and repartition the server.

Can anyone guide me, which files can I remove / delete to get free space in /dev/mapper/centos-root

Also, is there a command to get list of files in the partition.
#ls /dev/mapper/centos-root
shows only one file.

Do help me with a solution.
Title: Re: Which files should I remove to decrease the /dev/mapper/centos-root size.
Post by: Kirk on August 18, 2021, 11:47:47 PM
If you do not have a separate partition for /var/ you may find some old log files in /var/log/ you can delete to free up space.

There are some methods you can use to find the largest files\folders consuming disk space as well:
https://www.tutorialspoint.com/find-the-largest-top-10-files-and-directories-on-a-linux
Title: Re: Which files should I remove to decrease the /dev/mapper/centos-root size.
Post by: M/s VIKASH TECH on August 20, 2021, 12:57:07 PM
I tried deleting the logs and also moved the mysql to home directory, but it's worth peanuts. Only 7% of the usage came down.

Can anyone suggest something better. or a way to move the / root directory to /home directory
Title: Re: Which files should I remove to decrease the /dev/mapper/centos-root size.
Post by: studio4host on August 23, 2021, 08:11:08 AM
you need to check what exactly is taking your disk space...you shouldn't move things before knowing what is exactly the issue.

you can check disk space usage by using command like
Code: [Select]
du -hx --max-depth=1 /
du -hx --max-depth=1 /var/log
du -hx --max-depth=1 /var/lib/mysql
....
Title: Re: Which files should I remove to decrease the /dev/mapper/centos-root size.
Post by: Igor S. on August 25, 2021, 06:37:14 AM
I recommend you checking with the commands below. (Most of all problems with the folders.)
Code: [Select]
du -sh /usr/local/apache/logs/*
du -sh /usr/local/apache/domlogs/
du -sh /opt/alt/*
du -sh /backup/*
Title: Re: Which files should I remove to decrease the /dev/mapper/centos-root size.
Post by: apartamenti on October 19, 2021, 05:40:08 AM
I have went through the portal and have found ways to increase the size of /dev/mapper/centos-root partition.
But as of now I am not having proper arrangements to make a backup of the entire data and repartition the server.

Can anyone guide me, which files can I remove / delete to get free space in /dev/mapper/centos-root

Also, is there a command to get list of files in the partition.
#ls /dev/mapper/centos-root
shows only one file.

Do help me with a solution.

Check /backup directory...It was the problem with my vps. ;D