tmpfs and /tmp partition

Support for security such as Firewalls and securing linux
ataylor
Posts: 34
Joined: 2008/06/25 07:36:29

Re: tmpfs and /tmp partition

Post by ataylor » 2014/07/21 02:50:00

Mmmm, I think the idea is that /tmp is for files that don't survive a reboot and /var/tmp is for those that you want to retain.
Default setup is to use no more than half of RAM, which can be modified.

Alan

owl102
Posts: 362
Joined: 2014/06/10 19:13:41

Re: tmpfs and /tmp partition

Post by owl102 » 2015/05/14 21:43:00

gerald_clark wrote:Then it must depend on amount of RAM.
I cannot confirm this. I did a standard install of CentOS 7.0 (Gnome Desktop, but formatting pre-existing ext4 partitions instead of using xfs) on a 8GB Laptop (with/only with SSD), and got no ramdisk for /tmp:

Code: Select all

# df
Dateisystem    1K-Blöcke  Benutzt Verfügbar Verw% Eingehängt auf
/dev/sda3       24639824  5825904  17539248   25% /
devtmpfs         4025176        0   4025176    0% /dev
tmpfs            4034172       92   4034080    1% /dev/shm
tmpfs            4034172     9192   4024980    1% /run
tmpfs            4034172        0   4034172    0% /sys/fs/cgroup
/dev/sda4      206292968 46901832 148888992   24% /home
/dev/sda1         999320   145388    785120   16% /boot
# systemctl is-enabled tmp.mount
disabled
Last edited by owl102 on 2015/05/15 08:15:30, edited 2 times in total.
German speaking forum for Fedora and CentOS: https://www.fedoraforum.de/

giulix63
Posts: 1305
Joined: 2014/05/14 10:06:37
Location: GMT

Re: tmpfs and /tmp partition

Post by giulix63 » 2015/05/15 07:13:20

Code: Select all

Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        3.9G     0  3.9G   0% /dev
tmpfs           3.9G  256K  3.9G   1% /dev/shm
tmpfs           3.9G  9.1M  3.9G   1% /run
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda3        50G  7.5G   40G  17% /
tmpfs           3.9G   20K  3.9G   1% /tmp
tmpfs           3.9G  340K  3.9G   1% /var/log
/dev/sda4       170G   39G  124G  24% /home
/dev/sda2       488M   84M  370M  19% /boot
/dev/sda1       512M  9.6M  503M   2% /boot/efi
tmpfs           788M   24K  788M   1% /run/user/1000
This is F21 with 8GB RAM (/var/log moved by me) and a SSD. Do you guys have SSDs? Maybe that counts too...

P.S. Workstation installation from DVD. Now that I think of it, when I installed I only had 4GB RAM. The other 4 I added later.
Last edited by giulix63 on 2015/05/15 08:31:27, edited 1 time in total.
Root is evil: Do not use root (sudo) to run any of the commands specified in my posts unless explicitly indicated. Please, provide the necessary amount of context to understand your problem/question.

owl102
Posts: 362
Joined: 2014/06/10 19:13:41

Re: tmpfs and /tmp partition

Post by owl102 » 2015/05/15 07:41:24

giulix63 wrote:This is F21 with 8GB RAM (/var/log moved by me) and a SSD.
I guess it counts (more) if you are installing Fedora or CentOS.
Do you guys have SSDs? Maybe that counts too...
Good idea but the Laptop where I have installed CentOS 7 has a SSD and only a SSD, so this does not seem to count. (Have added this information to my posting above.)
Last edited by owl102 on 2015/05/15 09:20:09, edited 2 times in total.
German speaking forum for Fedora and CentOS: https://www.fedoraforum.de/

giulix63
Posts: 1305
Joined: 2014/05/14 10:06:37
Location: GMT

Re: tmpfs and /tmp partition

Post by giulix63 » 2015/05/15 07:52:36

owl102 wrote:I guess it counts if you are installing Fedora or CentOS. Since this is not the Fedora forum I talk about CentOS 7.
Of course it counts, but Fedora's features often make it into RHEL/CentOS.
Root is evil: Do not use root (sudo) to run any of the commands specified in my posts unless explicitly indicated. Please, provide the necessary amount of context to understand your problem/question.

owl102
Posts: 362
Joined: 2014/06/10 19:13:41

Re: tmpfs and /tmp partition

Post by owl102 » 2015/05/15 08:00:39

giulix63 wrote:Of course it counts, but Fedora's features often make it into RHEL/CentOS.
Yes, but the question remains why matteoIT got a tmpfs for /tmp when installing CentOS 7 and gerald_clark and me not.
German speaking forum for Fedora and CentOS: https://www.fedoraforum.de/

giulix63
Posts: 1305
Joined: 2014/05/14 10:06:37
Location: GMT

Re: tmpfs and /tmp partition

Post by giulix63 » 2015/05/15 08:11:12

owl102 wrote:And: The Laptop where I have installed CentOS 7 has a SSD and only a SSD. Have added this to my posting above.
That's what I was interested in. I guess that proves the SSD is not the cause.
Root is evil: Do not use root (sudo) to run any of the commands specified in my posts unless explicitly indicated. Please, provide the necessary amount of context to understand your problem/question.

User avatar
TrevorH
Forum Moderator
Posts: 26525
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: tmpfs and /tmp partition

Post by TrevorH » 2015/05/15 08:12:15

I also have a CentOS 7 install on an 8GB laptop with an SSD and it has /tmp on an LVM LV. Just another data point.
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

giulix63
Posts: 1305
Joined: 2014/05/14 10:06:37
Location: GMT

Re: tmpfs and /tmp partition

Post by giulix63 » 2015/05/15 08:13:21

Installation type/media, maybe?
Last edited by giulix63 on 2015/05/15 08:34:34, edited 1 time in total.
Root is evil: Do not use root (sudo) to run any of the commands specified in my posts unless explicitly indicated. Please, provide the necessary amount of context to understand your problem/question.

User avatar
TrevorH
Forum Moderator
Posts: 26525
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: tmpfs and /tmp partition

Post by TrevorH » 2015/05/15 08:30:20

The only other thing I can think of is that mine was an install of 7.0.1406. Did it change in 7.1.1503?
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Security Support”