guslterFS

Installing GlusterFS - a Quick Start Guide

Purpose of this document

This document is intended to give you a step by step guide to settinideologicalg up GlusterFS for th系统/运维e firs色多多绿巨人黑科技下载安装t time. For this tutorial, we will assume you are usinideasg Fedora系统/运维 21 (or later) virtual machines (other distlinux系统安装ributions and methods can be found in the new user guide, below. We also do not explain the steps i系统运维工程面试问题及答案n detail here, this guide is just to help you get it up and running as soon as possible. After you deploy GlusterFS by following these steps, we recommend that you read the GlinuxlusterFS Admin Guide to learn how to administer GlusterFS and how to select a volume type that fits your needs. Read the GlusterFS New User Guide for a more detailed expla色达nation系统运维面试题及答案 of the steps we took here. We want you to be successful in as short a time色达 as possible.

If you would like a more detailed walk through wi色多多黑科技黄iosth instructions for installing using different methods (in local virtu色多多app下载安装华为市场al machines, EidealC2 anide0sgrtsts另d baremet系统运维面试题及答案al) and different distributions, then havelinux系统安装 a look at the Install guide.

Automatically deploying GlusterFS with Puppet-Gluster+Vagrant

If you'd like to dlinux重启命令eploy GlusterFS automatically using Pupp系统运维工资一般多少et-Gluster+Vagrantlinux常用命令, have a look at ​​this article​​.

Step 1 – Have at least two nodes

  • Fedora 20 on two nodes色多多科技app named "server1" and "server2"
  • A working network connection
  • At least two virtual disks, one for the OS installation, and one to be used to serve GlusterFS storage (sdb). Thlinux系统is will emulate a real world deployment, where you would want to separate GlusterFS storage from the OS install.
  • Note: Glus色达terFS stores its dynamically generated configuration色的笔顺 files at /var/lib/glusterd. If at any point in time GlusterFS is unable to wlinux操作系统基础知识rite to these files (for example, when the backing filesystem is full), it wiidell at minimum cause erratic behavior for your system; or worse, take your system offsedline completely. It is advisable to create separate partitions for directories such a系统运维工程s /var/log to ensure this does not happen.

Step 2 - Format and mountlinux the bricks

(on both nodes): Note: These examples are going to assidentificationume the brick is going to reside on /de系统运维工程师面试问题及答案v/sdb1.

mkfs.xfs-isize=512/dev/sdb1
mkdir-p/data/brick1
echo '/dev/sdb1/data/brick1xfsdefaults12' >>/etc/fstab
mount-a&&mount

You should now see sdb1色达 mounted at /data/brick1

Step 3 - Installing GlussedterFS

(on both server色多多科技apps) Install色多多绿巨人黑科技下载安装 the soflinux系统安装tware

yuminstallglusterfs-server

Start the GlusterFS management daemon:

serviceglusterdstart
serviceglusterdstatus
glusterd.service-LSB:glusterfsserver
Loaded:loaded(/etc/rc.d/init.d/glusterd)
Active:active(running)sinceMon,13Aug201213:02:11-0700;2sago
Process:19254ExecStart=/etc/rc.d/init.d/glusterdstart(code=exited,status=0/SUCCESS)
CGroup:name=systemd:/system/glusterd.service
├19260/usr/sbin/glusterd-p/run/glusterd.pid
├19304/usr/sbin/glusterfsd--xlator-optiongeorep-server.listen-port=24009-slocalhost...
└19309/usr/sbin/glusterfs-f/var/lib/glusterd/nfs/nfs-server.vol-p/var/lib/glusterd/...

Step 4 - Confiidentificationgure the trusted pool

From "server1"

glusterpeerprobeserver2

Note: When usinlinux操作系统基础知识g hostnames, the色多多app下载 first server needs to be problinux系统ed from one other server to set its hostname.

From "server2"

glusterpeerprobeserver1

Note: Once thi色多多下载s pool has been established, only trusted members may probe new servers into tidentifyhe pool. A new server cannot probe the pool, it must be probed from the pool.

Step 5 - Set up a GlusterFS volume

On both server1 and server2:

mkdir/data/brick1/gv0

From any single server:

glustervolumecreategv0replica2server1:/data/brick1/gv0server2:/data/brick1/gv0
glustervolumestartgv0

Confilinux必学的60个命令rm that the volume shows "S色多多科技下载安装tarted":

glustervolumeinfo

Note: If the volume is not started, clues as to what went wrong will be in log files under /var/log/glusterfs on one or bothlinux of the servers - us色多多科技下载安装ual系统/运维ly in etc-glinux删除文件命令lusterfs-glusterd.vol.log

Step 6色多多app下载安装华为市场 - Testing the GlusterFS volinuxlume

For this step, we will use one of the servers to mlinux重启命令ount the volume. Typically, you would do this from an external machine, known as a "client". Since using this method would require additional packages to be instlinux删除文件命令allinux操作系统基础知识lelinux操作系统基础知识d on the client machine,色多多黑科技黄ios we will use one of the servers as a simple place to test first, as if it were that "client".

mount-tglusterfsserver1:/gv0/mnt
foriin`seq-w1100`;docp-rp/var/log/messages/mnt/copy-test-$i;done

First, check the mount point:

ls-lA/mnt|wc-l

You should sideologyee 100 fileslinux操作系统基础知识 returned. Nsedext, check the GlusterFS mount points on each seideologyrver:

ls-lA/data/brick1/gv0

You should see 100 files on each server using the method we listed here. Without replication, in a distribute only volume (not detailed here), you should see about 50 files on each one.

​​Terminologies​​ you should be famillinux系统iar withide.