GlusterFS on Raspberry Pi
Posted: Thu Dec 26, 2013 9:35 pm
I'm using a Raspberry Pi as storage server with external USB harddrives. So far so good, but now I'd like to have multiple external disks behave like a single big one.
Thanks to a project we're currently busy with at work, I got to know GlusterFS. Which is perfect for that job.
I'm gonna write down the steps necessary to combine 2 partitions on 2 external USB HDDs together in GlusterFS' "distributed" mode. I'll call the Raspberry Pi server "rasputin" in this HowTo, and the Gluster volume "kitschdata".
0) Format partitions and create "brick" folder on each:
On each cluster disk (actually cluster "partition" to be exact), create a folder named "brick". This will be the root for the filesystem handled by GlusterFS.
In my case the disks are mounted as "disk1" and "disk2" in "/media":
1) Create a volume called "kitschdata" with 2 bricks:
This should return the following:
2) Start the volume:
For some unknown reason, this step is missing in all QuickStart tutorials on the Gluster page, but it's quite obvious:
This should display the following message:
3) Mount the volume:
Ok. Now we're ready to already read/write data to our Gluster storage in "/media/gluster".
I'd call that fast and easy
Links:
Setting up GlusterFS server volumes
manpage of "gluster" command
Thanks to a project we're currently busy with at work, I got to know GlusterFS. Which is perfect for that job.
I'm gonna write down the steps necessary to combine 2 partitions on 2 external USB HDDs together in GlusterFS' "distributed" mode. I'll call the Raspberry Pi server "rasputin" in this HowTo, and the Gluster volume "kitschdata".
0) Format partitions and create "brick" folder on each:
On each cluster disk (actually cluster "partition" to be exact), create a folder named "brick". This will be the root for the filesystem handled by GlusterFS.
In my case the disks are mounted as "disk1" and "disk2" in "/media":
Code: Select all
$ mkdir /media/disk1/brick
$ mkdir /media/disk2/brick
Code: Select all
$ gluster volume create kitschdata rasputin:/media/disk1/brick rasputin:/media/disk2/brick
NOTE: Don't mount the volume, yet! This will result in unstable, undesired results. It has to be started first.Creation of volume kitschdata has been successful. Please start the volume to access data.
2) Start the volume:
For some unknown reason, this step is missing in all QuickStart tutorials on the Gluster page, but it's quite obvious:
Code: Select all
$ gluster volume start kitschdata
3) Create a mountpoint for the Gluster volume:Starting volume kitschdata has been successful
Code: Select all
$ mkdir /media/gluster
Code: Select all
$ mount -t glusterfs rasputin:/kitschdata /media/gluster
I'd call that fast and easy
Links:
Setting up GlusterFS server volumes
manpage of "gluster" command