/tmp to NAS

I have been running /tmp to tmpfs for sometime now to decrease writes but memory is a problem and it blocks upgrades. My thought was to send /tmp to NFS share but after trying it would seem /tmp won’t go straight to NFS share and then I have started thinking about doing to a file partition on NFS share.

Has anyone else tried this?

That sounds like a question for a Linux forum or whatever OS you are running. It is off topic for here.


Shamefully it hasn’t worked doing that for for TMP as some of the files it won’t create which are needed.

If this is Pi related some have moved to SSD instead of the more fragile SD cards.

They said /tmp not swap. 2 totally different things.

Yes I agree they are 2 different things, although I thought I would try again. I may just buy an adaptor for SATA to USB as I have loads spare SSD.

Yes I did. Don’t. It creates more problems than to stay local. Don’t make yourself dependent on yet another box. BOTH have to work for your Smart Home to work.
Btw. your post makes us victims to the XY problem. So why do you want to do this ?

1 Like

Generally, both boxes are very stable, and I did know that would make it more dependant. Overall RAM is an issue and I am not wanting to drop in a Pi4 yet. I have spare SSD and I have ordered a SATA to USB adaptor now. As such I will copy the SD card to SSD and roll out the now swap and tmpfs and leave it back to normal disk. That way the ware levels won’t be an issue.

Thanks for everyone’s input but seems Pi on a busy system SSD only way to go.

Sorry I thought my post was clear as to why I have /tmp on tmpfs and now why I was trying to move it.

No, and to be frank you still have not answered what the problem is you’re trying to solve.
Is it SD wearout ? Or is it lack of RAM ? Or still something else ?
What HW do we talk about and what applications to use that much ? 1G is enough unless you’re doing anything extraordinary.

You’re still stuck in XY IMHO. Please take care of
How to ask a good question / Help Us Help You - Tutorials & Examples - openHAB Community
in the future.

Definitely not at all. openHABian has ZRAM for the purpose of mitigating SD wearout.
Simple, cheap and standard.

1 Like

Again, why? tmpfs is in RAM, not the SD Card.


Try again. What is your ultimate goal? What results are you trying to achieve? You may not have chosen optimal solutions.

When I first installed openhabian V2.2 there were recommendations to put /tmp on tmpfs and yes I know that is RAM to easy writes on the SD Card. However I starting to run low on RAM and due to the SD Card write cycles I though there was little else but to go back to SD Card or NFS.

So apart from explaining based on recommendation to move to tmpfs I thought my first post was clear about what I wanted to move and why.

Now if your saying that post to move to TMPFS is wrong and that SD Card writes are not longer an issue then I can reverse those changes out.

OK, now we have a picture of the situation you are trying to improve. Thank you.

Others are more experienced with Pi issues than I. My big experience is more UNIX / Linux related.

No problem, I have read my original post multiple times and in my head I thought I explained in enough detail but obviously not.

To further expand the issue with /tmp of tmpfs is that updates download to /tmp. On a 1GB RAM system there is just not enough room so updates fail.

In terms of the writes yes ZRAM is a significant change however I am not in the know enough to say if it was there when I deployed. Looking at the post date I would suggest not.

So Markus is it now that ZRAM can be used there is no more ware issues?

There were no separate recommendations I know of. Btw you confuse openHABian with openHAB. There’s no such thing as openHABian 2.2. And if you meant to say “by the time openHAB 2.2 was current” then that’s 2+ yrs old so no matter what it was I would no longer consider that a valid statement.

OS updates do not download to /tmp. There’s almost nothing in openHABian that would cause downloads (unless you sit in front of the Pi console which you shouldn’t be doing) so I can’t follow you there. Those few occasions that do are far away from filling standard /tmp which is 100MB.

Yes, read the link. I’m just about to make it the default for new installations.

1 Like

Ok I will install ZRAM and change it.

I was doing updates via the openhabian-config to do system updates and it downloaded java to /tmp. This is what made me review the tmpfs situation.

Yeah but even Java (the probably largest among downloads) isn’t THAT huge. Your problem probably was you were using /tmp for other stuff not to belong there (logs, presumably).

It needed about 80MB by the time it downloaded and wanted to decompress. With what I was running it just was to much space needed.

Logs can be a real problem on Linux systems if not periodically purged. Some usually live under /var/log/