Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mysqld can't write to /tmp after crashing...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Syster
n00b
n00b


Joined: 26 Jun 2007
Posts: 60
Location: ŁódŸ

PostPosted: Mon Nov 07, 2011 2:46 pm    Post subject: Mysqld can't write to /tmp after crashing... Reply with quote

Hi all!

My computer suddenly runs out of memory. And everything's crashed :(
Now, i'm trying to restart every service it provides. Almost everything goes well, except mysql.
Here's mysqld.err file:
Quote:
111107 16:10:46 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=mysqld-bin' to avoid this problem.
/usr/sbin/mysqld: Can't create/write to file '/tmp/ibCHi99A' (Errcode: 28)
111107 16:10:46 InnoDB: Error: unable to create temporary file; errno: 28
111107 16:10:46 [ERROR] Plugin 'InnoDB' init function returned error.
111107 16:10:46 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
111107 16:10:46 [Note] Event Scheduler: Loaded 0 events
111107 16:10:46 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.56-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Gentoo Linux mysql-5.1.56

The errcode 28 is no space left on device.
But...Everything works fine, and i have plenty of free space in RAM (about 400MB) O_o
I have no idea why mysqld can't write to tmp?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7576
Location: almost Mile High in the USA

PostPosted: Mon Nov 07, 2011 3:24 pm    Post subject: Reply with quote

I'm confused, you're out of RAM or out of hard drive space?

Or both?

Or swap?

Are you out of inodes?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Syster
n00b
n00b


Joined: 26 Jun 2007
Posts: 60
Location: ŁódŸ

PostPosted: Mon Nov 07, 2011 3:37 pm    Post subject: Reply with quote

I'm sorry i haven't wrote, but i was sure that is clear from the log.

Mysqld says that i'm out of space in /tmp, and /tmp is located on harddrive (default configuration from gentoo, i haven't moved it to RAM).
I don't have partition for /tmp, so it's located into / partition.
But:
Quote:

Server / # df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 4.0G 2.9G 965M 75% /
/dev/root 4.0G 2.9G 965M 75% /
rc-svcdir 1.0M 84K 940K 9% /lib/rc/init.d
udev 10M 160K 9.9M 2% /dev
shm 243M 0 243M 0% /dev/shm
/dev/sda2 6.0G 2.3G 3.4G 40% /var
/dev/sda4 64G 57G 3.8G 94% /var/exports

It shows, that i have a lot of free space O_o
Back to top
View user's profile Send private message
tomk
Bodhisattva
Bodhisattva


Joined: 23 Sep 2003
Posts: 7221
Location: Sat in front of my computer

PostPosted: Mon Nov 07, 2011 4:01 pm    Post subject: Reply with quote

You could be out of inodes. What's the output of this:

Code:
df -hi

_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
Syster
n00b
n00b


Joined: 26 Jun 2007
Posts: 60
Location: ŁódŸ

PostPosted: Mon Nov 07, 2011 4:20 pm    Post subject: Reply with quote

tomk wrote:
You could be out of inodes. What's the output of this:

Code:
df -hi

You got right!

Code:
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
rootfs                  257K    257K       0  100% /
/dev/root               257K    257K       0  100% /


But.. What to do now?
Can i increase number of inodes?
Or how to find which folders are using a lot of inodes?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7576
Location: almost Mile High in the USA

PostPosted: Mon Nov 07, 2011 8:53 pm    Post subject: Reply with quote

You have to recreate the partition to get more inodes.

It looks like your /tmp is on your root filesystem. One particular Gentoo struture that uses a lot of inodes is /usr/portage. If you could move that to another disk it could help. I frequently run out of inodes when I mkfs a disk with smaller block allocation sizes (1K or 2K blocks) but do not increase inode count from default. mke2fs using -N, -I or -i can affect number of inodes created.

Keep in mind inodes uses disk space, so you're trading off file space for inode space...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum