zoukankan      html  css  js  c++  java
  • glusterfs安装和初始化

    系统环境:centos 6 x86_64  

    集群环境:server1 server2

    1,添加glusterfs源到centos

    wget -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/LATEST/RHEL/glusterfs-epel.repo

    安装glusterfs-server

    yum install glusterfs-server

    这时,如果提示缺少pyxattr和liburcu两个包,可以这样下载和安装

    wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/visionsoftware/CentOS_CentOS-6/x86_64/pyxattr-0.5.0-4.2.x86_64.rpm
    rpm -ivh
    pyxattr-0.5.0-4.2.x86_64.rpm
    
    
    wget ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/userspace-rcu-0.7.7-1.el6.x86_64.rpm
    rpm -ivh userspace-rcu-0.7.7-1.el6.x86_64.rpm

    2,启动glusterfs服务

    service glusterd start

    查看glusterfs服务运行状态

     service glusterd status

    3,在server1中执行

    gluster peer probe server2

    在server2中执行

    gluster peer probe server1

    当这两个节点之间建立互信生成一个pool之后,再添加其它节点,只能从这两个节点执行

    gluster peer probe hostname

    来添加新的节点,不能从新节点或其它pool中,添加当前pool中的节点。

    4,在server1和server2中分别执行

    mkdir /data/brick1/gv0

    5,在server1或server2任一一台机器上执行

    gluster volume create gv0 replica 2 server1:/data/brick1/gv0 server2:/data/brick1/gv0
    
    gluster volume start gv0

    6,测试glusterfs安装结果

    mount -t glusterfs server1:/gv0 /mnt
    
    for i in `seq -w 1 100`; do cp -rp /var/log/messages /mnt/copy-test-$i; done
    
    ls -lA /mnt | wc -l
    
    ls -lA /data/brick1/gv0

    随笔内容主要摘抄自glusterfs官方文档

  • 相关阅读:
    jchdl
    jchdl
    UVa 10256 (判断两个凸包相离) The Great Divide
    UVa 11168 (凸包+点到直线距离) Airport
    LA 2572 (求可见圆盘的数量) Kanazawa
    UVa 10652 (简单凸包) Board Wrapping
    UVa 12304 (6个二维几何问题合集) 2D Geometry 110 in 1!
    UVa 10674 (求两圆公切线) Tangents
    UVa 11796 Dog Distance
    LA 3263 (平面图的欧拉定理) That Nice Euler Circuit
  • 原文地址:https://www.cnblogs.com/unsea/p/4694973.html
Copyright © 2011-2022 走看看