Author Topic: Which files should I remove to decrease the /dev/mapper/centos-root size.  (Read 18423 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
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.
Regards,
Team,
M/s VIKASH TECH
https://vikashtech.com/

Offline
*
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

Offline
*
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
Regards,
Team,
M/s VIKASH TECH
https://vikashtech.com/

Offline
*
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
....
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*****
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/*
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
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

Offline
*
Re: Which files should I remove to decrease the /dev/mapper/centos-root size.
« Reply #6 on: September 14, 2023, 04:13:26 PM »
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.

Offline
****
Re: Which files should I remove to decrease the /dev/mapper/centos-root size.
« Reply #7 on: September 14, 2023, 08:42:37 PM »
Scan for large, ballooning log files, as Igor indicated. Truncate them to zero bytes:
Code: [Select]
truncate -s0 /usr/local/apache/logs/*
truncate -s0 /usr/local/apache/domlogs/*.log
Then implement logrotate to keep logs from growing exponentially in size.