Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sometimes /dev/shm just plain stops working. I start getting messages
like "no space left on device" and I can do nothing with it. When I do
a "df" I get something like this:
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda1 ext4 15G 5.6G 8.5G 40% /
/dev/sda2 ext4 209G 183G 16G 93% /home
tmpfs tmpfs 1.6G - - - /dev/shm
Note the dashes in the "tmpfs" line. What exactly do those dashes mean?
I understand that they mean "usage data is unavailable", but why is that
so? I certainly cannot use the file system even tho it appears to be
there; it just "stops working".
I run Slackware 13.37.0. When I do a "uname -a" I get:
Linux atomik 2.6.37.6-smp #1 SMP Sat Apr 9 14:01:14 CDT 2011 \
i686 Intel(R) Atom(TM) CPU D510 @ 1.66GHz GenuineIntel GNU/Linux
I don't know why, when or how it happens. Is it a tmpfs bug, a
Slackware bug, or an indication that my system has been compromised?
(Pardon my paranoia; my machines ARE attacked many times every day.)
I don't place heavy demands on RAM most of the time. This just kinda
happens when it wants to even when everything else seems fine.
The problem goes away if I un-mount and then re-mount /dev/shm, but
until I do that all my processes which depend on /dev/shm are hosed.
before and after I do the "chmod 1777 /dev/shm". Of course
/dev/shm has not yet failed. I'll try it again whenever it
next decides to fail. I want to emphasize that I have been
using /dev/shm successfully for some time. It's just that
it goes away now and again ....
OK, /dev/shm finally failed again after a month of behaving itself. Here is how the device is behaving now:
# The /dev/shm device is currently in its erroneous
# we-have-no-size-information state:
root@atomik $?=2> df
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda1 ext4 15G 5.9G 8.2G 42% /
/dev/sda2 ext4 209G 187G 11G 95% /home
tmpfs tmpfs 1.6G - - - /dev/shm
# I can see into the device.
root@atomik $?=1> ls -laF /dev/shm/root/nil
total 0
drwxr-xr-x 2 root root 80 Aug 13 16:40 ./
drwx------ 3 root root 60 Aug 4 19:40 ../
-rw-r--r-- 1 root root 0 Aug 13 16:40 x
# I can create an empty file.
root@atomik $?=0> touch /dev/shm/root/nil/y
root@atomik $?=0> ls -laF /dev/shm/root/nil
total 0
drwxr-xr-x 2 root root 100 Aug 13 16:41 ./
drwx------ 3 root root 60 Aug 4 19:40 ../
-rw-r--r-- 1 root root 0 Aug 13 16:40 x
-rw-r--r-- 1 root root 0 Aug 13 16:41 y
# But I cannot create a file with something in it.
# The file shows up but is empty, eg:
root@atomik $?=0> echo hello > /dev/shm/root/nil/z
-su: echo: write error: No space left on device
root@atomik $?=1> ls -laF /dev/shm/root/nil
total 0
drwxr-xr-x 2 root root 120 Aug 13 16:41 ./
drwx------ 3 root root 60 Aug 4 19:40 ../
-rw-r--r-- 1 root root 0 Aug 13 16:40 x
-rw-r--r-- 1 root root 0 Aug 13 16:41 y
-rw-r--r-- 1 root root 0 Aug 13 16:41 z
The answers to questions posted in previous replies to this topic are as follows now that the fault is in effect:
# The fstab entry is correct and always has been.
root@atomik $?=0> fgrep /dev/shm /etc/fstab
tmpfs /dev/shm tmpfs defaults 0 0
# Trying the chmod as requested.
root@atomik $?=0> chmod 1777 /dev/shm
# The protections have changed from up above, ie
# everyone can now write to it ...
root@atomik $?=0> ls -ld /dev/shm
drwxrwxrwt 4 root root 140 Aug 5 17:06 /dev/shm/
# ... except me.
root@atomik $?=0> echo goodbye > /dev/shm/root/nil/z
-su: echo: write error: No space left on device
So there you have it. The device is there but the size are
somehow screwed up so anything which needs to allocate space
cannot do so.
Sorry but I need to remount the device so I can get back to
what I was doing. I'd be happy to take your suggestions about
how to poke at it for the next time this happens, which will
probably be another 1.5 months from now.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.