Best way to share between two raspberry pi's

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I got the setup off more then one rpi's

1. My media player runs on openELEC
2. Raspbian Wheezy (debian) my download center

So that's my setup

Now I want from rpi2 to write on a usb drive on rpi1. What is the best way to share between them.

I know a little about samba (not good but I get it to work).

What protocol is the best for writing between linux.

Re: Best way to share between two raspberry pi's
On 24/11/13 18:57, Dennis P wrote:
Quoted text here. Click to load it

NFS is best.

sshfs is an alternative.

Also scp for individual files, and rsync for copying anything from  
individual files to whole filesystems.

Re: Best way to share between two raspberry pi's
On 24/11/13 18:57, Dennis P wrote:
Quoted text here. Click to load it

Best will be different for different people, but I find the sort of  
ad-hoc networking you want to do is best done with ssh and fuse. It's  
not just for file transfers either. You can run applications remotely  
and use the remote system as a proxy server. Rsync works well over ssh,  
and of course just using it to log in as a terminal is handy too. It can  
be as secure as you want it to be, and can even do port forwarding. Once  
you know how to use ssh, operating systems which don't have it available  
natively just seem inadequate.

For your intended use, make sure ssh-server is installed on the system  
you want to connect to and fuse and sshfs are installed locally, then  
use sshfs to connect to that server and mount the drive somewhere in  
your local file system. I would use something like:

sshfs pi@<IP-address-of-pi>:/home/pi/<remote-dir>  
/home/<local-username>/<local-dir>  
-oauto_cache,reconnect,transform_symlinks,follow_symlinks

The options are so that if the <remote-dir> is a symlink then things  
still work.

You unmount the remote directory from the local mount point with:

fusermount -u <local-dir>

--  
    ???????????????
    ? ? ?     ?   ?
We've slightly trimmed the long signature. Click to see the full one.
Re: Best way to share between two raspberry pi's
On 24/11/13 18:57, Dennis P wrote:
Quoted text here. Click to load it

NFS is best.

sshfs is an alternative.

Also scp for individual files, and rsync for copying anything from  
individual files to whole filesystems.

Re: Best way to share between two raspberry pi's
On 24/11/13 18:57, Dennis P wrote:
Quoted text here. Click to load it

NFS is best.

sshfs is an alternative.

Also scp for individual files, and rsync for copying anything from  
individual files to whole filesystems.

Re: Best way to share between two raspberry pi's
Quoted text here. Click to load it

NFS is good. With NFS rpi1's drive can appear to rpi2 to be a local  
directory.

For sharing with Windows, on the other hand, Samba is good if you can get  
the security the way you want it.

James



Re: Best way to share between two raspberry pi's
On 24/11/13 18:57, Dennis P wrote:
Quoted text here. Click to load it
NFS

--  
Ineptocracy

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
We've slightly trimmed the long signature. Click to see the full one.
Re: Best way to share between two raspberry pi's
Op zondag 24 november 2013 19:57:49 UTC+1 schreef Dennis P:
Quoted text here. Click to load it

Thank you all for the answer.

I'm going to look in both protocols.
sshfs sounds good and Jim is trying to convince me so I assume he knows a little
and NFS I heard off that before.

Samba is a lot off trouble I never get it good in one time.

Maybe i forgot to tell that rpi2 I can only use the terminal. But I'm going to read about these protocols and going to try this week.

Thanks for the fast answers.

Re: Best way to share between two raspberry pi's
On 24/11/13 21:11, Dennis P wrote:
Quoted text here. Click to load it

sample nfs configuration:
install nfs on client and server

I think the current packages are nfs-kernel-server and nfs-common

on SERVER edit/create /etc/exports

as e.g to make /var globally and root mountable remotely

/var        *(rw,sync,no_root_squash,no_subtree_check)

run exportfs -a to install changes.

on client edit /etc/hosts to give a name to the ip address of the server pi

e.g..
192.168.0.100 pi

mkdir /home/other-pi

edit /etc/fstab and add a line like

pi:/var/ /home/other-pi nfs defaults 0 0

and run
mount -a



You have just added a remote machine to your filesystem!




--  
Ineptocracy

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
We've slightly trimmed the long signature. Click to see the full one.
Re: Best way to share between two raspberry pi's
On 24/11/13 21:23, The Natural Philosopher wrote:
Quoted text here. Click to load it
errata
/etc/hosts should have
192.168.0.100 other-pi

--  
Ineptocracy

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline