You are not logged in.

#1 2012-11-07 11:49:29

antonikus
Member
Registered: 2009-11-22
Posts: 42

Is it a good idea to mount /var and /etc on a memory card?

Has anyone got experience on installing ArchLinux on a SATA3 SSD, where do you put your /var and /etc and other write-intensive but not performance-intensive folders?

I was thinking about getting a really fast sd card, the ones with more than 35mb/s and have it in the laptop at all times. I think they would do well to serve for var, etc and possibly /root while the rest of the system is on the SSD? If the /etc cant be on a sdcard (boot issues perhaps with no /etc before mounting it) then I would have a base system /etc on the SSD, and mount the /etc after initializing, together with a .git in it and so on.

What is your opinion on this?


Linux user since redhat 6.1. former gentooer, former slacker. Now arher.

Offline

#2 2012-11-07 11:56:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,575
Website

Re: Is it a good idea to mount /var and /etc on a memory card?

Have you read this?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2012-11-07 14:50:58

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Is it a good idea to mount /var and /etc on a memory card?

I've been seeing more and more write-ups floating around online lately stating that, if you have a quality SSD from a reputable manufacturer (such as Intel or Crucial), the write wear is virtually trivial.  So long as TRIM is enabled and you keep those things that cause excessive writes in check--like placing your browser profile in RAM (if /home is on the disk), or making sure logs blow up too much--you won't have anything to worry about at all.  I'm honestly not sure how reliable these opinions are, though.  /etc pretty much only receives writes when you install new software or run updates; /var has the pacman cache and logs stored on it, so that would be the one to worry about, if it's necessary to worry at all.

SD cards aren't nearly as resilient, though, so placing sensitive data on them when they're under constant use seems like a bad idea.

Offline

#4 2012-11-07 15:08:39

antonikus
Member
Registered: 2009-11-22
Posts: 42

Re: Is it a good idea to mount /var and /etc on a memory card?

ANOKNUSA: What does resilience mean? Ive read that many UHS sdcards have wear levelling built-in. Storing /var and /etc on it is not sensitive data, I could backitup to the SSD each day or so anyway.

Trilby: Yes I have read that, thank you.

What about having a virtual machine image on the SDcard vs SSD?

Last edited by antonikus (2012-11-07 15:10:53)


Linux user since redhat 6.1. former gentooer, former slacker. Now arher.

Offline

#5 2012-11-09 08:18:09

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Is it a good idea to mount /var and /etc on a memory card?

I have been using SSD's ever ever since my 30GB Original OCZ Vertex (vary first to have TRIM with Linux the first OS to have TRIM smile )

Ya, as it turns out, all that MLC SSD wear stuff dose not really exist in the real world. People have even gone as far as to write a script to constantly write data to an SSD 24/7. What ends up happening is the flash controler burns out long before the flash chips wear out.

Just make sure to use EXT4 and to be double sure TRIM is enabled add ,discard, to the /etc/fstab for each partition on the SSD.

You will also want to tell EXT4 to write to the disk in 512 byte chunks i.e. the erase block size of the flash chips.

mkfs.ext4 -b 4096 -E stride=128,stripe-width=128 /dev/sdX#

And mount /tmp in RAM as a tmpfs like by adding this to /etc/fstab
note: the size=10G that means the tempfs will grow to a max of 10GB in size. I have 16GB of RAM.

tmpfs           /tmp    tmpfs   nodev,nosuid,noatime,nodiratime,size=10G 0 0

Then go to about:config in FireFox and configure it to store it's temp files in /tmp

After all that your good to go. No need to worrie about wear after all that. My Original OCZ Vertex and 80GB Intel G2 SSD's are still working just fine.

Just get yourself a Crucial M4, Samsung 830, or OCZ Vertex 4 (NOT Vertex 3!)

Last edited by hunterthomson (2012-11-09 08:24:30)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#6 2012-11-10 00:31:49

antonikus
Member
Registered: 2009-11-22
Posts: 42

Re: Is it a good idea to mount /var and /etc on a memory card?

hunterthomson wrote:

I have been using SSD's ever ever since my 30GB Original OCZ Vertex (vary first to have TRIM with Linux the first OS to have TRIM smile )

Ya, as it turns out, all that MLC SSD wear stuff dose not really exist in the real world. People have even gone as far as to write a script to constantly write data to an SSD 24/7. What ends up happening is the flash controler burns out long before the flash chips wear out.

Just make sure to use EXT4 and to be double sure TRIM is enabled add ,discard, to the /etc/fstab for each partition on the SSD.

You will also want to tell EXT4 to write to the disk in 512 byte chunks i.e. the erase block size of the flash chips.

mkfs.ext4 -b 4096 -E stride=128,stripe-width=128 /dev/sdX#

And mount /tmp in RAM as a tmpfs like by adding this to /etc/fstab
note: the size=10G that means the tempfs will grow to a max of 10GB in size. I have 16GB of RAM.

tmpfs           /tmp    tmpfs   nodev,nosuid,noatime,nodiratime,size=10G 0 0

Then go to about:config in FireFox and configure it to store it's temp files in /tmp

After all that your good to go. No need to worrie about wear after all that. My Original OCZ Vertex and 80GB Intel G2 SSD's are still working just fine.

Just get yourself a Crucial M4, Samsung 830, or OCZ Vertex 4 (NOT Vertex 3!)

This did not really answer my question, but thank you.

I think the stride options should be put on the https://wiki.archlinux.org/index.php/Solid_State_Drives wiki, but alas I dont have access myself.

Wait, why not Vertex 3, thats the one I have, 90GB?!?

Last edited by antonikus (2012-11-10 00:33:01)


Linux user since redhat 6.1. former gentooer, former slacker. Now arher.

Offline

#7 2012-11-10 01:58:24

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Is it a good idea to mount /var and /etc on a memory card?

antonikus wrote:

This did not really answer my question, but thank you.

I think the stride options should be put on the https://wiki.archlinux.org/index.php/Solid_State_Drives wiki, but alas I dont have access myself.

Wait, why not Vertex 3, thats the one I have, 90GB?!?

Owe sorry, I thought that you were conserend about wear on the SSD with all the talk about /var and /etc being  write-intensive.

Well, the 2 reasons I said not to get an OCZ Vertex 3 are these:

1. The controler in that SSD is notorious for all kinds of problems. However, all manufacturers that sell SSD's with that controler say they have fixed the problems.

2. The controler in that SSD uses compression which can be a good thing, but it leads to unregular performance. I would rather not have it.

If you already have the Vertex 3, then just make sure you have the newest firmware and I am sure you will be fine wink

? Ya, you can edit the Arch Wiki's. You just need to create an account. Unless something has changed.

Last edited by hunterthomson (2012-11-10 02:02:03)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

Board footer

Powered by FluxBB