Our sysadmin has left for the day and our production box (which isn't heavily used) is giving messages like

Can't create/write to file '/tmp/#sql_1d2d_0.MYI' (Errcode: 30)

/tmp has gone read only by the looks of it.

Can anyone tell me how to fix this?

Trying umount /tmp gives me "device is busy".

Would like to not restart.


ABEL=/ / ext3 defaults,usrquota 1 1
LABEL=/var /var ext3 defaults,usrquota 1 2
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0
/usr/tmpDSK /tmp ext3 defaults,noauto 0 0

Mount command output

/dev/sda5 on / type ext3 (rw,usrquota)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda2 on /var type ext3 (rw,usrquota)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/usr/tmpDSK on /tmp type ext3 (rw,noexec,nosuid,loop=/dev/loop0)
/tmp on /var/tmp type none (rw,noexec,nosuid,bind)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

df -h output:

Filesystem Size Used Avail Use% Mounted on
/dev/sda5 200G 35G 156G 19% /
/dev/sda2 24G 7.2G 16G 32% /var
/dev/sda1 99M 17M 78M 18% /boot
tmpfs 1013M 0 1013M 0% /dev/shm
/usr/tmpDSK 485M 21M 439M 5% /tmp

I fixed it by the following

lsof | grep /tmp showed me what was using /tmp, I stopped the service (xfs) then managed to run an fsck, fix the inconsistencies and it's now back up :)

But now it's gone down again. Suggestions?

  • 1
    What is the output of ls -ld /tmp? – quanta Oct 25 '11 at 6:13
  • @quanta - drwxrwxrwt 6 root root 1380352 Oct 25 15:32 /tmp/ – John Roberts Oct 25 '11 at 6:13
  • Add contents of /etc/fstab and output of mount and df -h – Giovanni Toraldo Oct 25 '11 at 6:14
  • 1
    And this is why we have on-call rotas. My suggestion? Ring your sysadmin and hope they are feeling generous. – Ben Pilbrow Oct 25 '11 at 6:42

No idea what your sysadmin is trying to achieve with a loop mounted file /usr/tmpDSK for /tmp (and then using a journaling filesystem for it). There's plenty of space on your root partition /dev/sda5, so I guess if you just umount /tmp you'll be fine until he's back.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.