内射老阿姨1区2区3区4区_久久精品人人做人人爽电影蜜月_久久国产精品亚洲77777_99精品又大又爽又粗少妇毛片

GFS基礎(chǔ)配置安裝(純實(shí)戰(zhàn))

GFS基礎(chǔ)配置安裝

基本概述

? GFS是一個(gè)可擴(kuò)展的分布式文件系統(tǒng),用于大型的、分布式的、對(duì)大量數(shù)據(jù)進(jìn)行訪問(wèn)的應(yīng)用。它運(yùn)行于廉價(jià)的普通硬件上,并提供容錯(cuò)功能。它可以給大量的用戶提供總體性能較高的服務(wù)。

創(chuàng)新互聯(lián)是一家集網(wǎng)站建設(shè),濰坊企業(yè)網(wǎng)站建設(shè),濰坊品牌網(wǎng)站建設(shè),網(wǎng)站定制,濰坊網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營(yíng)銷,網(wǎng)絡(luò)優(yōu)化,濰坊網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長(zhǎng)自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。

基本結(jié)構(gòu)圖

GFS基礎(chǔ)配置安裝(純實(shí)戰(zhàn))

基本部署步驟

一、實(shí)驗(yàn)準(zhǔn)備

名稱角色IP地址
centos7-1 node1 192.168.142.66
centos7-2 node2 192.168.142.77
centos7-3 node3 192.168.142.132
centos7-4 node4 192.168.142.136
centos7-min client 192.168.142.172

二、開(kāi)始安裝

(1)為滿足實(shí)驗(yàn)?zāi)康脑鎏碛脖P

centos7-1

/dev/sdb1                 20G   33M   20G    1% /mnt/sdb1
/dev/sdc1                 20G   33M   20G    1% /mnt/sdc1
/dev/sdd1                 20G   33M   20G    1% /mnt/sdd1
/dev/sde1                 20G   33M   20G    1% /mnt/sde1

centos7-2

/dev/sdb1                 20G   33M   20G    1% /mnt/sdb1
/dev/sdc1                 20G   33M   20G    1% /mnt/sdc1
/dev/sdd1                 20G   33M   20G    1% /mnt/sdd1
/dev/sde1                 20G   33M   20G    1% /mnt/sde1

centos7-3

/dev/sdb1                 20G   33M   20G    1% /mnt/sdb1
/dev/sdc1                 20G   33M   20G    1% /mnt/sdc1
/dev/sdd1                 20G   33M   20G    1% /mnt/sdd1
/dev/sde1                 20G   33M   20G    1% /mnt/sde1

centos7-4

/dev/sdb1                 20G   33M   20G    1% /mnt/sdb1
/dev/sdc1                 20G   33M   20G    1% /mnt/sdc1
/dev/sdd1                 20G   33M   20G    1% /mnt/sdd1
/dev/sde1                 20G   33M   20G    1% /mnt/sde1
(2)安裝GFS(所有存儲(chǔ)節(jié)點(diǎn)均需要安裝)

修改本地hosts文件,方便識(shí)別

[root@node1 yum.repos.d]# vim /etc/hosts
192.168.142.66 node1
192.168.142.77 node2
192.168.142.132 node3
192.168.142.136 node4

配置本地YUM源

(原自帶YUM倉(cāng)庫(kù)無(wú)法滿足需求)

[root@node1 mnt]# cd /etc/yum.repos.d/
[root@node1 yum.repos.d]# mkdir bak
[root@node1 yum.repos.d]# mv CentOS-* bak/
[root@node3 zhy]# cp -r gfsrepo/ /mnt/
[root@node3 yum.repos.d]# vim GFSrep.repo
//手動(dòng)添加
[GFSrep]
name=GFS
baseurl=file:///mnt/gfsrepo
gpgcheck=0
enabled=1

安裝gfs組件并開(kāi)啟

[root@node1 yum.repos.d]# yum -y install glusterfs glusterfs-server glusterfs-fuse glusterfs-rdma

//開(kāi)啟服務(wù)
[root@node1 yum.repos.d]# systemctl start glusterd
[root@node1 yum.repos.d]# systemctl enable glusterd
[root@node1 yum.repos.d]# systemctl stop firewalld.service
[root@node1 yum.repos.d]# setenforce 0

與阿里時(shí)間服務(wù)器進(jìn)行同步

[root@node1 yum.repos.d]# ntpdate ntp1.aliyun.com
18 Dec 19:55:56 ntpdate[2843]: adjust time server 120.25.115.20 offset 0.010820 sec

添加儲(chǔ)存信任池(只需要在任一存儲(chǔ)節(jié)點(diǎn)添加即可)

[root@node1 yum.repos.d]# gluster peer probe node2
peer probe: success.
[root@node1 yum.repos.d]# gluster peer probe node3
peer probe: success.
[root@node1 yum.repos.d]# gluster peer probe node4
peer probe: success.
[root@node1 yum.repos.d]# gluster peer status          //查看各節(jié)點(diǎn)狀態(tài)

二、建立分布式卷

特點(diǎn):(通過(guò)HASH算法進(jìn)行分布)

沒(méi)有冗余性

單點(diǎn)故障,數(shù)據(jù)會(huì)丟失

[root@node1 yum.repos.d]# gluster volume create fenbu node1:/mnt/sdb1 node2:/mnt/sdb1 force
//使用node1的sdb1和node2的sdb1作為節(jié)點(diǎn),部署分布式卷,“force”強(qiáng)制執(zhí)行
volume create: fenbu: success: please start the volume to access data

 //查看分布式卷信息
[root@node1 yum.repos.d]# gluster volume info fenbu

Volume Name: fenbu
Type: Distribute
Volume ID: e7833052-a4c7-4c9f-9660-dc60db737543
。。。。。。
Bricks:
Brick1: node1:/mnt/sdb1
Brick2: node2:/mnt/sdb1

//查看卷組列表
[root@node1 yum.repos.d]# gluster volume list

//開(kāi)啟分布式卷
[root@node1 yum.repos.d]# gluster volume start fenbu
volume start: fenbu: success

三、建立條帶卷

特點(diǎn):

根據(jù)偏移量將文件分成N塊(N個(gè)條器節(jié)點(diǎn)),輪詢的存儲(chǔ)在每個(gè)Brick Server節(jié)點(diǎn)

存儲(chǔ)大文件時(shí),性能尤為突出

不具備冗余性,類似Raid0

[root@node1 mnt]# gluster volume create tiaodai stripe 2 node1:/mnt/sdc1 node2:/mnt/sdc1 force
//“stripe”  分為兩個(gè)區(qū)

//開(kāi)啟條帶卷
[root@node1 mnt]# gluster volume start tiaodai
volume start: tiaodai: success

//查看條帶卷信息
[root@node1 yum.repos.d]# gluster volume info fenbu
Volume Name: tiaodai
。。。。。。
Status: Started
。。。。。。
Bricks:
Brick1: node1:/mnt/sdc1
Brick2: node2:/mnt/sdc1
Options Reconfigured:

四、建立復(fù)制卷

特點(diǎn):

同一份文件保存一份或者多分副本

讀寫速度較慢

具備冗余性

必須由兩個(gè)或更多數(shù)據(jù)庫(kù)組成

[root@node1 mnt]# gluster volume create fuzhi replica 2 node3:/mnt/sdb1 node4:/mnt/sdb1 force
//“replica”    建立副本數(shù)

[root@node1 mnt]# gluster volume start fuzhi
volume start: fuzhi: success

[root@node1 mnt]# gluster volume info fuzhi

Volume Name: fuzhi
。。。。。。
Status: Started
。。。。。。
Bricks:
Brick1: node3:/mnt/sdb1
Brick2: node4:/mnt/sdb1

五、建立分布式條帶卷

特點(diǎn):

兼顧分布式卷和條帶卷的功能

用于大文件處理

至少需要四臺(tái)服務(wù)器

[root@node1 mnt]# gluster volume create fenbu-tiao stripe 2 node1:/mnt/sdd1 node2:/mnt/sdd1 node3:/mnt/sdd1 node4:/mnt/sdd1 force
//“stripe”   具備條帶卷功能,因此需要分片

[root@node1 mnt]# gluster volume start fenbu-tiao
volume start: fenbu-tiao: success

[root@node1 mnt]# gluster volume info fenbu-tiao

Volume Name: fenbu-tiao
。。。。。。
Status: Started
。。。。。。
Bricks:
Brick1: node1:/mnt/sdd1
Brick2: node2:/mnt/sdd1
Brick3: node3:/mnt/sdd1
Brick4: node4:/mnt/sdd1

六、建立分布式復(fù)制卷

特點(diǎn):

兼顧分布式和復(fù)制卷的功能

具有冗余功能

[root@node1 mnt]# gluster volume create fenbu-copy replica 2 node1:/mnt/sde1 node2:/mnt/sde1 node3:/mnt/sde1 node4:/mnt/sde1 force

[root@node1 mnt]# gluster volume start fenbu-copy
volume start: fenbu-copy: success

[root@node1 mnt]# gluster volume info fenbu-copy

Volume Name: fenbu-copy
。。。。。。
Status: Started
。。。。。。
Bricks:
Brick1: node1:/mnt/sde1
Brick2: node2:/mnt/sde1
Brick3: node3:/mnt/sde1
Brick4: node4:/mnt/sde1

七、客戶端配置

修改本地Hosts文件

[root@node1 yum.repos.d]# vim /etc/hosts
192.168.142.66 node1
192.168.142.77 node2
192.168.142.132 node3
192.168.142.136 node4

配置本地YUM源

[root@node1 mnt]# cd /etc/yum.repos.d/
[root@node1 yum.repos.d]# mkdir bak
[root@node1 yum.repos.d]# mv CentOS-* bak/
[root@node3 zhy]# cp -r gfsrepo/ /mnt/
[root@node3 yum.repos.d]# vim GFSrep.repo
//手動(dòng)添加
[GFSrep]
name=GFS
baseurl=file:///mnt/gfsrepo
gpgcheck=0
enabled=1

安裝gfs組件

[root@node1 yum.repos.d]# yum -y install glusterfs glusterfs-fuse

GFS新建的卷進(jìn)行掛載

[root@client yum.repos.d]# mkdir -p /data/fenbu              //新建分布式卷掛載點(diǎn)
[root@client yum.repos.d]# mkdir -p /data/tiaodai             //新建條帶卷掛載點(diǎn)
[root@client yum.repos.d]# mkdir -p /data/fuzhi               //新建復(fù)制卷掛載點(diǎn)
[root@client yum.repos.d]# mkdir -p /data/fenbu-tiao       //新建分布式條帶卷掛載點(diǎn)
[root@client yum.repos.d]# mkdir -p /data/fenbu-copy     //新建分布式復(fù)制卷

[root@client yum.repos.d]# mount.glusterfs node1:fenbu /data/fenbu/             //將分布卷進(jìn)行掛載
[root@client yum.repos.d]# df -hT
文件系統(tǒng)                類型            容量  已用  可用 已用% 掛載點(diǎn)
node1:fenbu             fuse.glusterfs   40G   65M   40G    1% /data/fenbu

[root@client yum.repos.d]# mount.glusterfs node1:tiaodai /data/tiaodai/         //掛載條帶卷
[root@client yum.repos.d]# df -hT
文件系統(tǒng)                類型            容量  已用  可用 已用% 掛載點(diǎn)
node1:tiaodai           fuse.glusterfs   40G   65M   40G    1% /data/tiaodai

[root@client yum.repos.d]# mount.glusterfs node3:fuzhi /data/fuzhi             //掛載復(fù)制卷
[root@client yum.repos.d]# df -hT
文件系統(tǒng)                類型            容量  已用  可用 已用% 掛載點(diǎn)
node3:fuzhi             fuse.glusterfs   20G   33M   20G    1% /data/fuzhi

[root@client yum.repos.d]# mount.glusterfs node1:fenbu-tiao /data/fenbu-tiao/         //掛載分布式條帶卷
[root@client yum.repos.d]# df -hT
文件系統(tǒng)                類型            容量  已用  可用 已用% 掛載點(diǎn)
node1:fenbu-tiao        fuse.glusterfs   80G  130M   80G    1% /data/fenbu-tiao

[root@client yum.repos.d]# mount.glusterfs node4:fenbu-copy /data/fenbu-copy/       //掛載分布式復(fù)制卷
[root@client yum.repos.d]# df -hT
文件系統(tǒng)                類型            容量  已用  可用 已用% 掛載點(diǎn)
node4:fenbu-copy        fuse.glusterfs   40G   65M   40G    1% /data/fenbu-copy

八、對(duì)各類卷進(jìn)行測(cè)試

建立六個(gè)測(cè)試文件

[root@client data]# dd if=/dev/zero of=test1.log bs=10M count=10

[root@client data]# dd if=/dev/zero of=test2.log bs=10M count=10

[root@client data]# dd if=/dev/zero of=test3.log bs=10M count=10

[root@client data]# dd if=/dev/zero of=test4.log bs=10M count=10

[root@client data]# dd if=/dev/zero of=test5.log bs=10M count=10

[root@client data]# dd if=/dev/zero of=test6.log bs=10M count=10

將文件復(fù)制進(jìn)各個(gè)卷中

[root@client data]# cp test* fenbu
[root@client data]# cp test* fenbu-copy/
[root@client data]# cp test* fenbu-tiao/
[root@client data]# cp test* fuzhi/
[root@client data]# cp test* tiaodai/

查看分布式卷(node1:sdb1、node2:sdb1)

//node1
[root@node1 mnt]# ll -h sdb1/
總用量 400M
-rw-r--r--. 2 root root 100M 12月 18 23:55 test1.log
-rw-r--r--. 2 root root 100M 12月 18 23:56 test2.log
-rw-r--r--. 2 root root 100M 12月 18 23:56 test4.log
-rw-r--r--. 2 root root 100M 12月 18 23:56 test6.log
//node2
[root@node2 mnt]# ll -h sdb1/
總用量 200M
-rw-r--r--. 2 root root 100M 12月 18 23:56 test3.log
-rw-r--r--. 2 root root 100M 12月 18 23:56 test5.log

查看條帶卷(node1:sdc1、node2:sdc1)

//將每個(gè)數(shù)據(jù)都分成兩塊存儲(chǔ)(分成幾份由建立時(shí)的stripe決定)
//node1
[root@node1 mnt]# ll -h sdc1/
總用量 300M
-rw-r--r--. 2 root root 50M 12月 18 23:57 test1.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test2.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test3.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test4.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test5.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test6.log
//node2
[root@node2 mnt]# ll -h sdc1/
總用量 300M
-rw-r--r--. 2 root root 50M 12月 18 23:57 test1.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test2.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test3.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test4.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test5.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test6.log

查看復(fù)制卷(node3:sdb1、node4:sdb1)

//所有數(shù)據(jù)均復(fù)制一份存儲(chǔ)
//node3
[root@node3 mnt]# ll -h sdb1/
總用量 600M
-rw-r--r--. 2 root root 100M 12月 18 23:57 test1.log
-rw-r--r--. 2 root root 100M 12月 18 23:57 test2.log
-rw-r--r--. 2 root root 100M 12月 18 23:57 test3.log
-rw-r--r--. 2 root root 100M 12月 18 23:57 test4.log
-rw-r--r--. 2 root root 100M 12月 18 23:57 test5.log
-rw-r--r--. 2 root root 100M 12月 18 23:57 test6.log
//node4
[root@node4 mnt]# ll -h sdb1/
總用量 600M
-rw-r--r--. 2 root root 100M 12月 18 23:57 test1.log
-rw-r--r--. 2 root root 100M 12月 18 23:57 test2.log
-rw-r--r--. 2 root root 100M 12月 18 23:57 test3.log
-rw-r--r--. 2 root root 100M 12月 18 23:57 test4.log
-rw-r--r--. 2 root root 100M 12月 18 23:57 test5.log
-rw-r--r--. 2 root root 100M 12月 18 23:57 test6.log

查看分布式條帶卷(node1:sdd1、node2:sdd1、node3:sdd1、node4:sdd1)

//node1 & node2
[root@node1 mnt]# ll -h sdd1/
總用量 200M
-rw-r--r--. 2 root root 50M 12月 18 23:57 test1.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test2.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test4.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test6.log
[root@node2 mnt]# ll -h sdd1/
總用量 200M
-rw-r--r--. 2 root root 50M 12月 18 23:57 test1.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test2.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test4.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test6.log

//node3 & node4
[root@node3 mnt]# ll -h sdd1/
總用量 100M
-rw-r--r--. 2 root root 50M 12月 18 23:57 test3.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test5.log
[root@node4 mnt]# ll -h sdd1/
總用量 100M
-rw-r--r--. 2 root root 50M 12月 18 23:57 test3.log
-rw-r--r--. 2 root root 50M 12月 18 23:57 test5.log

查看分布式復(fù)制卷(node1~4:sde1)

//node1 & node2
[root@node1 mnt]# ll -h sde1/
總用量 400M
-rw-r--r--. 2 root root 100M 12月 18 23:56 test1.log
-rw-r--r--. 2 root root 100M 12月 18 23:56 test2.log
-rw-r--r--. 2 root root 100M 12月 18 23:56 test4.log
-rw-r--r--. 2 root root 100M 12月 18 23:56 test6.log
[root@node2 mnt]# ll -h sde1/
總用量 400M
-rw-r--r--. 2 root root 100M 12月 18 23:56 test1.log
-rw-r--r--. 2 root root 100M 12月 18 23:56 test2.log
-rw-r--r--. 2 root root 100M 12月 18 23:56 test4.log
-rw-r--r--. 2 root root 100M 12月 18 23:56 test6.log

//node3 & node4
[root@node3 mnt]# ll -h sde1/
總用量 200M
-rw-r--r--. 2 root root 100M 12月 18 23:56 test3.log
-rw-r--r--. 2 root root 100M 12月 18 23:56 test5.log
[root@node4 mnt]# ll -h sde1/
總用量 200M
-rw-r--r--. 2 root root 100M 12月 18 23:56 test3.log
-rw-r--r--. 2 root root 100M 12月 18 23:56 test5.log

網(wǎng)站名稱:GFS基礎(chǔ)配置安裝(純實(shí)戰(zhàn))
標(biāo)題URL:http://www.rwnh.cn/article44/ghdjee.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供關(guān)鍵詞優(yōu)化、標(biāo)簽優(yōu)化外貿(mào)網(wǎng)站建設(shè)、全網(wǎng)營(yíng)銷推廣網(wǎng)站設(shè)計(jì)公司、虛擬主機(jī)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站建設(shè)
茶陵县| 鄢陵县| 泗洪县| 都匀市| 洪江市| 胶南市| 巴南区| 张家口市| 威宁| 虹口区| 方正县| 涡阳县| 宿州市| 邛崃市| 遂川县| 彝良县| 绍兴县| 武宁县| 绵竹市| 贞丰县| 济阳县| 鹿泉市| 棋牌| 三亚市| 佛冈县| 若羌县| 武汉市| 铅山县| 边坝县| 郸城县| 岳普湖县| 磐石市| 金门县| 哈巴河县| 射洪县| 红河县| 新乐市| 德保县| 江门市| 库尔勒市| 兴隆县|