Which files should I remove to decrease the /dev/mapper/centos-root size.

Started by M/s VIKASH TECH, August 17, 2021, 05:47:21 PM

Previous topic - Next topic

M/s VIKASH TECH

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/

Kirk

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

M/s VIKASH TECH

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/

studio4host

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
....
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.

Igor S.

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



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

apartamenti

Quote from: 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.

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

Melm

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.

overseer

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.