Step #1
You will need to install some software before being able to use GlusterFS. Open the Terminal by clicking the Applications button located at the top of the screen. After that, click Accessories and then Terminal in the dropdown menu that appears. Enter the following command in the terminal to install software:
sudo su
apt-get install sshfs build-essential flex bison byacc vim wget
Step #2
Now you need to install fuse from the source by entering the following command:
cd /root/
wget http://europe.gluster.org/glusterfs/fuse/fuse-2.7.4glfs11.tar.gz
tar -zxvf fuse-2.7.4glfs11.tar.gz
cd /root/fuse-2.7.4glfs11
After that, you will need to compile fuse by entering the following command into the terminal:
./configure
make && make install
Step #3
You are now ready to install GlusterFS. To do this, enter the following command into the terminal:
cd /root/
wget http://ftp.gluster.com/pub/gluster/glusterfs/2.0/LATEST/glusterfs-2.0.0rc2.tar.gz
tar -zxvf glusterfs-2.0.0rc2.tar.gz
cd /root/glusterfs-2.0.0rc2/
To compile the files, enter the following command:
./configure
make && make install
Step #4
After doing that, enter the following command into the terminal:
cp /usr/local/lib/* -R /usr/lib/
Enter the following command to create folders that will be used later:
mkdir /mnt/glusterfs
mkdir /data/
mkdir /data/export
mkdir /data/export-ns
mkdir /etc/glusterfs/
Step #5
Now you need to configure the servers for GlusterFS. Enter the following command:
vi /etc/glusterfs/glusterfs-server.vol
Step #6
Modify the file to look like this:
# file: /etc/glusterfs/glusterfs-server.vol
volume posix
type storage/posix
option directory /data/export
end-volume
volume locks
type features/locks
subvolumes posix
end-volume
volume brick
type performance/io-threads
option thread-count 8
subvolumes locks
end-volume
volume posix-ns
type storage/posix
option directory /data/export-ns
end-volume
volume locks-ns
type features/locks
subvolumes posix-ns
end-volume
volume brick-ns
type performance/io-threads
option thread-count 8
subvolumes locks-ns
end-volume
volume server
type protocol/server
option transport-type tcp
option auth.addr.brick.allow *
option auth.addr.brick-ns.allow *
subvolumes brick brick-ns
end-volume
Step #7
Enter the following command to start the server:
glusterfsd -f /etc/glusterfs/glusterfs-server.vol
Step #8
To edit the client, enter the following command into the terminal:
vi /etc/glusterfs/glusterfs-client.vol
Step #9
Modify the file to look like this:
### Add client feature and attach to remote subvolume of server1
volume brick1
type protocol/client
option transport-type tcp/client
option remote-host 192.168.0.1 # IP address of the remote brick
option remote-subvolume brick # name of the remote volume
end-volume
### Add client feature and attach to remote subvolume of server2
volume brick2
type protocol/client
option transport-type tcp/client
option remote-host 192.168.0.2 # IP address of the remote brick
option remote-subvolume brick # name of the remote volume
end-volume
### The file index on server1
volume brick1-ns
type protocol/client
option transport-type tcp/client
option remote-host 192.168.0.1 # IP address of the remote brick
option remote-subvolume brick-ns # name of the remote volume
end-volume
### The file index on server2
volume brick2-ns
type protocol/client
option transport-type tcp/client
option remote-host 192.168.0.2 # IP address of the remote brick
option remote-subvolume brick-ns # name of the remote volume
end-volume
#The replicated volume with data
volume afr1
type cluster/afr
subvolumes brick1 brick2
end-volume
#The replicated volume with indexes
volume afr-ns
type cluster/afr
subvolumes brick1-ns brick2-ns
end-volume
#The unification of all afr volumes (used for > 2 servers)
volume unify
type cluster/unify
option scheduler rr # round robin
option namespace afr-ns
subvolumes afr1
end-volume
Step #10
You can now mount GlusterFS on all servers in the cluster by entering the following command:
glusterfs -f /etc/glusterfs/glusterfs-client.vol /mnt/glusterfs
Published by The Armchair Geek
We are a Mid-West PLR Firm specializing in creating powerful web content for clients in a wide array of industries. This is a sampling of some of our IT-focused articles. For more of our work, you can co... View profile
- Ext2 Installable File System for WindowsWindows network operating systems since NT onward have used NTFS, the desktop versions caught on a little later but XP and up support it. If you format your Windows partition using NTFS, it may not be able to read Li...
- Cheats for Sims 2 on the PCHere are cheats for the addictive game Sims 2 on the PC platform
How to Install Qmailtoaster Project on LinuxThis step-by-step tutorial will walk you through the process of installing Qmailtoaster on your Linux system.
Nemo - a New Linux File Manager Where the Files Manage ThemselvesNemo is a file manager, but not really. Instead of forcing you to standardize your filing system, Nemo simply shows you when you used a particular document, then lets you open...
Using Conky - the Ultimate Linux System MonitorLearn how to configure and customize Conky - the light weight put powerful system monitor for Linux
- Compiling the Linux 2.6 Kernel from Scratch
- What is Ext3 Linux File System?
- All About the Reiser FS Hard Disk File System
- Columbine High School Shooting and the Incident Command System
- Understanding the Zettabyte File System for Hard Disks
- Minirok: A Lightweight, File System Basic Music Player for Linux
- How to Access and Use a Windows Command Line
