Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


shm filesystem

Posted on 2000-05-12
Medium Priority
Last Modified: 2013-12-15
Can someone tell me what I need to do to mount the shm filesystem at start up?   Certain programs require a shared memory segment at startup(so I'm told)and consequently won't run.    From the startup log the shm filesystem isn't being mounted.  
Question by:cliffhanger121599
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 40

Expert Comment

ID: 2807103
"shm filesystem"? I've never heard of such a beast. However the SysV IPC facility does provide for shared memory regions and the shm*() funtions that manipulate it. The functionality must be enabled in the kernel. I believe that it's typically enabled in distributed kernels, but if you've built a custom kernel you might have it disabled.


Author Comment

ID: 2807450
Thanks.  I have the sysv IPC facility enabled in the kernel and then I thought my problem lay here with this piece of text from the kernel doc.

  Shared memory is now implemented using a new (minimal) virtual file
  system, which you need to mount before programs can use shared memory.
  To do this automatically at system startup just add the following line
  to your /etc/fstab:

  none      /var/shm      shm      defaults      0 0

When I added this to fsab I got the message at startup that the file does not exist.   Can you help me further?   I do have a file called shm, but it contains nothing!
LVL 40

Expert Comment

ID: 2807518
Can you give me more of a reference as to where you found that? I've searched the 2.2.12 & 2.2.14 kernel documention and don't see anything like that. Also what program(s) are you trying to use that's complaining?
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.


Accepted Solution

jyu_88 earned 200 total points
ID: 2807758
you must have the new kernel which now treats shared memory as seperate file system. Your solution is right, just add that line to the /etc/fstab. However, since the mount point /var/shm is not there ( thus the complaint about the fiel doesot exist), you need to make sure the mount point, i.e., /var/shm, exists before attempt to mount it. Mount point will be a directory, do the following as root:
1) mkdir /var/shm
2) chmod 755 /var/shm
3) mount /var/shm
It will work from that point on.

been there done that, with 2.3.99pre5 kernel:-)

Author Comment

ID: 2808321
Thanks.  Your right, I'm running 2.3.99 pre3(and trying to run Midi Player, Hdparm etc.) and apart from this problem it has been fine.    When i read jyu 88's answer I thought , that's it  - but now I find that the 'chmon' command is not recognised on my system. i.e. it doesn't exist.    Where does this come from?   Incidentally, I do have a shm file at /proc/sysvipc, is this relevent?
LVL 40

Expert Comment

ID: 2808410
I think the command you want is chmod, not chmon, and it's found in /bin.

Author Comment

ID: 2808735
Many thanks to jlevie for pointing out my error.    Full marks to jyu 88 though for excellent answer.   One last thing, what does the command 'chmod 755 /var/shm' do(I've just looked at the man file and it's as clear as mud!).

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question