激情久久久_欧美视频区_成人av免费_不卡视频一二三区_欧美精品在欧美一区二区少妇_欧美一区二区三区的

服務器之家:專注于服務器技術及軟件下載分享
分類導航

Linux|Centos|Ubuntu|系統(tǒng)進程|Fedora|注冊表|Bios|Solaris|Windows7|Windows10|Windows11|windows server|

服務器之家 - 服務器系統(tǒng) - Centos - CentOS 6.4如何安裝及設置GlusterFS以解決網絡存儲的問題

CentOS 6.4如何安裝及設置GlusterFS以解決網絡存儲的問題

2019-09-16 17:26服務器之家 Centos

使用GlusterFS能夠解決網絡存儲、冗余備份等問題,那么在Linux下要如何安裝GlusterFS呢?下面為大家介紹下CentOS6.4安裝配置GlusterFS的方法

GlusterFS因有很好的擴展性,使用的用戶很多,使用GlusterFS能夠解決網絡存儲、冗余備份等問題,那么在Linux下要如何安裝GlusterFS呢?今天小編以CentOS6.4為例,給大家介紹下CentOS6.4安裝配置GlusterFS的方法。

CentOS 6.4如何安裝及設置GlusterFS以解決網絡存儲的問題

環(huán)境介紹:

OS: CentOS 6.4 x86_64 Minimal

Servers: sc2-log1,sc2-log2,sc2-log3,sc2-log4

Client: sc2-ads15

具體步驟:

1. 在sc2-log{1-4}上安裝GlusterFS軟件包:

代碼如下

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

# yum install -y glusterfs-3.4.2-1.el6 glusterfs-server-3.4.2-1.el6 glusterfs-fuse-3.4.2-1.el6

# /etc/init.d/glusterd start

# chkconfig glusterfsd on

2. 在sc2-log1上配置整個GlusterFS集群:

代碼如下

[root@sc2-log1 ~]# gluster peer probe sc2-log1

1 peer probe: success: on localhost not needed

[root@sc2-log1 ~]# gluster peer probe sc2-log2

1 peer probe: success

[root@sc2-log1 ~]# gluster peer probe sc2-log3

1 peer probe: success

[root@sc2-log1 ~]# gluster peer probe sc2-log4

1 peer probe: success

[root@sc2-log1 ~]# gluster peer status

01 Number of Peers: 3

02

03 Hostname: sc2-log2

04 Port: 24007

05 Uuid: 399973af-bae9-4326-9cbd-b5b05e5d2927

06 State: Peer in Cluster (Connected)

07

08 Hostname: sc2-log3

09 Port: 24007

10 Uuid: 833a7b8d-e3b3-4099-baf9-416ee7213337

11 State: Peer in Cluster (Connected)

12

13 Hostname: sc2-log4

14 Port: 24007

15 Uuid: 54bf115a-0119-4021-af80-7a6bca137fd9

16 State: Peer in Cluster (Connected)

3. 在sc2-log{1-4}上創(chuàng)建數(shù)據(jù)存放目錄:

代碼如下

# mkdir -p /usr/local/share/{models,geoip,wurfl}

# ls -l /usr/local/share/

1 total 24

2 drwxr-xr-x 2 root root 4096 Apr 1 12:19 geoip

3 drwxr-xr-x 2 root root 4096 Apr 1 12:19 models

4 drwxr-xr-x 2 root root 4096 Apr 1 12:19 wurfl

4. 在sc2-log1上創(chuàng)建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文件系統(tǒng):

