Page 2 of 4
Re: SQL Error: Disk Full
Posted: Thu Oct 13, 2016 12:22 pm
by avandemore
Your VG size is at approximately 16GB with basically 100% used. Did you reboot before you attempted the pvresize? That was already asked but not answered. It's important to do that so LVM can retaste the block devices.
Again as already noted LVM needs disk space to perform this resize operation. The most recent df -h listed shows: /dev/mapper/centos-root 14G 14G 20K 100% /
Re: SQL Error: Disk Full
Posted: Thu Oct 13, 2016 2:11 pm
by SteveBeauchemin
Just to be clear relative to my previous post. When other folks read this at a later date, so they understand about the tmpdir suggestion.
MySQL default location for tmpdir is /var/tmp - as shown in the first post of this sequence.
Disk full (/var/tmp/#sql_5037_0)
This is a preventative suggestion for the future. You do not want your MySQL tmp location to become full. It may cause loss of sleep.
From the /etc/my.cnf file I have setup the
[mysqld] section
Code: Select all
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
tmpdir=/usr/local/mysqltmp # Add this <<--- to a much larger Volume
... plus other stuff...
I believe that you added it to a different section in the my.cnf file.
It will simply relocate where sql puts temporary files. It is not going to fix your bad files. It will not un-corrupt for you. It just lets you put the MySQL temp files in a volume that has more space than /var/tmp. My /var/tmp volume is very small. It caused me much grief until I figured out what was happening. The steps I took were to make a new directory, stop Nagios completely, including MySQL, ndo2db, and anything else. I changed the my.cnf file by adding the tmpdir aimed at the new location, on a much larger volume. I made sure that the new directory permissions were set properly for the MySQL to have full rights there. Then I restarted everything. From that point forward my temporary files have plenty of room.
So, you may also want to move the MySQL temporary file location. That is something to help prevent a future space issue.
Thanks
Steve B
Re: SQL Error: Disk Full
Posted: Thu Oct 13, 2016 2:57 pm
by tgriep
venturegardengroup, did you reboot the server?
Can you post the full output of this command?
Re: SQL Error: Disk Full
Posted: Fri Oct 14, 2016 11:05 am
by venturegardengroup
Any suggestions please?
Regards,
Re: SQL Error: Disk Full
Posted: Fri Oct 14, 2016 11:07 am
by venturegardengroup
Sorry, missed the post. Please see below:
[root@localhost ~]# fdisk -l
Disk /dev/sda: 26.8 GB, 26843545600 bytes, 52428800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00005d36
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 52428799 25701376 8e Linux LVM
Disk /dev/mapper/centos-root: 14.9 GB, 14889779200 bytes, 29081600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/centos-swap: 1719 MB, 1719664640 bytes, 3358720 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[root@localhost ~]#
Regards.
Re: SQL Error: Disk Full
Posted: Fri Oct 14, 2016 11:09 am
by venturegardengroup
Yes I rebooted both the CentOs and the VM.
Re: SQL Error: Disk Full
Posted: Fri Oct 14, 2016 12:13 pm
by tgriep
Thanks for the info.
I am thinking the issue is that pvresize needs a little free space on the drive to run and yours has nothing left and that is causing the error.
Try removing a few of the old logfiles in the /var/log folder and is you have any old Nagios XI backups, they can be removed as well.
Look in the following folder for the XI backups
You can also use the following to find out what is using the space on the server.
Find top 20 largest directories by size:
Find largest 10 directories by size command:
Code: Select all
find / -type d -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
Re: SQL Error: Disk Full
Posted: Mon Oct 17, 2016 11:59 am
by venturegardengroup
I have been able to free up some space on the nagios backup folder and also ran a database repair command. Seems there is an issue with the mariadb.
Please see output attached.
Regards,
Re: SQL Error: Disk Full
Posted: Mon Oct 17, 2016 12:54 pm
by tgriep
Can you run the following as root on the XI server
Then run the following commands and post the output here so we can view the error?
Code: Select all
tail -20 /var/log/mariadb/mariadb.log
tail -20 /var/log/messages
Re: SQL Error: Disk Full
Posted: Tue Oct 18, 2016 3:38 am
by venturegardengroup
Hello,
Please see output attached.
Kind regards,