introducing gluster
DESCRIPTION
These are the slides I used in my local libre user group meetup to introduce Gluster to my friends and users from varied backgrounds.TRANSCRIPT
GLUSTERDISTRIBUTED STORAGE
MAY 2013
Anu Bhaskar www.anubhaskar.name
Creative Commons Attribution-ShareAlike 3.0 Unported License.
2
1.Gluster2.Product Architecture3.Use cases4.Prototype Architecture5.Base System Configuration6.Gluster Installation7.Distributed Storage Creation8.Replicated Storage Creation
AGENDA
Creative Commons Attribution-ShareAlike 3.0 Unported License.
3
1.Open source2.Distributed Storage3.Scalable (store petabytes of data with thousands of clients)
4.Cluster together commodity hardware over TCP/IP interconnect
5.Manage data in a single global name space6.Support standard clients running standard applications over any standard IP network
GLUSTER
Creative Commons Attribution-ShareAlike 3.0 Unported License.
4
PRODUCT ARCHITECTURE
Creative Commons Attribution-ShareAlike 3.0 Unported License.
Global Name space
Gluster Virtual Storage Pool
Application Data
Clients Clients
IP Network
Commodity Storage Hardware
5
1. Scale out storage with commodity hardware. Increase or decrease storage capacity whenever required by dynamically adding or removing hardware.
2. Storage tiering. Create multi – tiered storage with commodity hardware
3.Software defined storage. All the controlling logic in storage management lies in software and thus fully configurable and flexible
4. Virtualized storage. Provide virtual storage suitable for clouds as well as legacy systems.
USE CASES
Creative Commons Attribution-ShareAlike 3.0 Unported License.
6
PROTOYPE ARCHITECTURE
Creative Commons Attribution-ShareAlike 3.0 Unported License.
GSRV0110.10.10.3Centos6
GSRV0210.10.10.4Centos6
Distdir1 Distdir2
Distvol
GCLI10.10.10.5Centos6
Distributed Storage
7
PROTOYPE ARCHITECTURE
Creative Commons Attribution-ShareAlike 3.0 Unported License.
GSRV0110.10.10.3Centos6
GSRV0210.10.10.4Centos6
Repdir1 Repdir2
Repvol
GCLI10.10.10.5Centos6
Replicated Storage
Replication
8
Add hostnames to /etc/hosts on all boxes10.10.10.3 gsrv0110.10.10.4 gsrv0210.10.10.5 gcli
BASE SYSTEM CONFIGURATION
Creative Commons Attribution-ShareAlike 3.0 Unported License.
9
Install gluster server software on gsrv01 and gsrv02# yum install glusterfs-server.x86_64
Start gluster server service on gsrv01 and gsrv02# service glusterd start
Create trusted storage pool of two servers gsrv01 and gsrv02 by running below command in gsrv01# gluster peer probe gsrv02
Check peer status from gsrv01 and gsrv02# gluster peer status
GLUSTER INSTALLATION
Creative Commons Attribution-ShareAlike 3.0 Unported License.
10
Create distributed volume from gsrv01# gluster volume create distvol gsrv01:/distdir1 gsrv02:/distdir2
Start the distributed volume from gsrv01# gluster volume start distvol
Check status of distributed volume from gsrv01#gluster volume status distvol
Install gluster client software in host gcli# yum install glusterfs-fuse.x86_64
Mount distributed volume in host gcli# mkdir /mnt/dist# mount.glusterfs gsrv01:/distvol /mnt/dist
DISTRIBUTED STORAGE CREATION
Creative Commons Attribution-ShareAlike 3.0 Unported License.
11
Create two files in the distributed file system mounted in gcli# cd /mnt/dist# touch distfile1 distfile2# ls -l
Log in to hosts gsrv01 and gsrv02 and list files in distdir1 and distdir2. Files will be ditributed between hosts.# ssh gsrv01# ls -l /distdir1
# ssh gsrv02# ls -l /disdir2
DISTRIBUTED STORAGE CREATION
Creative Commons Attribution-ShareAlike 3.0 Unported License.
12
Create replicated volume from gsrv01# gluster volume create repvol replica 2 gsrv01:/repdir1 gsrv02:/repdir2
Start the replicated volume from gsrv01# gluster volume start repvol
Check the status of replicated volume from gsrv01# gluster volume status repvol
Mount the replicated volume in gcli# mkdir /mnt/rep# mount.glusterfs gsrv01:/repvol /mnt/rep
REPLICATED STORAGE CREATION
Creative Commons Attribution-ShareAlike 3.0 Unported License.
13
Create two files in the replicated file system mounted in gcli# cd /mnt/rep# touch repfile1 repfile2# ls -l
Log in to hosts gsrv01 and gsrv02 and list files in repdir1 and repdir2. Files will be replicated to both hosts.# ssh gsrv01# ls -l /repdir1
# ssh gsrv02#ls -l /repdir2
Shutdown gsrv02 and observe which files are accessible to find difference between distributed and replicated file systems
REPLICATED STORAGE CREATION
Creative Commons Attribution-ShareAlike 3.0 Unported License.