why_o_pi
Posts: 2
Joined: Wed Sep 16, 2015 10:39 am

Looking after SD card on a simple NAS setup

Wed Sep 16, 2015 10:53 am

Hi
I want to leave a NAS on 24/7, I would like peoples thoughts & answers on reducing writes to the SD card. (Including if they think its a waste of time :roll: )

Raspberry Pi 2 Model B (Quad Core CPU 900 MHz, 1 GB RAM)
OS Raspbian ( Release date: 2015-05-05 )
NAS as built from website guide here: http://www.howtogeek.com/139433/how-to- ... ge-device/
8GB Sandisk Ultra Class 10

Using Ram instead of card
adding code to

Code: Select all

sudo nano /etc/fstab
example:

Code: Select all

tmpfs /tmp            tmpfs   defaults,noatime,size=100M	0 0
tmpfs /var/tmp        tmpfs   defaults,noatime,size=100M	0 0
tmpfs  /var/log        tmpfs   defaults,noatime,size=100M,mode=0755	0 0
any others?
why have defaults?
what is mode 0755? why only log?
should /tmp have mode=1777?

I have also seen these written as:

Code: Select all

none        /var/run        tmpfs   size=1M,noatime         00
none        /var/log        tmpfs   size=1M,noatime         00
note the none instead of tmpfs on the left, why?

any other nice methods to keep my card ticking away?

many thanks

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: Looking after SD card on a simple NAS setup

Fri Sep 18, 2015 1:29 pm

I think you can happily leave the Pi on 24x7 without worrying about the card. Those fstab adjustments probably won't make any difference, though they might speed up performance very slightly if there is lots of traffic to /tmp. Definitely don't do the /var/log one though, it will reduce memory too much bu storing large log files in RAM.

Basically it is going to work fine. I have a couple of Pis on 24x7. And a sheevaplug (similar to a Pi) that has been on for over 5 years with no SD card problems, despite writing to the card almost continuously (as it appends OS log files).
Unix engineer since 1989

why_o_pi
Posts: 2
Joined: Wed Sep 16, 2015 10:39 am

Re: Looking after SD card on a simple NAS setup

Fri Sep 18, 2015 1:36 pm

thanks cpc464, good news, keep it simple :D

Return to “Advanced users”