GPFS如何在线添加和删除磁盘

这篇文章主要为大家展示了“GPFS如何在线添加和删除磁盘”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“GPFS如何在线添加和删除磁盘”这篇文章吧。

创新互联是一家专业从事成都做网站、网站设计的网络公司。作为专业网站制作公司,创新互联依托的技术实力、以及多年的网站运营经验,为您提供专业的成都网站建设、成都全网营销及网站设计开发服务!

一、在线加盘
1、查看当前NSD磁盘
dbfc:/tmp # mmlsnsd -m


 Disk name    NSD volume ID      Device         Node name                Remarks       
---------------------------------------------------------------------------------------
 gpfs1nsd     0AC8016258A2CCC4   /dev/sdc       dbfc.example.com         
 gpfs2nsd     0AC8016258A2CCF2   /dev/sdd       dbfc.example.com         
 gpfs3nsd     0AC8016258A2CD1B   /dev/sde       dbfc.example.com         
 gpfs4nsd     0AC8016258A3AF5D   /dev/sdf       dbfc.example.com         


dbfc:/tmp # mmlsnsd


 File system   Disk name    NSD servers                                    
---------------------------------------------------------------------------
 db2arch       gpfs4nsd     (directly attached)      
 db2data       gpfs2nsd     (directly attached)      
 db2inst       gpfs1nsd     (directly attached)      
 db2log        gpfs3nsd     (directly attached)      


2、编辑NSD配置文件
vi /tmp/nsdprofile
sdg:::dataAndMetadata::


3、创建NSD盘
dbfc:/tmp # mmcrnsd -F /tmp/nsdprofile
mmcrnsd: Processing disk sdg
mmcrnsd: Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.


4、确认创建情况
dbfc:/tmp # mmlsnsd


 File system   Disk name    NSD servers                                    
---------------------------------------------------------------------------
 db2arch       gpfs4nsd     (directly attached)      
 db2data       gpfs2nsd     (directly attached)      
 db2inst       gpfs1nsd     (directly attached)      
 db2log        gpfs3nsd     (directly attached)      
 (free disk)   gpfs5nsd     (directly attached)      


dbfc:/tmp # mmlsnsd -m


 Disk name    NSD volume ID      Device         Node name                Remarks       
---------------------------------------------------------------------------------------
 gpfs1nsd     0AC8016258A2CCC4   /dev/sdc       dbfc.example.com         
 gpfs2nsd     0AC8016258A2CCF2   /dev/sdd       dbfc.example.com         
 gpfs3nsd     0AC8016258A2CD1B   /dev/sde       dbfc.example.com         
 gpfs4nsd     0AC8016258A3AF5D   /dev/sdf       dbfc.example.com    


dbfc:/tmp # mmlsdisk db2data
disk         driver   sector     failure holds    holds                            storage
name         type       size       group metadata data  status        availability pool
------------ -------- ------ ----------- -------- ----- ------------- ------------ ------------
gpfs2nsd     nsd         512          -1 yes      yes   ready         up           system    
gpfs5nsd     nsd         512          -1 yes      yes   ready         up           system    


5、将新建的NSD盘添加到GPFS集群
dbfc:/tmp # cat /tmp/nsdprofile
# sdg:::dataAndMetadata::
gpfs5nsd:::dataAndMetadata:-1::system


dbfc:/tmp # mmadddisk db2data -F /tmp/nsdprofile


The following disks of db2data will be formatted on node dbfc:
    gpfs5nsd: size 10240 MB
Extending Allocation Map
Checking Allocation Map for storage pool system
Completed adding disks to file system db2data.
mmadddisk: Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.
  
6、确认扩容结果
异步同步,所以需要登录所有节点检查
df -h
dbnode02:~ # mmlsnsd


 File system   Disk name    NSD servers                                    
---------------------------------------------------------------------------
 db2arch       gpfs4nsd     (directly attached)      
 db2data       gpfs2nsd     (directly attached)      
 db2data       gpfs5nsd     (directly attached)      
 db2inst       gpfs1nsd     (directly attached)      
 db2log        gpfs3nsd     (directly attached)   


二、 rebalance文件系统
dbfc:/tmp # mmrestripefs db2data -b
Scanning file system metadata, phase 1 ... 
Scan completed successfully.
Scanning file system metadata, phase 2 ... 
Scan completed successfully.
Scanning file system metadata, phase 3 ... 
Scan completed successfully.
Scanning file system metadata, phase 4 ... 
Scan completed successfully.
Scanning user file metadata ...
 100.00 % complete on Thu Apr 13 16:44:28 2017  (    133376 inodes with total       1969 MB data processed)
Scan completed successfully.

三、 动态减盘
dbfc:/tmp # mmrestripefs db2data -b
Scanning file system metadata, phase 1 ... 
Scan completed successfully.
Scanning file system metadata, phase 2 ... 
Scan completed successfully.
Scanning file system metadata, phase 3 ... 
Scan completed successfully.
Scanning file system metadata, phase 4 ... 
Scan completed successfully.
Scanning user file metadata ...
 100.00 % complete on Thu Apr 13 16:44:28 2017  (    133376 inodes with total       1969 MB data processed)
Scan completed successfully.
dbfc:/tmp # mmlsnsd


 File system   Disk name    NSD servers                                    
---------------------------------------------------------------------------
 db2arch       gpfs4nsd     (directly attached)      
 db2data       gpfs2nsd     (directly attached)      
 db2data       gpfs5nsd     (directly attached)      
 db2inst       gpfs1nsd     (directly attached)      
 db2log        gpfs3nsd     (directly attached)      


dbfc:/tmp # mmdeldisk db2data gpfs2nsd
Deleting disks ...
Scanning file system metadata, phase 1 ... 
  73 % complete on Thu Apr 13 16:51:18 2017
 100 % complete on Thu Apr 13 16:51:19 2017
Scan completed successfully.
Scanning file system metadata, phase 2 ... 
Scan completed successfully.
Scanning file system metadata, phase 3 ... 
Scan completed successfully.
Scanning file system metadata, phase 4 ... 
Scan completed successfully.
Scanning user file metadata ...
 100.00 % complete on Thu Apr 13 16:51:28 2017  (    133376 inodes with total       1969 MB data processed)
Scan completed successfully.
Checking Allocation Map for storage pool system
Attention: A disk being removed reduces the number of failure groups to 1,
           which is below the number required for replication: 2.
           New blocks will be allocated from the remaining disks,
           but files will be unreplicated and hence at risk.
tsdeldisk completed.
mmdeldisk: Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.

以上是“GPFS如何在线添加和删除磁盘”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注创新互联行业资讯频道!


文章标题:GPFS如何在线添加和删除磁盘
本文地址:http://ybzwz.com/article/gjdepp.html