Control Web Panel
WebPanel => CentOS 7 Problems => Topic started 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.
-
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
-
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
-
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
du -hx --max-depth=1 /
du -hx --max-depth=1 /var/log
du -hx --max-depth=1 /var/lib/mysql
....
-
I recommend you checking with the commands below. (Most of all problems with the folders.)
du -sh /usr/local/apache/logs/*
du -sh /usr/local/apache/domlogs/
du -sh /opt/alt/*
du -sh /backup/*
-
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
-
I resolved this issue by firstly,
creating a tmp folder in location /home/
Then I moved contents of /tmp folder to /home/tmp folder location.
This results in current sessions being disconnected and missing certificates in CWP due tmp data being moved.
To resolve this the server needs to be restarted.
CWP is designed to automatically recreate certificates and manage session data.
If you still experience issues, delete files in /backup folder as this generally fills up Dev Mapper folder.
Hope this helps.
-
Scan for large, ballooning log files, as Igor indicated. Truncate them to zero bytes:
truncate -s0 /usr/local/apache/logs/*
truncate -s0 /usr/local/apache/domlogs/*.log
Then implement logrotate to keep logs from growing exponentially in size.