14

I'm planning to make an SD card (or a flash drive) my home directory so as to be able to work on different PCs without much hassle.

Is this a bad idea for some reason?

5
  • 1
    That really scares me... If you carry your home directory with you, what happens if you loose your SD card? Do you really need the whole home directory or just some of the folders (like documents etc)? How about using git/mercurial for automatically keeping everything up to date?
    – Axel
    Commented Oct 1, 2012 at 6:41
  • 1
    I use bitbucket, github and dropbox but some things are not to bee online (either due to their size, their sensitive nature or whatever). It's also a real pain to keep every app's preferences up to date. I encrypt and backup often so losing the card would not hurt that much. Mainly I'd like to switch between my home pc, a pc at work and a laptop. Any suggestions welcome :)
    – Eelvex
    Commented Oct 1, 2012 at 7:13
  • 2
    Perhaps using rsync would be an option? I haven't tried, but I think it should be possible to have rsync pull in changes from SD card upon login or boot and write back when you log out/shutdown.
    – Axel
    Commented Oct 1, 2012 at 9:31
  • Well, that sounds promising.
    – Eelvex
    Commented Oct 1, 2012 at 10:38
  • 3
    You might run into problems if the different PCs have different versions of applications you are using. Many applications store their user data in the home directory in hidden files and folders. Different application versions may use different files/formats and so you may run into problems in this sense. Commented Oct 3, 2012 at 10:13

6 Answers 6

7

While they are quite reliable (no moving parts), SD cards/USB flash drives can be slower (you probably do not want to run disk-intensive operations from there) and have limited write cycles. From this Super User question:

Flash memory indeed has limited write cycles. However, by now it is unlikely that you'll encounter this within the normal lifetime of such a card.

You will probably want to avoid a journaling file system, as this puts extra strain on the memory chips: for this you can use ext2. (I remember this was the case once, but as noted in a comment, this might not be the case anymore)

I think you'd be OK as long as you backup frequently and replace the card/flash drive if it starts showing errors.

6
  • 4
    Is there any evidence that avoiding a journaling filesystem is actually helpful? I was under the impression the "limited number of writes" was so high as to be unimportant. Commented Oct 1, 2012 at 0:30
  • @BrendanLong I don't know; I remember that it was helpful back when the number of possible writes was smaller.
    – Renan
    Commented Oct 1, 2012 at 1:03
  • 4
    At this point, I'd guess that the annoyance of a non-journalled (read: easy to destroy) filesystem is significantly worse than any danger from extra writes. Commented Oct 1, 2012 at 1:40
  • 1
    Journaled filesystems mainly protect against power loss scenario's. This is a bigger risk for both flash (as it needs power to be stable for 250 ms to complete writes) and SD cards (as they could be accidentily removed). So, for flash SD cards, definitely use a journaling file system.
    – MSalters
    Commented Oct 1, 2012 at 9:21
  • Sorry, I don't agree. We're living in times of cloud storage and ubiquitous connectivity: without further constraints using a SD to bring your documents with you is simply anachronistic.
    – Avio
    Commented Oct 1, 2012 at 9:50
6

I've ran an entire system from an SD card before (over USB 1.0!) It was extremely slow. I was running OpenBSD. It has softdep which increased performance by a large amount, though that doesn't transfer to Linux.

I'd say the biggest thing to make sure of is that you mount it with noatime, this way, you don't get penalized by every read you do. Also, you should have a good reason for doing this. I did it with the purpose of saving power in a basic router setup(where I didn't need more than 1G of space).

This will also be significantly slower unless you use a USB 3.0 port and a matching thumbdrive/SD card reader. USB 3.0 is actually faster than the ubiquitous SATA-2, so in theory if you use USB 3.0, you shouldn't have any performance problems.

Also, you may want to make sure you can log in to your account without your thumb drive just in case

6

I do this and it works just fine for me. But I only use it on one computer; the biggest problem I see with using the same card for two means you can only use one at a time. Just something to watch out for: I ran into a bit of trouble because the system was trying to mount the /home directory before the SD card was detected, aborting the boot process. I had to alter the boot scripts (Arch Linux) slightly to wait for the card before mounting it and moving on with the boot.

4

From my experience, I will really suggest NO. On past few years working of Linux environment for my development purposes, the thing that matters most is performance and stability and SD cards are hardly meant for those, I believe they serve as secondary storage more(Please correct me If I am wrong), rather than primary high speed storage such as HDD itself.

One of the most daunting task you will probably face during this campaign, is when you lose your SD card, or corrupt it somehow. Although, this can be fixed, its a lot confusing task for starters. Waiting for help from an online community such as this site itself might not guarantee a solution and you may get stuck with an useless system for days.

2

If your home folder is not huge and all your PCs have normal connectivity, you could try one or more of these cloud storage services: Dropbox, Google Drive, Sugarsync, Microsoft Skydrive (but there are many more).

We're living in times of cloud storage and ubiquitous connectivity: if you don't have particular constraints, using a SD to bring your documents with you is simply anachronistic.

4
  • 1
    There are many issues with cloud storage. For example, my main system is on FreeBSD which, unfortunately, doesn't fly well in the clouds; or, I don't think I can boot from Dropbox and the like; or, syncing large files that I just generated might take too long; etc. My home folder is much more than "my documents".
    – Eelvex
    Commented Oct 1, 2012 at 10:47
  • You should take the habit of symlinking important configuration files directly from your Dropbox folder. At least as long as Sugarsync releases a native Linux client.
    – Avio
    Commented Oct 1, 2012 at 11:43
  • 1
    Not everyone always has "ubiquitous connectivity".
    – user
    Commented Oct 1, 2012 at 11:56
  • In fact I wrote if you don't have particular constraints.
    – Avio
    Commented Oct 1, 2012 at 12:02
2

Just be aware that when SD cards fail they fail suddenly and catastrophically.

Hard drives may give you some advance warning and degrade gracefully. You can usually mount a failing hard drive and retrieve data. SD cards don't give you that chance.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .