温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

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

发布时间:2021-11-09 10:49:46 来源:亿速云 阅读:149 作者:小新 栏目:数据库

这篇文章主要为大家展示了“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如何在线添加和删除磁盘”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI