New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

mysql can't start up

Got problems with your B2 or B3? Share and get helped!
Post Reply
blitz
Posts: 14
Joined: 14 Mar 2011, 18:04

mysql can't start up

Post by blitz »

Hi,

I'm using my Bubba 2 server as database for my XBMC installations, but recently I got problems with the configuration and my XBMC was unable to get all information for the database.

I restarted the Bubba 2 to see if this solved the issue, it didn't. But when I tried to manually start the mysql server i got the error message below.
/etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full! ... failed!
I googled some and found out that the command apt-get clean could remove some data.

When I run the command
df -h /dev/sda1
I get the result:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.2G 9.0G 0 100% /
But I still can't start up mysql.

Have anyone else encountered the same issue? How did you solve it?

Thanks in advance.
Gordon
Posts: 1469
Joined: 10 Aug 2011, 03:18

Re: mysql can't start up

Post by Gordon »

There have been several reports on flooding of the root partition. Most of them involve emails sent by the cron daemon to root, so you should most definitely check the disk usage of root's mail directory.
blitz
Posts: 14
Joined: 14 Mar 2011, 18:04

Re: mysql can't start up

Post by blitz »

Gordon wrote:There have been several reports on flooding of the root partition. Most of them involve emails sent by the cron daemon to root, so you should most definitely check the disk usage of root's mail directory.
Thanks for the fast answer, can you please say where this is located?
Gordon
Posts: 1469
Joined: 10 Aug 2011, 03:18

Re: mysql can't start up

Post by Gordon »

Find complete answer in THIS thread
blitz
Posts: 14
Joined: 14 Mar 2011, 18:04

Re: mysql can't start up

Post by blitz »

Gordon wrote:Find complete answer in THIS thread
Hi Gordon,
I have had a look in that thread and when i execute the command

Code: Select all

 find /root/Mail | wc -l
I get the response:
find: `/root/Mail': No such file or directory
0

when i use the

Code: Select all

mail 
command the response is
No mail for root

and the command

Code: Select all

MAIL=/root/MAIL/  mail
gives me the response:
Cannot open mailbox /root/MAIL/: Is a directory
No mail for root

Any other ideas?
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: mysql can't start up

Post by Ubi »

linux is case sensitive

"/root/Mail" is something different than "/root/MAIL"
But I agree, Gordons solution does not work for me either. You need to first find out what your actual mail format is for root, and then adjust the mail command accordingly
Gordon
Posts: 1469
Joined: 10 Aug 2011, 03:18

Re: mysql can't start up

Post by Gordon »

That's kind of weird. On the B3, the default is for the mail directory to be named "Mail". But yes, it can be named differently and in that case you the config files for postfix and dovecot need to be changed accordingly.

Code: Select all

grep home_mailbox /etc/postfix/main.cf
If the mailbox for root does not exist then you are in deeper trouble. The emails intended for root will then stay in the mail queue and they will stay there indefinitely. Clearing that mail queue is a tedious job I'm afraid.

Just to be on the safe side: what's your size of /var/mail/root?

Edit: skip that last question. `mail` already responded there was no mail.
Gordon
Posts: 1469
Joined: 10 Aug 2011, 03:18

Re: mysql can't start up

Post by Gordon »

Come to think of it, if you don't have a mailbox for root and the mail queue is piled with messages for root that may be not so bad after all. You can go straight to the optional part of making admin an alias for root and then postfix should start delivering the stalled emails in admin's mailbox (i.e. away from the root partition).

Code: Select all

# become root
su

# change to admin home
cd /home/admin

# create maildir folder
maildirmake Mail

# Fix rights for the new maildir
chown -R admin.admin Mail

# create alias for root
echo "root:          admin" >> /etc/aliases
newaliases

# Tell postfix to start delivering the emails now
sendmail -q
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: mysql can't start up

Post by Ubi »

why not avoid filling roots mailbox with crap and first run a "postsuper -D ALL" to start with a clean slate?
blitz
Posts: 14
Joined: 14 Mar 2011, 18:04

Re: mysql can't start up

Post by blitz »

I've sovled my issues, it wasn't the mail that was using all the space it was backup files located in the /nmt/bubba-backup/ folder.

I found them by using the command

Code: Select all

du -cms *|sort -n
I removed these files and now I can start up the mysql server again.

Why does the Bubba store backupfiles there when I have chosen another location during the setup?
Post Reply