shm filesystem

Posted on 2000-05-12
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?
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.


Accepted Solution

jyu_88 earned 50 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

PowerShell Core for Advanced Linux Administrators

Understand advanced principals around Powershell Core with a focus on the Linux Administrator.  This course covers how to administer numerous environments across multiple platforms including Linux, Azure, AWS, and Google Cloud from a single shell instance.

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Fine Tune your automatic Updates for Ubuntu / Debian
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.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

630 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