系统屋 - 系统光盘下载网站!

当前位置:首页 > 系统教程 > Linux教程 > 详细页面

CentOS 6.4如何安装及设置GlusterFS(2)

时间:2023-01-27来源:系统屋作者:qipeng

  4. 在sc2-log1上创建GlusterFS磁盘:

  代码如下

  [root@sc2-log1 ~]# gluster volume create models replica 4 sc2-log1:/usr/local/share/models sc2-log2:/usr/local/share/models sc2-log3:/usr/local/share/models sc2-log4:/usr/local/share/models force

  1 volume create: models: success: please start the volume to access data

  [root@sc2-log1 ~]# gluster volume create geoip replica 4 sc2-log1:/usr/local/share/geoip sc2-log2:/usr/local/share/geoip sc2-log3:/usr/local/share/geoip sc2-log4:/usr/local/share/geoip force

  1 volume create: geoip: success: please start the volume to access data

  [root@sc2-log1 ~]# gluster volume create wurfl replica 4 sc2-log1:/usr/local/share/wurfl sc2-log2:/usr/local/share/wurfl sc2-log3:/usr/local/share/wurfl sc2-log4:/usr/local/share/wurfl force

  1 volume create: wurfl: success: please start the volume to access data

  [root@sc2-log1 ~]# gluster volume start models

  1 volume start: models: success

  [root@sc2-log1 ~]# gluster volume start geoip

  1 volume start: geoip: success

  [root@sc2-log1 ~]# gluster volume start wurfl

  1 volume start: wurfl: success

  [root@sc2-log1 ~]# gluster volume info

  01 Volume Name: models

  02 Type: Replicate

  03 Volume ID: b29b22bd-6d8c-45c0-b199-91fa5a76801f

  04 Status: Started

  05 Number of Bricks: 1 x 4 = 4

  06 Transport-type: tcp

  07 Bricks:

  08 Brick1: sc2-log1:/usr/local/share/models

  09 Brick2: sc2-log2:/usr/local/share/models

  10 Brick3: sc2-log3:/usr/local/share/models

  11 Brick4: sc2-log4:/usr/local/share/models

  12

  13 Volume Name: geoip

  14 Type: Replicate

  15 Volume ID: 69b0caa8-7c23-4712-beae-6f536b1cffa3

  16 Status: Started

  17 Number of Bricks: 1 x 4 = 4

  18 Transport-type: tcp

  19 Bricks:

  20 Brick1: sc2-log1:/usr/local/share/geoip

  21 Brick2: sc2-log2:/usr/local/share/geoip

  22 Brick3: sc2-log3:/usr/local/share/geoip

  23 Brick4: sc2-log4:/usr/local/share/geoip

  24

  25 Volume Name: wurfl

  26 Type: Replicate

  27 Volume ID: c723a99d-eeab-4865-819a-c0926cf7b88a

  28 Status: Started

  29 Number of Bricks: 1 x 4 = 4

  30 Transport-type: tcp

  31 Bricks:

  32 Brick1: sc2-log1:/usr/local/share/wurfl

  33 Brick2: sc2-log2:/usr/local/share/wurfl

  34 Brick3: sc2-log3:/usr/local/share/wurfl

  35 Brick4: sc2-log4:/usr/local/share/wurfl

  5. 在sc2-ads15上部署客户端并mount GlusterFS文件系统:

  [sc2-ads15][root@sc2-ads15 ~]# wget -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-epel.repo

  [sc2-ads15][root@sc2-ads15 ~]# yum install -y glusterfs-3.4.2-1.el6 glusterfs-fuse-3.4.2-1.el6

  [sc2-ads15][root@sc2-ads15 ~]# mkdir -p /mnt/{models,geoip,wurfl}

  [sc2-ads15][root@sc2-ads15 ~]# mount -t glusterfs -o ro sc2-log3:models /mnt/models/

  [sc2-ads15][root@sc2-ads15 ~]# mount -t glusterfs -o ro sc2-log3:geoip /mnt/geoip/

  [sc2-ads15][root@sc2-ads15 ~]# mount -t glusterfs -o ro sc2-log3:wurfl /mnt/wurfl/

  [sc2-ads15][root@sc2-ads15 ~]# df -h

  1 Filesystem Size Used Avail Use% Mounted on

  2 /dev/mapper/vg_t-lv_root

  3 59G 7.7G 48G 14% /

  4 tmpfs 3.9G 0 3.9G 0% /dev/shm

  5 /dev/xvda1 485M 33M 428M 8% /boot

  6 sc2-log3:models 98G 8.6G 85G 10% /mnt/models

  7 sc2-log3:geoip 98G 8.6G 85G 10% /mnt/geoip

  8 sc2-log3:wurfl 98G 8.6G 85G 10% /mnt/wurfl

 2/3   首页 上一页 1 2 3 下一页 尾页
分享到:

相关信息

  • Linux自动生成MAC地址的方法汇总

    Linux下生产MAC地址的方法有很多种,除了常见的shell生成法外,还能通过Perl、ruby等方法来生成MAC地址,下面小编对MAC地址的自动生成方法做了简单的汇总。...

    2023-01-26

  • Linux安装GBK/GB2312程序显示乱码怎么办?

    不少用户在Linux系统中安装GBK或GB2312的时候遇到了乱码问题,这主要是系统默认语言是uft8所导致,对于该问题可用五种方法进行解决,下面小编就给大家介绍下Linux安装GBK或GB2312程序显示乱码的解决方法。...

    2023-01-26

评论

系统教程栏目

栏目热门教程

人气教程排行

站长推荐

热门系统下载

公众号