[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

6. 相關數(shù)據(jù)讀寫可用性測試:

在sc2-ads15掛載點上寫入數(shù)據(jù):

代碼如下

[sc2-ads15][root@sc2-ads15 ~]# umount /mnt/models

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

[sc2-ads15][root@sc2-ads15 ~]# echo “This is sc2-ads15” 》 /mnt/models/hello.txt

[sc2-ads15][root@sc2-ads15 ~]# mkdir /mnt/testdir

在sc2-log1數(shù)據(jù)目錄中進行查看:

[root@sc2-log1 ~]# ls /usr/local/share/models/

1 hello.txt testdir

結果: 數(shù)據(jù)寫入成功

在sc2-log1數(shù)據(jù)目錄中直接寫入數(shù)據(jù):

代碼如下

[root@sc2-log1 ~]# echo “This is sc2-log1” 》 /usr/local/share/models/hello.2.txt

[root@sc2-log1 ~]# mkdir /usr/local/share/models/test2

在sc2-ads15掛載點上進行查看:

[sc2-ads15][root@sc2-ads15 ~]# ls /mnt/models

[sc2-ads15][root@sc2-ads15 ~]# ls -l /mnt/models

1 hello.txt testdir

結果: 數(shù)據(jù)寫入失敗

在sc2-log1掛載點上寫入數(shù)據(jù):

代碼如下

[root@sc2-log1 ~]# mount -t glusterfs sc2-log1:models /mnt/models/

[root@sc2-log1 ~]# echo “This is sc2-log1” 》 /mnt/models/hello.3.txt

[root@sc2-log1 ~]# mkdir /mnt/models/test3

在sc2-ads15掛載點上進行查看:

[sc2-ads15][root@sc2-ads15 models]# ls /mnt/models

1 hello.2.txt hello.3.txt hello.txt test2 test3 testdir

結果: 數(shù)據(jù)寫入成功,同時之前寫入失敗的數(shù)據(jù)也成功加載了。

最終結論:

在數(shù)據(jù)目錄中直接寫入數(shù)據(jù),會導致其它節(jié)點因為得不到通知而使數(shù)據(jù)同步失敗。

正確的做法是所有的讀寫操作都通過掛載點來進行。

7. 其它操作筆記:

刪除GlusterFS磁盤:

代碼如下

# gluster volume stop models

# gluster volume delete models

卸載GlusterFS磁盤:

代碼如下

sc2-log4

ACL訪問控制:

代碼如下

# gluster volume set models auth.allow 10.60.1.*,10.70.1.*

添加GlusterFS節(jié)點:

代碼如下

# gluster peer probe sc2-log5

# gluster peer probe sc2-log6

# gluster volume add-brick models sc2-log5:/data/gluster sc2-log6:/data/gluster

遷移GlusterFS磁盤數(shù)據(jù):

代碼如下

# gluster volume remove-brick models sc2-log1:/usr/local/share/models sc2-log5:/usr/local/share/models start

# gluster volume remove-brick models sc2-log1:/usr/local/share/models sc2-log5:/usr/local/share/models status

# gluster volume remove-brick models sc2-log1:/usr/local/share/models sc2-log5:/usr/local/share/models commit

修復GlusterFS磁盤數(shù)據(jù)(例如在sc2-log1宕機的情況下):

代碼如下

# gluster volume replace-brick models sc2-log1:/usr/local/share/models sc2-log5:/usr/local/share/models commit -force

# gluster volume heal models full

通過本文的介紹,想必你已經對GlusterFS在CentOS6.4的安裝配置有了一定的了解,除此之外,本文還介紹了GlusterFS的其他操作方法。

延伸 · 閱讀

精彩推薦
  • CentosCentos 7開啟網卡自動獲取IP的詳細方法

    Centos 7開啟網卡自動獲取IP的詳細方法

    本篇文章主要介紹了Centos 7開啟網卡自動獲取IP的詳細方法,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧...

    凌鋒8972021-12-29
  • CentosCentOS下Uptime命令詳解

    CentOS下Uptime命令詳解

    在Linux下,我們可以使用uptime命令,而且此命令不必使用root權限。uptime命令在系統(tǒng)中已經默認安裝了。今天小編為大家?guī)淼氖荂entOS下Uptime命令詳解;希望...

    CentOS之家11482019-06-19
  • CentosCentOS6.5下Redis安裝與配置詳細步驟

    CentOS6.5下Redis安裝與配置詳細步驟

    本篇文章主要介紹了CentOS6.5下Redis安裝與配置詳細步驟,詳細介紹redis單機單實例安裝與配置,服務及開機自啟動。有興趣的可以了解一下。...

    飛流11452021-12-24
  • CentosCentos7運用/dev/shm進行網站優(yōu)化

    Centos7運用/dev/shm進行網站優(yōu)化

    這篇文章主要介紹了LINUX中Centos7運用/dev/shm進行網站優(yōu)化相關知識點,對此有興趣的朋友參考學習下。...

    彬菌9912022-03-02
  • CentosCentOS 6.6實現(xiàn)永久修改DNS地址的方法

    CentOS 6.6實現(xiàn)永久修改DNS地址的方法

    這篇文章主要介紹了CentOS 6.6實現(xiàn)永久修改DNS地址的方法,涉及針對CentOS配置文件的相關設置技巧,具有一定參考借鑒價值,需要的朋友可以參考下 ...

    Linux社區(qū)4472020-08-21
  • CentosCentOS7設置日期和時間方法以及基本概念介紹

    CentOS7設置日期和時間方法以及基本概念介紹

    這篇文章主要介紹了CentOS7設置日期和時間方法以及基本概念介紹,本文講解使用CentOS7中的新命令timedatectl設置日期時間方法,需要的朋友可以參考下 ...

    CentOS之家6522019-09-19
  • Centoscentos不小心刪除/root目錄該如何解決?

    centos不小心刪除/root目錄該如何解決?

    一些朋友最近在問小編centos不小心刪除/root目錄該如何解決?今天小編就為大家分享centos不小心刪除/root目錄解決辦法;希望對大家會有幫助,有需要的朋友...

    腳本之家8022019-05-29
  • Centoscentos 安裝與操作方法

    centos 安裝與操作方法

    這篇文章主要介紹了centos 安裝與操作方法,需要的朋友可以參考下...

    centos之家5272019-07-11
主站蜘蛛池模板: 久久99精品久久久久久236 | 色柚视频网站ww色 | 精品国产一区二区三区久久久蜜 | 国产亚洲欧美在线视频 | wankzhd| 国产99久久精品一区二区300 | av在线直播观看 | 欧美成人做爰高潮片免费视频 | 依依成人综合 | 欧美成人一区二区三区 | 亚洲一区成人 | 国产亚洲精品久久久久婷婷瑜伽 | 在线观看视频毛片 | 黄色毛片一级视频 | 国产一国产精品一级毛片 | 美女亚洲综合 | 成人9禁啪啪无遮挡免费 | 免费久久久久久 | 精品一区二区三区欧美 | 久久精品一区二区三 | 欧美成人一区免费视频 | 国产午夜小视频 | 欧美成年性h版影视中文字幕 | 久久久久一区 | 亚洲伊人色欲综合网 | bt 自拍 另类 综合 欧美 | 国产午夜免费不卡精品理论片 | av影院在线播放 | 亚洲精品tv久久久久久久久久 | 一级免费黄色免费片 | 日韩黄色免费观看 | 国产午夜三级一区二区三桃花影视 | 久久久中精品2020中文 | 久草在线免费看 | 欧洲黄色一级视频 | 国产妇女乱码一区二区三区 | 免费a视频在线观看 | 少妇色诱麻豆色哟哟 | 亚洲欧美国产高清va在线播放 | 一本色道久久综合亚洲精品图片 | 黄色片在线播放 |