

How to Build a Raspberry Pi File Server - celticbadboy
http://www.jeremymorgan.com/tutorials/raspberry-pi/how-to-raspberry-pi-file-server/

======
ChuckMcM
Interesting, so there are like a billion blog entries "How to build a
Raspberry Pi <X> Server" where X is "file", "print", "media", "security",
"email", "web", "DNS", Etc.

They are really just how to configure a Linux box to serve that function,
except the new hawtness is the Raspberry Pi. One would assume people would get
it by now that its just another Linux server so anything you can do with a
Linux server you can do with this.

What I like about this is that folks are willing to jump into these sorts of
projects with a Pi. (go go DevOps!) When they wouldn't for some reason with an
"expensive" computer. It is a lot of fun and there is lots of information out
there to guide you.

As for this particular example the original LinkSys ARM based file server was
way ahead of the game :-). It suffers from the same problems (there is a lot
of unreliability built into the equation) but it spawned a lot of copy cats
and its at least as useful as putting a disk on your wireless access point to
serve up tunes.

~~~
noonespecial
I find that fan-freaking-tastic because I've noticed that the people doing
these things often had very little Linux experience to start with. The pi
makes it unscary because so little is at risk. They don't feel like they're
working on a "computer" and its immediately obvious that if you screw up, you
can just pull out your card and reflash.

After they wax-on, wax-off for a while with the pi, they are often surprised
to learn that they know Linux Kung-Fu.

~~~
bduerst
I bought a pi for a Raspbmc media center, and because I wanted it to do more
than the vanilla XBMC, I ended up having to learn linux. I ended up buying a
second pi for a Samba NAS and web server.

I've spent a couple years developing with WAMP and dealing with windows BS,
but now I'm running an Ubuntu VM and building a dev box for linux.

The pi is ultimately what put me in this direction :)

~~~
danudey
And for what it's worth, stories like this are basically why the Pi exists.

------
secure
I’d say: don’t. The performance you will be getting is horrible. Ethernet is
connected via USB on the Raspberry Pi, so while via Ethernet, you can achieve
about 90 Mbit/s, that speed drops to ≈ 40 Mbit/s once you access a USB hard
disk drive. This is without any kind of encryption.

~~~
dazzawazza
I'd say: DO! If you are trying to learn how to do these sorts of things but as
with everything Pi, don't get your hopes up about speed.

Once you are comfortable you can move on to a better dedicated setup.

~~~
calinet6
I say, come on, be realistic. This is not a practical thing you're building,
it's a fun project that happens to work too.

It's like building a model airplane. You don't do it because you need to fly
across the country tomorrow in under 6 hours with drink service and a nap, you
do it because you can and it's fun.

~~~
npsimons
What's impractical about it? It's very cheap and easy, and hey, maybe you
don't need a faster file server. Hell, some of us with the money and expertise
to setup an uber-NAS go with the Pi precisely because it suits our needs just
fine.

------
Nursie
The Pi is great and all, but after running setups like these for many years
(ARM server + USB enclosure), I came to the conclusion you're better off with
some other solution if you're transferring even a few GB around the place.

Of course most of those solutions would be a lot more expensive. The HP
Microserver is my current solution, with zfs. And even that could be a lot
better as there's no hardware crypto support and scp is sloooooow as a result.

As a general point of cynicism (and that seems to be my mood today) - did
nobody ever have a small, general purpose computer before the Raspberry Pi
came along?

~~~
dcuthbertson
> did nobody ever have a small, general purpose computer before the Raspberry
> Pi came along?

I'm not sure I follow - does anything that runs <http://archlinuxarm.org/>
count? I have four Pogoplugs at home. For about the last year or so, two of
them run a web server and an rsync backup server. The other two are for
learning/experimenting.

~~~
Nursie
Sorry, text and sarcasm don't always play nicely. I've had sheevaplugs and
before that NSLU2s, and a couple of more exotic ARM boards too.

I was more just wondering why this was written at all, because 'how to plug in
a USB enclosure' and 'basic samba config' are topics that are so well covered
already that it seems odd anyone would write more about them. Adding 'on the
Raspberry Pi' seems to be enough for people to consider it novel these days,
and I start to wonder if the 'on the Raspberry Pi' crowd realize that the Pi
really is just another linux computer.

Note that I'm not saying this is a bad little tutorial.

------
davidarkemp2
This just basically tells you how to mount a disk and install samba. You could
equally well apply these instructions to any debian-based system.

~~~
celticbadboy
Here we go with that argument again.

The point of all these people doing "Raspberry Pi" articles with basic Linux
stuff is to teach people who just bought a Pi and don't know how to use it.
The overall point of this device is education.

~~~
dfc
You are correct it is a great introduction to how to use linux to serve files
and a key use case for the Pi. But why is it on hacker news?

~~~
hermaj
The is also a user on Reddit who posts lots of articles from this source to
/r/raspberry_pi.

/r/raspberry_pi is basically overwhelmed with these type of articles. It also
features a huge number of posts related to raspberry pi cases. Overall it is
fairly disappointing.

These articles are much less informative than explaining how to google for
this information.

------
dobbsbob
Why does anybody use Rasberry Pi. It is a black box tightly sealed with
patents and protected by corporations. It isn't even remotely an open platform
unless you think a few pages of documentation for the enormous amounts of
blobs is 'open'. It's one big mess of Broadcom firmware.

