Best way to share between two raspberry pi's

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.

Reply to
Dennis P
Loading thread data ...

NFS is best.

sshfs is an alternative.

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

Reply to
Dom

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@:/home/pi/ /home//

-oauto_cache,reconnect,transform_symlinks,follow_symlinks

The options are so that if the is a symlink then things still work.

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

fusermount -u

--
    ??????????????? 
    ? ? ?     ?   ? 
  ??? ? ? ? ? ? ??? 
  ???????????????  -- JimP.
Reply to
Jim Price

NFS is best.

sshfs is an alternative.

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

Reply to
Dom

NFS is best.

sshfs is an alternative.

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

Reply to
Dom

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

Reply to
James Harris

NFS

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
lead are elected by the least capable of producing, and where the  
members of society least likely to sustain themselves or succeed, are  
rewarded with goods and services paid for by the confiscated wealth of a  
diminishing number of producers.
Reply to
The Natural Philosopher

Op zondag 24 november 2013 19:57:49 UTC+1 schreef Dennis P:

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.

Reply to
Dennis P

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  
lead are elected by the least capable of producing, and where the  
members of society least likely to sustain themselves or succeed, are  
rewarded with goods and services paid for by the confiscated wealth of a  
diminishing number of producers.
Reply to
The Natural Philosopher

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  
lead are elected by the least capable of producing, and where the  
members of society least likely to sustain themselves or succeed, are  
rewarded with goods and services paid for by the confiscated wealth of a  
diminishing number of producers.
Reply to
The Natural Philosopher

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.