Solved

shm filesystem

Posted on 2000-05-12
7
751 Views
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.  
0
Comment
Question by:cliffhanger121599
  • 3
  • 3
7 Comments
 
LVL 40

Expert Comment

by:jlevie
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.

0
 

Author Comment

by:cliffhanger121599
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!
0
 
LVL 40

Expert Comment

by:jlevie
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?
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 3

Accepted Solution

by:
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:-)
0
 

Author Comment

by:cliffhanger121599
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?
0
 
LVL 40

Expert Comment

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

Author Comment

by:cliffhanger121599
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!).
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
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…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

809 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