Go buy a beagleboard instead, or any taiwanese hardware almost all of them
release full docs

~~~
chimeracoder
Could you point to anything within a comparable price range to the Raspberry
Pi? I have some decent use cases for a ~$40 computer, and I'd gladly purchase
an open version if one is available, but the Beagleboards seem to be three or
four times as expensive.

~~~
dobbsbob
True but at least you can actually buy a beagleboard :P There's an 8mos
waiting list for Pi's where I live, only to get a broadcom firmware ridden
toy.

With completely open hardware you could hack a beagleboard forever. Or buy a
Cubieboard for $49, or Uputer Pi for $69,

~~~
chimeracoder
I understand - that wasn't meant as a challenge; rather, a request for a
recommendation! I was on the verge of placing an order for a Raspberry Pi
today.

I took a look at the Arch Linux ARM devices (<http://archlinuxarm.org/>), but
if you (or anybody else) has any experience with a particular one, let me
know.

------
gbog
To those always replying to raspberry articles that it can be done with other
setups, and that it's nothing new, I think you're missing the point:

All those tutorials show that a single very cheap and well designed piece of
open hardware can be very versatile and that everything we tend to see as
magic is just a one page how-to long.

I'm in my forties, an since I have had my first walkman I wanted to get inside
the machine, to drive it dwork my, from the bowels. I have seen iPods, but can
you ssh in an iPod? I have seen media centers, but can you bulk rename files
or script it?

Now with my raspberry I finally got my dream for real, and I can even ssh to
it from my phone when I'm away.

~~~
iuguy
> I have seen iPods, but can you ssh in an iPod?

If you jailbreak it you can. Here's[1] a one page how-to long guide.

> I have seen media centers, but can you bulk rename files or script it?

Of course, providing you're using something like XBMC. For renaming you don't
even need to script, there's friendly programs[2] out there if you want.

> Now with my raspberry I finally got my dream for real, and I can even ssh to
> it from my phone when I'm away.

I'm glad you're enjoying your Pi, but the argument about it being possible to
do with other setups is just as valid. You can SSH to almost anything that'll
run SSH from your phone.

[1] -
[http://guides.macrumors.com/SSH_into_your_iPod_touch_(Window...](http://guides.macrumors.com/SSH_into_your_iPod_touch_\(Windows\))

[2] - <http://wiki.xbmc.org/index.php?title=Category:Rename_tools>

~~~
gbog
I didn't made myself clear enough. I know I can ssh to an iPod, and to my
Android phone, but I don't own anything there, I cannot install vim with the
few plugins I like, I cannot install and use unison to sync files. In also
sshed to a printer, but what can you do there?

~~~
iuguy
I'm sorry but you keep saying that you can't do things that are eminently
possible.

You can install vim and unison on an iPod. If you jailbreak an iPod you can
get a full compile stack from cydia.

As for a printer, that's not what we were talking about. You seem to have made
an apples (no pun intended) to oranges argument. Of course you're subject to
the limitations of whatever OS you're dealing with. Printers that provide SSH
access do so to allow you to securely administrate the printer, not to run
vim. That's not to say that you can't run vim on a CUPS print server box and
do what you want that way.

------
mattbee
An excellent, cheap plan if you've never set up samba etc. before. To those
rolling their eyes at a "toy" solution (and it's better than that), when you
_do_ need a bit more performance and more discs I'd highly recommend one of
these [http://www.ebuyer.com/281915-hp-proliant-turion-
ii-n40l-micr...](http://www.ebuyer.com/281915-hp-proliant-turion-
ii-n40l-microserver-100-cashback-658553-421) which HP have been practically
giving away for years (£89 after cashback!) - a bit larger & faster than a Pi,
1GiB RAM, four hot-swap drive bays and gigabit ethernet.

------
AcessoNegado
Would it be much different with other distributions folks are using on the Pi?
I would think BSD/Unix variants would be different.

Also does Raspian support a lot of USB drives out of the box?

~~~
Nursie
It's not going to be a lot different, no. Some of the details around mounting
the drive may be slightly different, but only slightly, and samba's going to
be the same whichever *nix you use.

For extra credit you could investigate running minidlna on it to expose your
media to things like smart-tvs and playstations.

\--edit-- On the external drives thing, most USB drive enclosures should just
work (tm) with linux these days, however there used to be problems surrounding
power-saving. This is due to them being designed around the way windows uses
external enclosures, and linux not waking them the same way, or not realising
they had gone to sleep or something, and many disk enclosures I used with
older ARM debian boxes (4+ years back) had a habit of going to sleep and not
waking up.

tl;dr - YMMV, best to stick to one that is known-good.

------
npsimons
1) Install Debian (<http://www.raspbian.org/>)

2) Install and setup file servers ('apt-get install samba nfs-server')

------
bbox
did that years ago ..with a NSLU2 :)
<http://www.cyrius.com/debian/nslu2/gallery.html>

------
mauricesvay
I wish there was a tutorial that would make it easier. Why not automount disks
and provide a web interface to configure the shares?

------
bdz
I've done something similar with netatalk and avahi. Since I can use the drive
with Time Machine on OSX. Like a cheap Time Capsule.

~~~
hilti
I'm using netatalk and avahi too on my Raspberry Pi. It work's great as a home
storage server and I'm fine with the speed, cause I don't intend to be a
hosting company ;-)

