roomzinchina
Posts: 1
Joined: Thu Oct 09, 2014 5:59 pm

Distributed network and file system

Thu Oct 09, 2014 6:06 pm

I'm looking to create a distributed network and file system with Raspberry Pi's. The idea is that I have many (10+), each with a USB Wireless Adapter, broadcasting a wireless network with the same SSID. Each Pi then uses this to communicate with each other, so that the storage is distributed allowing anyone on the network to potentially access all storage as if it was one device.

I'd also want to set up one as an Apache web server, to serve a nice GUI allowing you to access/download any files stored across the network.

Could anyone point me to some packages which may help, or related tutorials? Also, since each has to both act as an AP and a client, would I need two adapters for each device?

elatllat
Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: Distributed network and file system

Fri Oct 10, 2014 12:12 am

SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

WebPi
Posts: 262
Joined: Wed Apr 10, 2013 6:47 pm
Location: Birmingham, UK
Contact: Website

Re: Distributed network and file system

Fri Oct 10, 2014 12:28 am

I've used GlusterFS for this. There's a tutorial here: http://banoffeepiserver.com/glusterfs/s ... nodes.html. This should work on a Raspberry Pi.
raspberrywebserver.com - Raspberry Pi tutorials
LinuxWebServers.net - Linux Web Server tutorials and examples
pyplate.com - Python web publishing tool

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Distributed network and file system

Fri Oct 10, 2014 12:37 am

Is it necessary that each Pi has a local copy of the files? If they can all talk to each other, why not just keep the file repository in one place and use the Pis as wireless access points (or just use wireless access points) to reach the network file share? Unless you have unmentioned requirements, you're making this WAY harder than it needs to be.

elatllat
Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: Distributed network and file system

Fri Oct 10, 2014 12:46 am

Tarcas wrote:Is it necessary that each Pi has a local copy of the files?...
The idea is to have every file on 2 of x nodes so one node can go down and the the sysrem will auto replicate, providing redundancy, optimal space usage, and auto scaling.
SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

WebPi
Posts: 262
Joined: Wed Apr 10, 2013 6:47 pm
Location: Birmingham, UK
Contact: Website

Re: Distributed network and file system

Fri Oct 10, 2014 12:54 am

Gluster does that. You can create a Gluster volume that spans multiple hosts. Each volume is made up from bricks of data, with one or more bricks on each host. Bricks can be replicated so that data is backed up on different devices.

You would need to install the Gluster client on the Pi running Apache. That Pi would be able to mount the Gluster volume as if it was a single network hard drive.

What are you planning on doing with this storage?
raspberrywebserver.com - Raspberry Pi tutorials
LinuxWebServers.net - Linux Web Server tutorials and examples
pyplate.com - Python web publishing tool

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Distributed network and file system

Fri Oct 10, 2014 1:45 am

elatllat wrote:
Tarcas wrote:Is it necessary that each Pi has a local copy of the files?...
The idea is to have every file on 2 of x nodes so one node can go down and the the sysrem will auto replicate, providing redundancy, optimal space usage, and auto scaling.
Look into DFS, the distributed file system. I don't know much about it myself, but it should do what you're looking for. Combine that with Samba file sharing and you should be golden.

User avatar
default_user8
Posts: 680
Joined: Mon Nov 18, 2013 3:11 am

Re: Distributed network and file system

Fri Oct 10, 2014 2:16 am

Just tossing this out there, why not run bit torrent sync on each pi, you could access the gui for any instance of btsync and access any file. Each pi would have it's own copy of the files so you would never have to worry about losing any files.
Two heads are better than one, unless one's a goat head.

elatllat
Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: Distributed network and file system

Fri Oct 10, 2014 3:23 am

default_user8 wrote:...why not run bit torrent sync...
A) it's not foss
B) a copy on every pi is a waste of space.
C) it needs 3rd party servers to work.
SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

User avatar
default_user8
Posts: 680
Joined: Mon Nov 18, 2013 3:11 am

Re: Distributed network and file system

Fri Oct 10, 2014 3:44 am

Btsync doesn't use 3rd party servers, you set up your own server and connect others machines as clients.
Two heads are better than one, unless one's a goat head.

elatllat
Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: Distributed network and file system

Fri Oct 10, 2014 3:55 am

default_user8 wrote:Btsync doesn't use 3rd party servers, you set up your own server and connect others machines as clients.
Such faith in closed source...
Wireshark it.
SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

Return to “Advanced users”