Re: tmpfs and /tmp vs. /dev/shm
On Wed, 18 Feb 2004 17:01:34 -0500, Darin Strait wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I'm running kernel 2.6.2 and I'm experimenting with tmpfs.
>
> I added the following to my fstab:
>
> tmpfs /tmp tmpfs size=50m,mode=1777 0 0
>
>
> I then rebooted, just to be sure.
>
> kiyone:/etc# mount
> /dev/hda1 on / type ext3 (rw,errors=remount-ro)
> proc on /proc type proc (rw)
> devpts on /dev/pts type devpts (rw,gid=5,mode=620)
> /dev/hda3 on /home type ext3 (rw)
> tmpfs on /tmp type tmpfs (rw,size=100m,mode=1777)
> tmpfs on /dev/shm type tmpfs (rw)
> sysfs on /sys type sysfs (rw)
> usbfs on /proc/bus/usb type usbfs (rw)
>
> kiyone:/etc# df -h
> Filesystem Size Used Avail Use% Mounted on
> /dev/hda1 1.9G 1.6G 242M 87% /
> /dev/hda3 108G 88G 15G 86% /home
> tmpfs 100M 608K 100M 1% /tmp
> tmpfs 157M 0 157M 0% /dev/shm
>
>
> Now, I'd noticed the tmpfs filesystem at /dev/shm before. I naively assumed
> that it would evaporate once I modified fstab. Not so.
>
> So, why do I have two tmpfs file systems?
>
> Which one should my system be using, and how do I get rid of the other one?
>
Both are OK. You can have more than one tmpfs mount. tmpfs maps the
mounted filesystems into VM.
For an intro, take a look at :
http://www-106.ibm.com/developerworks/library/l-fs3.html
--
....................paul
It is important to realize that any lock can be picked with a big
enough hammer.
-- Sun System & Network Admin manual
Reply to: