Device Boot Start End Blocks Id System
/dev/sdb1 1 13 104391 83 Linux
/dev/sdb2 14 26 104422+ 83 Linux
/dev/sdb3 27 39 104422+ 83 Linux
/dev/sdb4 40 130 730957+ 5 Extended
/dev/sdb5 40 52 104391 83 Linux
/dev/sdb6 53 65 104391 83 Linux
/dev/sdb7 66 78 104391 83 Linux
编辑nsd配置
[root@Web02_a ~]# cat /tmp/nsdfile
/dev/sdb1:Web02_a::dataAndMetadata:01:
/dev/sdb2:Web02_a::dataAndMetadata:01:
/dev/sdb3:Web02_a::dataAndMetadata:01:
/dev/sdb5:Web02_a::dataAndMetadata:01:
/dev/sdb1:Nagios::dataAndMetadata:02:
/dev/sdb2:Nagios::dataAndMetadata:02:
/dev/sdb3:Nagios::dataAndMetadata:02:
#注:此时failgroup组1与组2磁盘数并不相同,但是磁盘不等是没关系的。两个组相当于raid1。
[root@Web02_a ~]# mmcrnsd -F /tmp/nsdfile-v no
#生成NSD文件
[root@Web02_a ~]# cat /tmp/nsdfile
# /dev/sdb1:Web02_a::dataAndMetadata:01:
gpfs1nsd:::dataAndMetadata:01::system
# /dev/sdb2:Web02_a::dataAndMetadata:01:
gpfs2nsd:::dataAndMetadata:01::system
# /dev/sdb3:Web02_a::dataAndMetadata:01:
gpfs3nsd:::dataAndMetadata:01::system
# /dev/sdb5:Web02_a::dataAndMetadata:01:
gpfs4nsd:::dataAndMetadata:01::system
# /dev/sdb1:Nagios::dataAndMetadata:02:
gpfs5nsd:::dataAndMetadata:02::system
# /dev/sdb2:Nagios::dataAndMetadata:02:
gpfs6nsd:::dataAndMetadata:02::system
# /dev/sdb3:Nagios::dataAndMetadata:02:
gpfs7nsd:::dataAndMetadata:02::system
# /dev/sdb5:Nagios::dataAndMetadata:02:
gpfs8nsd:::dataAndMetadata:02::system
11.配置仲裁盘
#仲裁盘作用,当定义的仲裁盘有一半的磁盘不可用时,该集群不可用。
另:有效磁盘数小于等于整个磁盘数一半时,整个文件系统不可用。
[root@Web02_a ~]# mmchconfig tiebreakerDisks="gpfs1nsd;gpfs2nsd;gpfs3nsd"
Verifying GPFS is stopped on all nodes ...
mmchconfig: Command successfully completed
mmchconfig: Propagating the clusterconfiguration data to all
affected nodes. This is anasynchronous process.
[root@Web02_a tmp]# mmgetstate -a
[root@Web02_a tmp]# mmgetstate -a
Nodenumber Node name GPFS state
------------------------------------------
1 Web02_a active
2 Nagios active
如果mmgetstate -a状态为down,请确保:防火墙关闭,两台服务器时间同步(注意时区也要一致),/etc/hosts中没有对应127.0.0.1字段。
gpfs错误日志路径:/var/adm/ras/mmfs.log.latest
#修改节点IP mmchnode --daemon-interface=10.0.0.236 -NWeb02_a
12.创建GPFS文件系统
[root@Web02_a tmp]# mmcrfs vol_data -F/tmp/nsdfile -B 256K -m 2 -r 2 -j cluster -T /vol_data -v no
The following disks of vol_data will beformatted on node Web02_a:
gpfs1nsd: size 104391 KB
gpfs2nsd: size 104422 KB
gpfs3nsd: size 104422 KB
gpfs4nsd: size 104391 KB
gpfs9nsd: size 104391 KB
gpfs10nsd: size 104422 KB
gpfs11nsd: size 104422 KB
gpfs12nsd: size 104391 KB
Formatting file system ...
Disks up to size 6.4 GB can be added tostorage pool 'system'.
Creating Inode File
Creating Allocation Maps
Creating Log Files
Clearing Inode Allocation Map
Clearing Block Allocation Map
Formatting Allocation Map for storage pool'system'
Completed creation of file system/dev/vol_data.
mmcrfs: Propagating the clusterconfiguration data to all
affected nodes. This is anasynchronous process.