hune6imo
Posts: 2
Joined: Mon Apr 13, 2015 9:45 am
Contact: Website

How to setup tmpfs(ramdisk?) to protect SD card?

Mon Apr 13, 2015 9:50 am

Please teach me how to set up tmpfs to protect SD card from heavy writes.

I want to use RAM disk for:
/tmp/*
/var/log/*

I want RPi to save files to ram disk, not a SD card.

~# help?


hune6imo
Posts: 2
Joined: Mon Apr 13, 2015 9:45 am
Contact: Website

Re: How to setup tmpfs(ramdisk?) to protect SD card?

Mon Apr 13, 2015 11:15 pm

You're not helping.

I need a step-to-step guide, following from what to install.
(Other people will found this thread useful, if you can teach me how to do it)

User avatar
rpdom
Posts: 12954
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: How to setup tmpfs(ramdisk?) to protect SD card?

Tue Apr 14, 2015 5:27 am

hune6imo wrote:You're not helping.
Yes, he is.
I need a step-to-step guide, following from what to install.
You don't need to install anything.

Look at the link given. It even shows you an example of using tmpfs for /tmp.

jahboater
Posts: 3294
Joined: Wed Feb 04, 2015 6:38 pm

Re: How to setup tmpfs(ramdisk?) to protect SD card?

Tue Apr 21, 2015 1:42 pm

Add the following to /etc/fstab:-
sudo nano /etc/fstab

Code: Select all

tmpfs /tmp  tmpfs defaults,noatime 0 0
tmpfs /var/log  tmpfs defaults,noatime,size=16m 0 0

Return to “Raspbian”