1. 先初始化磁盘
bash-3.00#
vxdisksetup -i tagmastore-usp0_0002
bash-3.00# vxdisk list | grep "tagmastore-usp0_0002"
tagmastore-usp0_0002 auto:cdsdisk - - online
2. 创建新磁盘组hydradg,将新初始化的磁盘tagmastore-usp0_0002加入到磁盘组中
bash-3.00#
vxdg -s init hydradg tagmastore-usp0_0002
bash-3.00# vxdg list | grep hydradg
hydradg enabled,shared,cds 1338864002.638.dbp560
bash-3.00# vxprint -g hydradg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg hydradg hydradg - - - - - -
dm tagmastore-usp0_0002 tagmastore-usp0_0002 - 209628928 - - - -
3. 初始化卷集
3.1 建立新卷hydravol1
bash-3.00# vxassist -g hydradg make hydravol1 20g
3.2 建立新卷集hydravs1
bash-3.00# vxvset -g hydradg -t vxfs make hydravs1 hydravol1
3.3 查看一下
bash-3.00# vxprint -g hydradg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg hydradg hydradg - - - - - -
dm tagmastore-usp0_0002 tagmastore-usp0_0002 - 209628928 - - - -
vt hydravs1 - ENABLED - - ACTIVE - -
v hydravol1 hydravs1 ENABLED 41943040 - ACTIVE - -
pl hydravol1-01 hydravol1 ENABLED 41943040 - ACTIVE - -
sd tagmastore-usp0_0002-01 hydravol1-01 ENABLED 41943040 0 - - -
3.4 建立一个新卷hydravol2 20g
bash-3.00#
vxassist -g hydradg make hydravol2 20g
3.5 将新卷加入到卷集hydravs1中
bash-3.00#
vxvset -g hydradg addvol hydravs1 hydravol2
3.6 继续查看一下磁盘组
bash-3.00# vxprint -g hydradg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg hydradg hydradg - - - - - -
dm tagmastore-usp0_0002 tagmastore-usp0_0002 - 209628928 - - - -
vt hydravs1 - ENABLED - - ACTIVE - -
v hydravol1 hydravs1 ENABLED 41943040 - ACTIVE - -
pl hydravol1-01 hydravol1 ENABLED 41943040 - ACTIVE - -
sd tagmastore-usp0_0002-01 hydravol1-01 ENABLED 41943040 0 - - -
v hydravol2 hydravs1 ENABLED 41943040 - ACTIVE - -
pl hydravol2-01 hydravol2 ENABLED 41943040 - ACTIVE - -
sd tagmastore-usp0_0002-02 hydravol2-01 ENABLED 41943040 0 - -
4. 建立集群文件系统
4.1 格式化卷集hydravs1
bash-3.00#
mkfs -V vxfs /dev/vx/dsk/hydradg/hydravs1
version 7 layout
83886080 sectors, 41943040 blocks of size 1024, log size 65536 blocks
largefiles supported
4.2 在三个节点创建要挂载的目录
mkdir /hydra
4.3 加入到cfscluster配置中
bash-3.00#
cfsmntadm add hydradg hydravs1 /hydra all=suid,rw
Mount Point is being added...
/hydra added to the cluster-configuration
4.4 使用cfscluster自动挂在目录
bash-3.00#
cfsmount /hydra
Mounting...
[/dev/vx/dsk/hydradg/hydravs1] mounted successfully at /hydra on dbp560
[/dev/vx/dsk/hydradg/hydravs1] mounted successfully at /hydra on dbp5701
[/dev/vx/dsk/hydradg/hydravs1] mounted successfully at /hydra on dbp5702
4.5 观察一下
bash-3.00# cfscluster status
Node : dbp560
Cluster Manager : running
CVM state : running
MOUNT POINT SHARED VOLUME DISK GROUP STATUS
/hydra hydravs1 hydradg MOUNTED
。。。
Node : dbp5701
Cluster Manager : running
CVM state : running
MOUNT POINT SHARED VOLUME DISK GROUP STATUS
/hydra hydravs1 hydradg MOUNTED
。。。
Node : dbp5702
Cluster Manager : running
CVM state : running
MOUNT POINT SHARED VOLUME DISK GROUP STATUS
/hydra hydravs1 hydradg MOUNTED
。。。
4.5.1 三个节点使用df -g 命令查看一下
bash-3.00# df -g | grep hydra
/dev/vx/dsk/hydradg/hydravs1 40.00 37.31 7% 4 1% /hydra
5. 向共享文件系统里面拷贝文件
bash-3.00# cp /tmp/javacore.20110606.223144.1528058.txt /hydra
测试一下三个节点是否都可以访问到这个文件
bash-3.00# tail /hydra/javacore.20110606.223144.1528058.txt
6. 初始化另外一块盘tagmastore-usp0_021a
bash-3.00#
vxdisksetup -i tagmastore-usp0_021a
7. 将tagmastore-usp0_021a添加到磁盘组hydradg中
bash-3.00#
vxdg -g hydradg adddisk tagmastore-usp0_021a
8. 添加新卷hydravol3
bash-3.00#
vxassist -g hydradg make hydravol3 150g
查看一下
bash-3.00# vxprint -g hydradg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg hydradg hydradg - - - - - -
dm tagmastore-usp0_0002 tagmastore-usp0_0002 - 209628928 - - - -
dm tagmastore-usp0_021a tagmastore-usp0_021a - 209628928 - - - -
v hydravol3 fsgen ENABLED 314572800 - ACTIVE - -
pl hydravol3-01 hydravol3 ENABLED 314572800 - ACTIVE - -
sd tagmastore-usp0_0002-03 hydravol3-01 ENABLED 104943872 0 - - -
sd tagmastore-usp0_021a-01 hydravol3-01 ENABLED 209628928 104943872 - - -
vt hydravs1 - ENABLED - - ACTIVE - -
v hydravol1 hydravs1 ENABLED 41943040 - ACTIVE - -
pl hydravol1-01 hydravol1 ENABLED 41943040 - ACTIVE - -
sd tagmastore-usp0_0002-01 hydravol1-01 ENABLED 41943040 0 - - -
v hydravol2 hydravs1 ENABLED 41943040 - ACTIVE - -
pl hydravol2-01 hydravol2 ENABLED 41943040 - ACTIVE - -
sd tagmastore-usp0_0002-02 hydravol2-01 ENABLED 41943040 0 - - -
9. 添加hydravol3到hydravs1卷集中
bash-3.00#
vxvset -g hydradg addvol hydravs1 hydravol3
查看一下
bash-3.00# vxprint -g hydradg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg hydradg hydradg - - - - - -
dm tagmastore-usp0_0002 tagmastore-usp0_0002 - 209628928 - - - -
dm tagmastore-usp0_021a tagmastore-usp0_021a - 209628928 - - - -
vt hydravs1 - ENABLED - - ACTIVE - -
v hydravol1 hydravs1 ENABLED 41943040 - ACTIVE - -
pl hydravol1-01 hydravol1 ENABLED 41943040 - ACTIVE - -
sd tagmastore-usp0_0002-01 hydravol1-01 ENABLED 41943040 0 - - -
v hydravol2 hydravs1 ENABLED 41943040 - ACTIVE - -
pl hydravol2-01 hydravol2 ENABLED 41943040 - ACTIVE - -
sd tagmastore-usp0_0002-02 hydravol2-01 ENABLED 41943040 0 - - -
v hydravol3 hydravs1 ENABLED 314572800 - ACTIVE - -
pl hydravol3-01 hydravol3 ENABLED 314572800 - ACTIVE - -
sd tagmastore-usp0_0002-03 hydravol3-01 ENABLED 104943872 0 - - -
sd tagmastore-usp0_021a-01 hydravol3-01 ENABLED 209628928 104943872 - - -、
文件系统没有自动改变
bash-3.00# df -g | grep hydra
/dev/vx/dsk/hydradg/hydravs1 40.00 37.31 7% 5 1% /hydra
10. 使用fscoladm命令,使文件系统能够识别新加的卷
bash-3.00#
fsvoladm add /hydra hydravol3 150g
已经变更了
bash-3.00# df -g | grep hydra
/dev/vx/dsk/hydradg/hydravs1 190.00 177.90 7% 5 1% /hydra
文件还在
bash-3.00# tail /hydra/javacore.20110606.223144.1528058.txt
3CLTEXTCLASS sun/reflect/GeneratedSerializationConstructorAcc
标红为重要语句