Fedora Linux Support Community & Resources Center
  #1  
Old 29th January 2012, 05:24 AM
johncp1962 Offline
Registered User
 
Join Date: Oct 2009
Location: USA
Posts: 23
linuxfirefox
Thumbs up tmpfs (Why so many?)

System: Intel i5 quad core | 64-bit | 16G RAM
O/S: Fedora 16 x86_64
Kernel: 3.2.1-3.fc16.x86_64

This is more of a question than a problem. My system isn't exhibiting any abnormal behavior and I don't have any cause for alarm. I just don't remember every having this may listings for tmpfs before.


Not sure if this is pertinent, but it may be:
Running Virtualbox 4.1.8 (F16 is the host O/S) with two (2) VM's:
1. Windows 7
2. Centos 6 Server
Note: I have added and removed other VM's from Virtualbox in the past.


From a terminal on F16, I run df -h:

Filesystem Size Used Avail Use% Mounted on
rootfs 50G 9.7G 38G 21% /
devtmpfs 7.9G 0 7.9G 0% /dev
tmpfs 7.9G 3.4M 7.9G 1% /dev/shm
tmpfs 7.9G 49M 7.8G 1% /run
/dev/mapper/vg_office-lv_root 50G 9.7G 38G 21% /
tmpfs 7.9G 49M 7.8G 1% /run
tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup
tmpfs 7.9G 49M 7.8G 1% /var/run
tmpfs 7.9G 49M 7.8G 1% /var/lock
tmpfs 7.9G 0 7.9G 0% /media
/dev/sdb1 931G 63G 822G 8% /media/EXTREME
/dev/sdc1 497M 116M 356M 25% /boot
/dev/sda2 233G 90G 143G 39% /media/BACKUP
/dev/sda1 699G 91G 608G 14% /media/MASSIVE
/dev/mapper/vg_office-lv_home 863G 49G 771G 6% /home



My fstab shows no such mounts for most of the tmpfs as seen below:

/dev/mapper/vg_office-lv_root / ext4 defaults 1 1
UUID=4856d979-0e7c-4150-a6a9-e3863737ae06 /boot ext4 defaults 1 2
/dev/mapper/vg_office-lv_home /home ext4 defaults 1 2
/dev/mapper/vg_office-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sda1 /media/MASSIVE ntfs-3g defaults 0 0
/dev/sda2 /media/BACKUP ntfs-3g defaults 0 0
/dev/sdb1 /media/EXTREME ext4 defaults 0 0



I understand that it's swap space and the default mount location is /dev/shm (at least in my example). My question is, why do I have so many other swap files listing when I execute df -h? Rebooting does nothing to change it.

Although my system isn't malfunctioning, I'm curious to know about these other swap spaces.

Thank you.

John
Reply With Quote
  #2  
Old 29th January 2012, 06:31 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 31
Posts: 2,750
linuxfirefox
Re: tmpfs (Why so many?)

tmpfs isn't swap space, it's just a file system that stays in virtual memory (which may include swap space if your system has any available).

It's used anywhere where the system needs to store small files that are only relevant whilst the system is running, and can be safely lost on a crash or reboot. Indeed, in some cases having left-over files from a previous boot may cause problems.

"mount | grep tmpfs" on my F16 gives:
Code:
devtmpfs on /dev type devtmpfs (rw,nosuid,relatime,seclabel,size=2009612k,nr_inodes=502403,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime,seclabel)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,seclabel,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,seclabel,mode=755)
tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,rootcontext=system_u:object_r:mnt_t:s0,seclabel,mode=755)
/dev contains device files which are created and removed automatically by the udev daemon, as hardware is added or removed etc. (devtmps is just a tmpfs that was created specially by the kernel early in the boot process, which contains the core devices pre-created so that the boot process has something to work with before udevd is loaded.)

/dev/shm is used by the POSIX shared memory facilities.

/run contains resource locks and PID files etc. which are relevant to currently-running daemons. /var/run and /var/lock are symlinks back to /run for compatibility reasons.

/media contains the mount-points of removable media (e.g. optical discs and USB drives), which are created and removed automatically.

/sys/fs/cgroup contains details for the cgroup system, which is used (mainly by systemd) to divide processes into groups for resource sharing etc.

Gareth

Last edited by Gareth Jones; 29th January 2012 at 11:02 PM.
Reply With Quote
  #3  
Old 29th January 2012, 09:19 PM
johncp1962 Offline
Registered User
 
Join Date: Oct 2009
Location: USA
Posts: 23
linuxfirefox
Re: tmpfs (Why so many?)

Thank you for your reply,Gareth. You've answered my question; I'll consider this matter closed.

Again, thanks!

John
Reply With Quote
Reply

Tags
tmpfs

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
remounting tmpfs RiotingPacifist Using Fedora 1 4th December 2009 11:55 PM
/tmp and tmpfs axel Using Fedora 3 20th October 2006 10:38 AM


Current GMT-time: 20:53 (Tuesday, 29-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat