Help - Search - Members - Calendar
Full Version: partitions swap and /dev/shm
Linuxhelp > Support > Technical Support
Simply; on doing df -mh what is ...
none 503M 0 503M 0% /dev/shm

I know it is tmpfs shared memory but is that the same as a swap partition?
Did the previous admin set this partition up or is it something standard and therefore automatic?
Is it even a partition?

I've got a webserver that was hacked and I'm going to wipe the drive and start again. I've been reading up on partitions ( and comparing the recommendations with the original set up. I know what changes I want to make to other partitions and I know I want a swap partition but I don't know if I can include this space in my partition size calculations.

Thanks for any help.
Hello there,

read this

It's a new thing in 2.4.x.  From Documentation/filesystems/tmpfs:

2) glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
    POSIX shared memory (shm_open, shm_unlink). Adding the following
    line to /etc/fstab should take care of this:

        tmpfs  /dev/shm        tmpfs  defaults        0 0

    Remember to create the directory that you intend to mount tmpfs on
    if necessary (/dev/shm is automagically created if you use devfs).

    This mount is _not_ needed for SYSV shared memory. The internal
    mount is used for that. (In the 2.3 kernel versions it was
    necessary to mount the predecessor of tmpfs (shm fs) to use SYSV
    shared memory)

Red Hat adds the appropriate fstab entry for you (although they use
"none" for the first field, which I think is a bit more correct).

Robert B
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.