Sponsored Content
Top Forums UNIX for Beginners Questions & Answers CentOS 6 ran out of space, need to reclaim it Post 303038144 by Neo on Monday 26th of August 2019 10:38:37 PM
Old 08-26-2019
DannyBoyCentOS,

You will benefit from thinking about what you are saying about log files.

Code:
Neo: Rebooting does not automatically delete log-files on normally configured Linux systems., FYI.

DannyBoyCentOS:  What does, then?

Any system which would automatically delete log files on reboot would be a seriously misconfigured system.

Log files are the single most important tool any system administrator has to deal with configuration errors, security breaches, system errors, access control issues, database errors, and more.

Without logging "all is lost".... as one might say, so no normally configured Linux system automatically deletes a single log file during the boot process. When you post like this, an experienced Linux user like me (over two decades of Linux system admin) can only conclude you have very little experience on a server. So let me explain to you again.

Log files should never be automatically deleted on reboot because that means anytime the system reboots, all that logging information would be lost; and a server can reboot for a variety of reasons. Log files are generally rotated and compressed and saved by the system; and then they are generally archived for a certain period of time, and then eventually deleted manually. The could be deleted automatically after some set period of time, but that should normally be a few weeks out (actually it depends on the size of storage, system criticality, system usages and other site specific factors).

In your output, the big files I see are (mysql) dump files and backups. These are not log files, they are backups and dumps. Normally these files can get very big very quickly and need to be actively managed. I manage these on my servers by moving them to an archive site (generally another servers for that specific server); but how you choose to do that is entirely up to you.

Based on what I have seen in your output so far (which admittedly I did not spend too much time on it), the big files you have are .sql and .zip files. If you need disk space, move these to another disk, another server, the cloud or where ever you archive your large files, dumps and backups; and then decide what to keep and what to delete.

Cheers.
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Ran out of space on /dev/root partition

hi, I have a SCO unix server which has a 36gb hard drive, but the IT company who supplied it assigned 1gb to /dev/root, 15mb to /dev/boot and 33gb to /dev/u. The /dev/root partition is now full, is there a way I can use the 33gb assigned to /dev/u without loosing any data, preferably... (2 Replies)
Discussion started by: Martyn
2 Replies

2. Shell Programming and Scripting

which user ran which command

can we come to know all the command ran bya user for last 1 day (1 Reply)
Discussion started by: narang.mohit
1 Replies

3. UNIX for Dummies Questions & Answers

Reclaim deleted disk space

I have a disk space issue on one of my unix servers. it is showing 98% full.. i found the offending folder and removed it. but i have not reclaimed the disk space. is there another command that i need ? thank you in advance for any assistance. (4 Replies)
Discussion started by: JanSP
4 Replies

4. Shell Programming and Scripting

Identify if ran by su or sudo?

Recently I was on an operational call and heard the people running my code placing the code in the /tmp directory and running as root. I had not planned on that. So I want to add some checks to my code (using ksh93): # ---------- ---------- ---------- # root not allowed to run this #... (3 Replies)
Discussion started by: ericdp63
3 Replies

5. Shell Programming and Scripting

how to find whether a script ran or not

Hi, I have written a script and placed in an application and the script can be executed manually only. But somehow one of the method in the script is being called and bringing the application down. But we are not able to find any instance of script running. Is there a way to findout whether the... (1 Reply)
Discussion started by: Satyak
1 Replies

6. Linux

How to reclaim the space which i used to increse the swap space on Xen,

Hi, i have done a blunder here, i increased the swap space on Xen5.6 server machine using below steps :- 1056 dd if=/dev/zero of=/root/myswapfile bs=1M count=1024 1057 ls -l /root/myswapfile 1058 chmod 600 /root/myswapfile 1059 mkswap /root/myswapfile 1060 swapon /root/myswapfile ... (1 Reply)
Discussion started by: apm
1 Replies

7. Red Hat

On CentOS, moving space from large free directory to another

Hi. My "/usr" folder is running out of space. My "/home" folder is quite large and has a lot of free space. As follows: Filesystem Type Size Used Avail Use% Mounted on ... /dev/sda5 ext3 9.7G 2.6G 6.7G 28% / /dev/sda7 ext3 152G 16G 128G 11% /home /dev/sda3 ... (7 Replies)
Discussion started by: pkiula
7 Replies

8. Red Hat

How to Upgrade Centos 5.7 using Centos 5.8 ISO image on Vmware workstation

Dear Linux Experts, On my windows 7 desktop with the help of Vmware workstation (Version 7.1), created virtual machine and installed Centos 5.7 successfully using ISO image. Query : Is this possible to upgrade the Centos 5.7 using Centos 5.8 ISO image to Centos version 5.8?.. if yes kindly... (2 Replies)
Discussion started by: Ananthcn
2 Replies

9. AIX

How to reclaim hard disks and IP's in AIX?

Hello I recently received a request to reclaim hard disks and IP addresses within an AIX system(s). THe file systems are no longer in use and the client has indicated that it is OK to remove them and reclaim the disks and release the IP's. Now, since the file systems belong to a Volume group I... (8 Replies)
Discussion started by: Joseph Sabo
8 Replies

10. UNIX for Beginners Questions & Answers

Safe way to shrink lvm vg_*-lv_swap partition and reclaim freed space on Linux?

Hello, # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M 0 rom sda 8:0 0 38.2G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 ... (2 Replies)
Discussion started by: centosadmin
2 Replies
db_archive(8)						      System Manager's Manual						     db_archive(8)

NAME
db_archive - displays security database log files no longer involved in active transactions (Enhanced Security) SYNOPSIS
/usr/tcb/bin/db_archive [-alsv] [-h home] FLAGS
Write all pathnames as absolute pathnames, instead of relative to the database home directories. Specify a home directory for the data- base. The correct directory for enhanced security is /var/tcb/files. Write out the pathnames of all of the database log files, whether or not they are involved in active transactions. Write the pathnames of all of the database files that need to be archived in order to recover the database from catastrophic failure. If any of the database files have not been accessed during the lifetime of the current log files, db_archive does not include them in this output. It is possible that some of the files referenced in the log have since been deleted from the system. In this case, db_archive ignores them. When db_recover is run, any files referenced in the log that are not present during recovery are assumed to have been deleted and are not be recovered. Run in verbose mode, listing the checkpoints in the log files as they are reviewed. DESCRIPTION
A customized version of the Berkeley Database (Berkeley DB) is embedded in the operating system to provide high-performance database sup- port for critical security files. The DB includes full transactional support and database recovery, using write-ahead logging and check- pointing to record changes. The db_archive utility is provided for maintenance of the log files associated with the security database. It writes the pathnames of log files that are no longer in use (that is, no longer involved in active transactions), to the standard output, one pathname per line. These log files should be written to backup media to provide for recovery in the case of catastrophic failure (which also requires a snapshot of the database files), but they may then be deleted from the system to reclaim disk space. You should perform a db_checkpoint -1 before using db_archive. The secconfig utility can create a cron job that periodically checks the security log files and deletes those no longer in use, as deter- mined by db_archive. Be sure to coordinate this with the site backup schedule. The db_archive utility attaches to one or more of the Berkeley DB shared memory regions. In order to avoid region corruption, it should always be given the chance to detach and exit gracefully. To cause db_archive to clean up after itself and exit, send it an interrupt sig- nal (SIGINT). RETURN VALUES
The db_archive utility exits 0 on success, and >0 if an error occurs. ENVIRONMENT VARIABLES
If the -h option is not specified and the environment variable DB_HOME is set, it is used as the path of the database home. The home directory for security is /var/tcb/files. FILES
/var/tcb/files/auth.db /var/tcb/files/dblogs/* RELATED INFORMATION
Commands: db_checkpoint(8), db_dump(8), db_load(8), db_printlog(8), db_recover(8), db_stat(8), secconfig(8) delim off db_archive(8)
All times are GMT -4. The time now is 02:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy