2

I tried following this Answer:

How do I configure the Raspberry Pi to boot with an NFS root?

But at some point smoke started to come out of my ears. All I want to do is move as many of my files off the SD card and onto my desktop because:

  1. SD cards are slow
  2. SD cards are unstable
  3. To automatically backup all my raspis
  4. Backing up SD cards via dd is time consuming.
  5. To more easily cross compile programs

I thought maybe I could just mount the entire file structure after boot, like so

NFS Server /etc/exports:

/path/to/root 192.168.1.99(rw,sync,no_subtree_check,no_root_squash)

NFS Client /etc/fstab:

192.168.1.1:/path/to/root / nfs rsize=8192,wsize=8192,timeo=14,intr

Question:

Will this work?

  • 3
    I've been setting a full diskless workstation (SUN SLC) and I can assure you if now smoke comes out of your ears, by the end you'll be bald and with nails bitten to blood. You really don't want / as /nfs. Make shares for /usr, /home, /var, enjoy your life with 90% of the filesystem in NFS. Make a 16MB partition on your SD card for everything else, and never look back. That SUN was a week taken out of my life, a week I don't want to come back to. – SF. Oct 25 '13 at 14:24
2

Whoa! Let's go through your list briefly:

1) SD cards are slow.

Slow is relative and I won't disagree, unless the "relative to" is NFS, in which case SD cards are blazingly fast. As in, even the worst SD card will still be 5-10x faster than the best average ethernet speed you are likely to get. WRT to wifi...multiply a few more times.

2) SD cards are unstable

Not really, but they are a common scapegoat for problems involving:

  • Defective pi's. This one may seem controversial, but there's more to go wrong with a pi than an SD card. If you flash two cards with an image and neither of them works, either you can't write an image to a card properly or the pi is broken. IMO lots of people reporting problems online fall into one of these two categories -- but of course they are convinced it's because SD cards are somehow problematic. There are hundreds of millions of devices that rely on SD cards running right now, and they're fine. There is nothing wrong with the SD card technology...on a balance of pros and cons, it's actually pretty great!

  • Incompetent system administration. Kind of a catch-all for, "I screwed my system up -- it must be the SD card!". No, it isn't. There are easy ways to check that.

Note that using NFS won't solve either of those problems for you.

3) To automatically backup all my raspis

4) Backing up SD cards via dd is time consuming.

dd is hands-down the absolute worst, most ridiculous method of backing a system up that actually stands a chance of working. The only reason it's propagated by people is it is also the first and apparently easiest method they run across. I have another suggestion here, but there are lots of others around.

5) To more easily cross compile programs

How so? If the issue is repeat testing on the pi, use an install script that transfers the files to the pi appropriately. If that's not good enough, you still don't need to NFS the entire filesystem, you just need to NFS a staging area.

  • Hi, thanks for the informed response. WRT 5, I have multiple raspis, it would be easier if they all shared all their files (minus some specific files like /etc/hostname, /etc/network/interfaces) as I only have to compile them in one location. Currently I am installing them on a single raspi (which is super slow CPU wise), using dd to copy the image and distribute it. – puk Oct 24 '13 at 21:18
  • You might want to look into rsync for distributing the files. – Craig Oct 25 '13 at 16:54
  • Would it be possible to mount /lib and /src as I need those for cross compilation? – puk Nov 9 '13 at 1:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.