GlusterFS測試小結

2021-10-04 09:46:04 字數 4516 閱讀 3014

伺服器端:

3個筆記本,壞一台

2個台式電腦

客戶端:

dell2950

千兆交換機一台

基本的網路結構如圖

● 建立好共享目錄,並改變許可權,可以是777

● 安裝gluster。configure/make/make install

● 在/usr/local/etc/glusterfs/下新增伺服器端配置檔案

● 用glusterfsd –f /usr/local/etc/glusterfs/glusterfsd.vol來啟動服務

● 建立好掛載目錄

● 安裝gluster。configure/make/make install

● 在/usr/local/etc/glusterfs/下新增客戶端配置檔案

● 用glusterfsd -l /g.log –f /usr/local/etc/glusterfs/glusterfs.vol /mnt

log檔案配置檔案掛載目錄

gluster的所有功能的實現都是通過配置檔案實現的。由於官網上的說明不清楚,所以配置項的意義不明確,需要一點一點試,目前對volume的概念基本清楚了。但是對於讀特性、寫特性等的設定,還需要進一步的測試。

以下是伺服器端,客戶端的配置檔案。

### file: server-volume.vol.sample

### glusterfs server volume file ##

#### config file rules:

### "#" is comment character.

### - config file is case sensitive

### - options within a volume block can be in any order.

### - spaces or tabs are used as delimitter within a line.

### - multiple values to options will be : delimitted.

### - each option should end within a line.

### - missing or commented fields will assume default values.

### - blank/commented lines are allowed.

### - sub-volumes should already be defined above before referring.

### export volume "brick" with the contents of "/home/export" directory.

volume brick

type storage/posixposix fs translator

option directory /data3export this directory

end-volume

volume locker

type features/posix-locks

subvolumes brick

end-volume

### add network serving capability to above brick.

volume server

type protocol/server

option transport-type tcp/server

option bind-address 10.1.1.3 # default is to listen on all inte***ces

option listen-port 6996default is 6996

subvolumes locker

option auth.addr.brick.allow * # allow access to "brick" volume

option auth.addr.locker.allow * # allow access to "brick" volume

end-volume

### file: client-volume.vol.sample

### glusterfs client volume file ##

#### config file rules:

### "#" is comment character.

### - config file is case sensitive

### - options within a volume block can be in any order.

### - spaces or tabs are used as delimitter within a line.

### - each option should end within a line.

### - missing or commented fields will assume default values.

### - blank/commented lines are allowed.

### - sub-volumes should already be defined above before referring.

### add client feature and attach to remote subvolume

volume client

type protocol/client

option transport-type tcp

# option transport-type unix

# option transport-type ib-sdp

option remote-host 10.1.1.3ip address of the remote brick

# option transport.socket.remote-port 6996default server port is 6996

# option transport-type ib-verbs

# option transport.ib-verbs.remote-port 6996default server port is 6996

# option transport.ib-verbs.work-request-send-size 1048576

# option transport.ib-verbs.work-request-send-count 16

# option transport.ib-verbs.work-request-recv-size 1048576

# option transport.ib-verbs.work-request-recv-count 16

# option transport-timeout 30seconds to wait for a reply

from server for each request

option remote-subvolume brickname of the remote volume

end-volume

### add readahead feature

#volume readahead

# type performance/read-ahead

# option page-size 1mb # unit in bytes

# option page-count 2 # cache per file = (page-count x page-size)

# subvolumes client

#end-volume

### add io-cache feature

#volume iocache

# type performance/io-cache

# option page-size 256kb

# option page-count 2

# subvolumes readahead

#end-volume

### add writeback feature

#volume writeback

# type performance/write-behind

# option aggregate-size 1mb

# option window-size 2mb

# option flush-behind off

# subvolumes iocache

#end-volume

在多伺服器情況下,伺服器之間的組合可以有很多種,主要的區別體現在客戶端的配置。在伺服器端都是一樣的。值得注意的是,如果是乙個伺服器乙個分割槽的話,埠號都是6996。

在乙個伺服器上有不同分割槽要掛載的話,才需要區別埠號。否則不能正常掛載。

這種情況下的伺服器配置檔案與單伺服器情況一樣。

### file: client-volume.vol.sample

### glusterfs client volume file ##

軟體測試小結

一 測試基礎 測試模型 v模型 測試的目的 發現程式中錯誤,是為了證明程式有錯,而不是證明程式無錯。測試的原則 測試貫穿各個階段 測試用例應由輸入部分與之對應的輸出結果組成 程式設計師應該避免檢查自己的程式 一定要注意測試中的錯誤集中發生現象 對測試錯誤結果一定要有乙個確認的過程 制定乙個嚴格的測試...

軟體測試小結

第二階段學習小結 1.白盒測試需要了解其內部結構和執行機制。白盒測試,也稱之為結構測試和邏輯驅動測試。黑盒測試不需了解程式內部結構和內部特徵。主要著眼於程式外部的使用者介面,關注軟體的輸入和輸出,關注使用者的需求,從使用者的角度來驗證軟體的功能。黑盒測試也稱之為功能測試和資料驅動測試。2.黑盒測試技...

導數小結測試

第三章導數小結測試 1 主備 劉曉燕主審 王偉 姓名班級得分 一 選擇題 每題3分,共36分 1 若f x sin cosx,則f 等於 a sinb cos c sin cos d 2sin 2 下列求導運算正確的是 ab c 2x sinxd 3 乙個物體的運動方程為其中s的單位是公尺,t的單位...