Why do you have huge 5 year old database dump files on your server?
These are from 2014, but this is 2019 brother.
Based on this observation, it is logical to conclude that your system is not properly administered if your server is having disk space problems and you have huge database dumps and other backup file on the same server / disks.
If you want to "reclaim disk space" find all these huge database dump files and backup files and move them off this server; or to a "data archive disk" with space for these types of files.
Why do you have huge 5 year old database dump files on your server?
These are from 2014, but this is 2019 brother.
Based on this observation, it is logical to conclude that your system is not properly administered if your server is having disk space problems and you have huge database dumps and other backup file on the same server / disks.
If you want to "reclaim disk space" find all these huge database dump files and backup files and move them off this server; or to a "data archive disk" with space for these types of files.
Cheers and Regards,
Neo
Thank you for your suggestions, based on which I've removed 320 Mb worth of .sql files to /mnt/backup from /root :
this is size of my root now:
408688 /root
I really thought that would allow MySQL to start, but no, I am still getting
Code:
190826 23:08:42 InnoDB: Started; log sequence number 0 8747645
190826 23:08:42 [ERROR] /usr/libexec/mysqld: Error writing file '/var/run/mysqld/mysqld.pid' (Errcode: 28)
190826 23:08:42 [ERROR] Can't start server: can't create PID file: No space left on device
, even after truncating existing 50Mb MySQL log file:
truncate -s 0 /var/log/mysqld.log
I think I misunderstood your question. I thought it was referring to automatically releasing space after deleting log files, but apparently you meant just active log files. Absolutely, the log files are crucial.
And yes - nobody is managing this server - I am a C#/SQL software developer, trying to get the company's CRM Linux server back online.
I think it is an actual mount point. No matter what files I delete, there is still not enough space. The latest suggestion I received was to truncate 480M /var/lib/mysql/sugarcrm/emails_text.MYD
However, I have deleted about 500Mb today, and that is still not enough to get the MySQL running:
Code:
InnoDB: buffer...
190826 23:40:41 InnoDB: Started; log sequence number 0 8747645
190826 23:40:41 [ERROR] /usr/libexec/mysqld: Error writing file '/var/run/mysqld/mysqld.pid' (Errcode: 28)
190826 23:40:41 [ERROR] Can't start server: can't create PID file: No space left on device
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Please post your mysql.conf file(s)...
My first guess is that your mysql db is running and saving a binary log used to recover from a crash.
The binary log file will grow to an incredibly large size and cannot just be truncated.
The best approach is to look at the mysql config file first and confirm what mysql is doing.
Then, we can move the entire mysql directory to your home partition where there is plenty of space. You should not have the mysql data directory in the root partition anyway but my guess is that it is there.
Then after moving the entire mysql data dir to the home partition we edit the mysql config file to tell it where all the mysql data is.
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Example:
Code:
myserver:/etc/mysql# cat mysql.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
Code:
myserver:/etc/mysql# cd mysql.conf.d/
myserver:/etc/mysql/mysql.conf.d# l
total 36
-rw-r--r-- 1 root root 4991 Jul 19 20:24 mysqld.cnf
-rw-r--r-- 1 root root 3453 Jun 14 23:32 mysqld.cnf.back
-rw-r--r-- 1 root root 4555 Jun 21 23:42 mysqld.cnf.back2
Code:
myserver:/etc/mysql/mysql.conf.d# cat mysqld.conf
Code:
myserver:/etc/mysql/mysql.conf.d# cat mysqld.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
log_error_verbosity = 3
ft_min_word_len=3
open_files_limit = 65535
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
#
# OMITTED REMAINDER OF THIS FILE FROM THIS CUT AND PASTE EXAMPLE
#
You really care about the entry in red above.
I suggest you post your entire mysql.cnf file (in CODE tags, not ICODE tags) ... so we can best help you
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)
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)
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)
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)
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)
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)
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)
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)