Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to remove /tmp from tmpfs

Featured Replies

Hello, I'm new here.

 

I started using the armbian OS 2 days ago, and I'm facing some problems when running some web-server transfers due to lack of space on /tmp.

By default /tmp is mounted on RAM, and due to low space many operations fails.

 

How can I mount the /tmp on the Disk/SD card?

 

### Some details ###

 

Tried commenting out the line on /etc/fstab ( didn't work )

#tmpfs /tmp tmpfs defaults,nosuid 0 0

 

Tried to disable it from the systemclt ( didn't work )

sudo systemctl mask tmp.mount

 

Searched on armbian-config , didn't found anything related.

 

df -h /tmp
Filesystem      Size  Used Avail Use% Mounted on
/dev/zram2      477M   60K  442M   1% /tmp

 

 

uname -a
Linux orpi-s1 5.10.60-sunxi64 #21.08.1 SMP Wed Aug 25 18:29:57 UTC 2021 aarch64 GNU/Linux

 

Any help would be appreciated. Thank you.

Solved by Werner

  • Author

Not sure why I wasn't able to answer before ( limit posts ), but this solution only stresses the CPU. I did make the change, now it's showing as 2.88G of swap, but the TMP folder size remains the same.

Same issue with /var/log , gets full and I'm forced to manually delete data.

dpkg: cannot write to log file '/var/log/dpkg.log': No space left on device

The lack of customizing the dir sizes or removing them completely from the ram it's an issue.

Maybe I'll just completely remove zram, and install it again the way I want it.

 

As for the Debug : http://ix.io/3DEH

  • Author

Thank you Sr, that fixed my issue after reboot.

 

9 hours ago, Werner said:

Did you check /etc/default/armbian-ramlog ?

 

 

as for Igor answer,

On 10/24/2021 at 8:42 PM, Igor said:

ZRAM_PERCENTAGE=150 (or more)

MEM_LIMIT_PERCENTAGE=20 at minimum

he pointed at other lines that didn't fix my issue, but related; I was looking for this specific line:

 

# Size for zram based /tmp, total memory / 2 by default
TMP_SIZE=1000M

 

The description maybe misleading, or doesn't work as expected. After increasing the Zram Swap size, the TMP folder didn't automatically increased to "total memory / 2 by default". I had to change it manually.

 

Thank you. My issue has been solved.

You could set ENABLED=false in /etc/default/armbian-zram-config and setup zram manually if needed (refer to man zramctl or google for it)

 

I use a USB attached SSD as boot device instead of an SD card on almost all my standalone minis and I don't want /tmp or /var/log vanish upon reboot.

Even on older devices, you can always run your system from a USB disk by loading the boot stuff from the SD card and then move on with the USB drive.

To do that, just adapt the disk ids in /boot/armbianEnv.txt and /etc/fstab (=>blkid)

 

If you just want to disable /tmp to be on zram have a look at /usr/lib/armbian/armbian-zram-config and eventually adapt it for your needs.

Edited by armdran

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.