When use tmpfs?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

When use tmpfs?

Postby ccc on Sun Jun 03, 2012 12:36 pm

hi

Can anyone pls explain, when use tmpfs?
BTW I should install mint with XFCE on a 2GB CompactFlash (CF) with 1GB RAM and should I use it?
Last edited by ccc on Sun Jun 03, 2012 2:54 pm, edited 1 time in total.
ccc
Level 2
Level 2
 
Posts: 98
Joined: Sat Jul 23, 2011 7:40 pm

Linux Mint is funded by ads and donations.
 

Re: When use tmpfs?

Postby oobetimer on Sun Jun 03, 2012 2:08 pm

Every time. Open terminal and give a command mount .. :wink:

tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
User avatar
oobetimer
Level 7
Level 7
 
Posts: 1889
Joined: Tue Jun 01, 2010 12:53 pm
Location: Finland / above the Arctic Circle

Re: When use tmpfs?

Postby ccc on Sun Jun 03, 2012 3:41 pm

Should I use it tmpfs for /tmp, /var/(log,lock...) as well and add in /etc/fstab to be fix?
ccc
Level 2
Level 2
 
Posts: 98
Joined: Sat Jul 23, 2011 7:40 pm

Re: When use tmpfs?

Postby oobetimer on Sun Jun 03, 2012 6:03 pm

ccc wrote:Should I use it tmpfs for /tmp, /var/(log,lock...) as well and add in /etc/fstab to be fix?


No.
User avatar
oobetimer
Level 7
Level 7
 
Posts: 1889
Joined: Tue Jun 01, 2010 12:53 pm
Location: Finland / above the Arctic Circle

Re: When use tmpfs?

Postby ccc on Sun Jun 03, 2012 6:24 pm

oobetimer wrote:Every time. Open terminal and give a command mount .. :wink:

tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)


Thx, but what happens after system restart and why not to put in /etc/fstab?
ccc
Level 2
Level 2
 
Posts: 98
Joined: Sat Jul 23, 2011 7:40 pm

Re: When use tmpfs?

Postby ccc on Sat Jun 09, 2012 9:06 pm

ccc wrote:
Thx, but what happens after system restart and why not to put in /etc/fstab?


Can you pls answer my question?
ccc
Level 2
Level 2
 
Posts: 98
Joined: Sat Jul 23, 2011 7:40 pm

Re: When use tmpfs?

Postby mint123 on Sat Jun 09, 2012 10:29 pm

If you have enough memory, no reason why you should not mount /tmp in ram. To survive boots, it needs to be in fstab. For /var/lock, run, logs, there are cases where you may or may not want to do that. I say kep /var/logs out of ram so you have them when needing them. If you find your computer can't handle it, unmount the /tmp and remove from fstab.

Code: Select all
tmpfs /tmp tmpfs rw,nosuid,nodev,noatime,size=512M 0 0
mint123
Level 3
Level 3
 
Posts: 133
Joined: Mon Jan 31, 2011 4:44 pm

Re: When use tmpfs?

Postby eanfrid on Sun Jun 10, 2012 3:34 am

Have a look to /etc/default/rcS and to /etc/default/tmpfs: these 2 files manage how (tmpfs) and what (rcS) is supposed to be run in tmpfs. No fstab entry needed unless if you want to add mount options (like noexec for /tmp) to the default ones.

Edit: these files seem not to be overly used in Ubuntu/LM (/etc/default/tmpfs is not present) but you can tune your default options here, like:
Code: Select all
# implicit default
RAMRUN=yes

# mount /run/lock as a tmpfs (separately from /run)
RAMLOCK=yes

# mount /run/shm as a tmpfs (separately from /run)
RAMSHM=yes

# mount /tmp as a tmpfs
RAMTMP=yes

these setting were previously present in /etc/default/rcS but are now migrated to /etc/default/tmpfs. See "man tmpfs".
Main desktop: Debian GNU/Linux Wheezy 64bit w/custom 3.14 longterm kernel - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
True private storage on SpiderOak
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1757
Joined: Mon Apr 30, 2012 2:49 am
Location: U29tZXdoZXJlIG5lYXIgUGFyaXMsIEZyYW5jZQo=

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: Diego24 and 17 guests