ClusterStorage-12-分层管理

0.实验前的环境检查与配置

[student@workstation ~]$ lab tiering setup
 

1.存储信息

gluster volume info prod-vol查看存储卷信息(此时已用的存储条为a1 b1)。for I in server{a,b} 遍历查看存储条的挂载信息。注意:可用的存储条有a1 a2 b1 b2。

[root@servera ~]# gluster volume info prod-vol
 
Volume Name: prod-vol
Type: Replicate
Volume ID: 3ef06fa0-87b4-4a54-ae03-fd6ee473bbe4
Status: Started
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: servera:/bricks/brick-a1/brick
Brick2: serverb:/bricks/brick-b1/brick
Options Reconfigured:
performance.readdir-ahead: on
[root@servera ~]# for I in server{a,b}
> do
>  ssh ${I} "mount | grep brick"
> done
The authenticity of host 'servera (172.25.250.10)' can't be established.
ECDSA key fingerprint is f3:3a:20:c9:5a:cc:cc:f0:44:f7:00:90:03:18:b1:8d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'servera,172.25.250.10' (ECDSA) to the list of known hosts.
root@servera's password: 
/dev/mapper/vg_bricks-brick--a1 on /bricks/brick-a1 type xfs (rw,relatime,seclabel,attr2,inode64,logbsize=64k,sunit=128,swidth=128,noquota)
/dev/mapper/vg_bricks-brick--a2 on /bricks/brick-a2 type xfs (rw,relatime,seclabel,attr2,inode64,logbsize=64k,sunit=128,swidth=128,noquota)
The authenticity of host 'serverb (172.25.250.11)' can't be established.
ECDSA key fingerprint is f3:3a:20:c9:5a:cc:cc:f0:44:f7:00:90:03:18:b1:8d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'serverb,172.25.250.11' (ECDSA) to the list of known hosts.
root@serverb's password: 
/dev/mapper/vg_bricks-brick--b1 on /bricks/brick-b1 type xfs (rw,relatime,seclabel,attr2,inode64,logbsize=64k,sunit=128,swidth=128,noquota)
/dev/mapper/vg_bricks-brick--b2 on /bricks/brick-b2 type xfs (rw,relatime,seclabel,attr2,inode64,logbsize=64k,sunit=128,swidth=128,noquota)
 

2.配置分层

gluster volume tier prod-vol attach replica 2 servera:/bricks/brick-a2/brick serverb:/bricks/brick-b2/brick进行分层配置(将之前未使用的a2 b2进行使用)。

[root@servera ~]# gluster volume tier prod-vol attach replica 2 servera:/bricks/brick-a2/brick serverb:/bricks/brick-b2/brick
volume attach-tier: success
Tiering Migration Functionality: prod-vol: success: Attach tier is successful on prod-vol. use tier status to check the status.
ID: 25ba91bf-35b7-4089-acb4-66afb8bea6f1
 

3.信息确认

gluster volume info prod-vol查看存储卷信息。注意:此时原来的存储变为Hot Tier :,而新增的为Cold Tier:,这不同于之前的分布式存储。

[root@servera ~]# gluster volume info prod-vol
 
Volume Name: prod-vol
Type: Tier
Volume ID: 3ef06fa0-87b4-4a54-ae03-fd6ee473bbe4
Status: Started
Number of Bricks: 4
Transport-type: tcp
Hot Tier :
Hot Tier Type : Replicate
Number of Bricks: 1 x 2 = 2
Brick1: serverb:/bricks/brick-b2/brick
Brick2: servera:/bricks/brick-a2/brick
Cold Tier:
Cold Tier Type : Replicate
Number of Bricks: 1 x 2 = 2
Brick3: servera:/bricks/brick-a1/brick
Brick4: serverb:/bricks/brick-b1/brick
Options Reconfigured:
cluster.tier-mode: cache
features.ctr-enabled: on
performance.readdir-ahead: on
 

4.分层状态信息

gluster volume tier prod-vol status查看分层的状态信息。

[root@servera ~]# gluster volume tier prod-vol status
Node                 Promoted files       Demoted files        Status              
---------            ---------            ---------            ---------           
localhost            0                    0                    in progress         
serverb.lab.example.com 0                    0                    in progress         
Tiering Migration Functionality: prod-vol: success
 

5.任务测评

lab tiering grade进行任务测评。主要是看存储卷是否启用分层功能。

[student@workstation ~]$ lab tiering grade

Grading the student's work:

 · Checking if tiering is enabled for prod-vol.................  PASS

Overall lab grade..............................................  PASS
 

猜你喜欢

转载自blog.csdn.net/ligan1115/article/details/86726976