You are not logged in.

#1 2015-03-08 01:58:01

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,920

Pi Nas

Do use Dropbox quite a bit but really want to start backing up files locally. Have messed around with small server in the past so now want to build a Pi Nas. Plenty of guides online, but they fall into two groups. Some use Samba others OpenCloud, not sure which one would be better.

If I am the only one using it then would NFS be better?

For now I am looking at a 32gb sd card for pi, it will store enough files I need for now then will add an external hard drive for larger backups.


Comments, suggestions please feel free to contact me mrgreen(at)archbang(dot)org

Offline

#2 2015-03-08 03:26:40

once
Member
Registered: 2011-03-13
Posts: 127

Re: Pi Nas

32gb sd-card for backup and yourself only?
you need sd-card reader?

Offline

#3 2015-03-08 03:35:58

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,920

Re: Pi Nas

Got  a reader in my laptop, for now it will be enough for me, will aside to it once I get a set up that works..


Comments, suggestions please feel free to contact me mrgreen(at)archbang(dot)org

Offline

#4 2015-03-08 08:07:52

scjet
Member
From: Canada
Registered: 2010-12-01
Posts: 1,468

Re: Pi Nas

I'd go for NFS, it's the simplest, and most efficient to use/manage, and very stable, ... and it's "free"   wink

Last edited by scjet (2015-03-08 08:11:34)

Offline

#5 2015-03-08 08:44:45

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,920

Re: Pi Nas

Am thinking the same, samba looks far too complicated. Would be nice to have a front end like owncloud but I do not really need it


Comments, suggestions please feel free to contact me mrgreen(at)archbang(dot)org

Offline

#6 2015-03-08 12:00:31

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,920

Re: Pi Nas

Run a quick test on my old laptop seems to work, easy to configure and setup.


Comments, suggestions please feel free to contact me mrgreen(at)archbang(dot)org

Offline

#7 2015-03-08 17:33:57

oliver
Administrator
Registered: 2010-11-04
Posts: 2,209

Re: Pi Nas

Be aware that the owncloud client won't save your password without some sort of keyring which drags in Gnome or KDE dependencies.

Offline

#8 2015-03-09 00:26:25

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,920

Re: Pi Nas

Think I will stick with nfs,  just want a place to dump fiiles....might try sshfs as openssh is needed anyway.


Comments, suggestions please feel free to contact me mrgreen(at)archbang(dot)org

Offline

#9 2015-03-09 02:52:41

Lineaxe
Member
Registered: 2015-02-07
Posts: 29

Re: Pi Nas

NFS... hmm... I couldn't set it up the first time I tried, perhaps some outdated tutorials.
So I just went with FTP, and use curlftpfs: http://linuxconfig.org/mount-remote-ftp … filesystem
Then you can stream media-files through FTP! Isn't that neat?
And it works perfectly on LAN.

And then it will work from other devices and just from a regular browser, from anywhere.

Edit:
And you can use a RAM-disk cache if you have a bunch of smaller files to keep sychronized, like all the files for a website.
Like this:

init-cache.sh:

#make a 200MB RAM-disk:
#sudo mkfs -q /dev/ram1 200000
#mkdir -p ~/ramcache
#sudo mount /dev/ram1 ~/ramcache
#so the commented-out commands are for a ramfs file-system, which didn't work on my rpi2... look at the edit for the new set-up.
cp -r ~/cache-files/* ~/ramcache/

backup-cache.sh:

cp -r ~/ramcache/* ~/cache-files/

Edit:
I've corrected the code... copying the files properly (such a basic mistake!)... and I'm using tmpfs with fstab, see a comparison here: http://www.jamescoyle.net/knowledge/951 … s-ram-disk .
So you just put this line in your /etc/fstab file:
tmpfs /home/pi/ramcache tmpfs nodev,nosuid,size=200M 0 0
For a 200MB ram-disk, or whatever you want.

The commented-out code is what I've used for ramdisks everywhere before, though without automatic backup. Though it didn't work for the Pi for some reason.

Last edited by Lineaxe (2015-03-15 07:09:23)

Offline

#10 2015-03-09 08:42:34

scjet
Member
From: Canada
Registered: 2010-12-01
Posts: 1,468

Re: Pi Nas

NFS is just 1 file, with 1 command.

from my Laptop, (or your "Pi" device if you like), via NFS, and wifi (Lan):

$ cat /etc/exports
/home/duh/Movies    192.168.1.0/24(rw,no_subtree_check,async,no_root_squash)
# Or, export Home Directory:
# /home/duh 192.168.1.0/24(rw,async,no_root_squash)
$ sudo exportfs -a

Example;
from my client-side (wifi) portable WD-Media-player, which sees my NFS-Server/Laptop/Lan, and streams it to my hdmi-connected HDTV:
-it's just streaming my "Movies/" over (wifi LAN) from my NFS-Server/Laptop  -> (client) WD-Media-Player -> via hdmi-cable to my HDTV.
... grabbed some popcorn.

You can tighten down permissions more, as well, and there is also sNFS (secure NFS), which entails a bit more, for remote use, but if your only local, you don't need it.
NFS has good performance, even over wifi, and is basically, as easy as "Pi".

FTP was NOT designed for these needs, since it's simply a protocol, whereas NFS was, and still is, built for this.

Last edited by scjet (2015-03-12 07:31:02)

Offline

#11 2015-03-22 07:46:39

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,920

Re: Pi Nas

Fired up pi with raspain on it, ssh works out of the box. Updated added nfs server and set wireless up. But it is painfully slow during ssh session via wifi, wired is not so much of an issue but kind of ties it too being next too router. Might have to find something with a little more power or buy new pi version. Archarmpi would not even load on sd card, loads of failed files....

Note too self do not take a laptop apart if you do not know what you are doing.


Comments, suggestions please feel free to contact me mrgreen(at)archbang(dot)org

Offline

#12 2015-03-22 12:56:36

scjet
Member
From: Canada
Registered: 2010-12-01
Posts: 1,468

Re: Pi Nas

"ssh session via wifi, wired" is never going to be fast. Rasp-PI is basically better for unsecured LAN's, hard-wired should give you optimal bandwidth, (text-login-terminals) all the time.
plain NFS however, should wotk fine though ? mmm.

No arguement with taking apart Laptops, it seems many of them have purposeful "suicide" screws where the minute you start taking them apart, the dam thing causes so many other issues, and notice how the "manuals" are purposefully useless too, they're a cartoon joke these days...? -ya, planned obsolesence -jus a bit eh? sad
ahh well.

Last edited by scjet (2015-03-22 13:07:27)

Offline

#13 2015-03-22 13:11:03

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,920

Re: Pi Nas

I have got nfs working, just finding a bit of a lag running via wifi... Wired does seem better but does not give the flexibility I need. Now added a 32gb usb stick for extra storage. Going to add a larger drive via usb but will need extra power I think.

Got given a couple of laptops and for some unknown reason I wanted to take a look inside to see how it worked.  My intent was too change dvd drive for a hard drive and maybe upgrade internal drive... First thing that went wrong was breaking off a key while trying to remove keyboard. Then things went downhill from there on....


Comments, suggestions please feel free to contact me mrgreen(at)archbang(dot)org

Offline

Board footer

Powered by FluxBB