tmp and log in /tmpfs? good or bad idea?

Ask questions about Arch Linux ARM. Please search before making a new topic.

tmp and log in /tmpfs? good or bad idea?

Postby corrobor » Tue Mar 22, 2022 8:43 am

Hi friends,
i have a raspberry 4 that works nice with arch linux arm. It has 4 gb ram. I use like a server for my home automation by using docker and some container like home-assistant, mosquitto, caddy, plex etc etc. I havent microsd: i'm using it with an hard disk SSD plug by an adapter sata/usb 3.0
I have this "stupid" question: to have less r/w cicle, can be a good idea to mount in fstab /tmp and /var/log (and in case another path that i ignore) in tmpfs so in ram?
Thanks
corrobor
 
Posts: 23
Joined: Wed Mar 03, 2021 9:43 am

Re: tmp and log in /tmpfs? good or bad idea?

Postby solskogen » Tue Mar 22, 2022 10:57 am

If you can loose the contents if there's a crash, it's a good idea. (I'm doing it)
solskogen
 
Posts: 161
Joined: Mon Nov 18, 2013 10:41 am

Re: tmp and log in /tmpfs? good or bad idea?

Postby graysky » Tue Mar 22, 2022 12:06 pm

/tmp is automatically mounted as tmpfs, do not define it in /etc/fstab
Mounting /var/log manually is your call but generally you want to have logs to refer to if something bad happens, so mounting that as tmpfs is risky. Are you afraid of burning out your SD card? That is possible but I haven't actually experienced it nor do I know of someone I trust who reported it.
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: tmp and log in /tmpfs? good or bad idea?

Postby corrobor » Tue Mar 22, 2022 1:13 pm

Ok thanks. I'm not using micro SD, i'm using HD SSD
corrobor
 
Posts: 23
Joined: Wed Mar 03, 2021 9:43 am

Re: tmp and log in /tmpfs? good or bad idea?

Postby graysky » Tue Mar 22, 2022 1:54 pm

Either way, I do not think your media is at risk due to logging.
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: tmp and log in /tmpfs? good or bad idea?

Postby corrobor » Tue Mar 22, 2022 3:01 pm

ok thanks!
corrobor
 
Posts: 23
Joined: Wed Mar 03, 2021 9:43 am


Return to User Questions

Who is online

Users browsing this forum: No registered users and 5 guests