一.准备工作
1.首先配置ssh无密码登陆
2.修改/etc/hosts文件
4.硬件要求(必须要有额外的磁盘)
拓扑图如下:
1.首先我们来配置ssh无密码:
node1:
ssh-keygen-N "" ssh-copy-id-i ~/.ssh/id_rsa.pub node2
输入密码即可
node2:
ssh-keygen-N "" ssh-copy-id-i ~/.ssh/id_rsa.pub node1
输入密码即可
2.修改hosts文件
vim/etc/hosts
192.168.199.10 node1 192.168.199.11 node2
二.安装GPFS。
1.把软件包上传到服务器(略)
2.在服务器各个节点创建挂载目录(略)
3.把时间调成一样,不联网就手工改date092610372013
4.安装依赖包,GPFS软件包补丁包,并进行配置
使用yum安装所需软件包:(node1,node2同样操作,下面只演示一台)
yum install kernel-headers kernel-devellibstdc++.so.5 compat-libstdc++-33.x86_64 glibc-devel gcc libXp.so.6 imakegcc-c++ rpm-build ksh rsh -y
安装gpfs包
rpm -ivh gpfs.*
cd update/
rpm -Uvh gpfs.*
cd/usr/lpp/mmfs/src makeAutoconfig makeWorld makeInstallImages
添加全局环境变量,让环境变量生效。
echoexport PATH=$PATH:/usr/lpp/mmfs/bin >>/etc/profile ./etc/profile
cd/tmp/gpfs (安装包在这个文件里) mkdirconfig touchcluster.cfg vimcluster.cfg node1:quorum-manager node2:quorum-manager
mmcrcluster-N cluster.cfg -p node1 -s node2 -r /usr/bin/ssh -R /usr/bin/scp -C Symphony
允许全部
mmchlicenseserver --accept -N all
定义磁盘nsd:
touchnsd.cfg vimnsd.cfg /dev/sdb:node1:::1:nsd1: /dev/sdb:node2:::2:nsd2: mmcrnsd-F nsd.cfg
mmlsconfig> mmlsconfig.cfg
mmlsconfig mmchconfigpagepool=512M mmchconfignsdMaxWorkerThreads=800 mmchconfigmaxInodeDeallocPrefetch=32 mmchconfigworker1Threads=400 mmchconfigmaxReceiverThreads=32 mmchconfignsdThreadsPerDisk=60 mmchconfigreadReplicaPolicy=local mmchconfigprefetchAggressivenessWrite=0 mmchconfigsyncBuffsPerIteration=1
启动GPFS
mmstartup -a
查看各个节点状态:
mmgetstate -Lsa
挂载:
mmmount all -a