要求:从xp1024上将16个ldev分给该server,并对其中某些文件系统扩容.
现状:应用负责人要求为某些文件系统扩容,但现在该vg中的剩余空间不够,需要再加盘进来.
该server(ap2)与另一台server(db)做了MC,而且该vg33是ap2上的package中的vg.
xp1024到这两台server,分别都有两条路径(通过switch).
步骤:
1.先使用ioscan命令,认出所分配的新盘.
ioscan -fn
2.用insf将认出的新盘创建设备文件.
insf
/dev/rdsk/c6t10d0 d9 0a 50 CL3d 04:d8 OPEN-E 00010083
/dev/rdsk/c6t10d1 d9 0a 51 CL3d 04:d9 OPEN-E 00010083
/dev/rdsk/c6t10d2 d9 0a 52 CL3d 04:da OPEN-E 00010083
/dev/rdsk/c6t10d3 d9 0a 53 CL3d 04:db OPEN-E 00010083
/dev/rdsk/c6t10d4 d9 0a 54 CL3d 04:dc OPEN-E 00010083
/dev/rdsk/c6t10d5 d9 0a 55 CL3d 04:dd OPEN-E 00010083
/dev/rdsk/c6t10d6 d9 0a 56 CL3d 04:de OPEN-E 00010083
/dev/rdsk/c6t10d7 d9 0a 57 CL3d 04:df OPEN-E 00010083
/dev/rdsk/c6t11d0 d9 0b 58 CL3d 04:e0 OPEN-E 00010083
/dev/rdsk/c6t11d1 d9 0b 59 CL3d 04:e1 OPEN-E 00010083
/dev/rdsk/c6t11d2 d9 0b 5a CL3d 04:e2 OPEN-E 00010083
/dev/rdsk/c6t11d3 d9 0b 5b CL3d 04:e3 OPEN-E 00010083
/dev/rdsk/c6t11d4 d9 0b 5c CL3d 04:e4 OPEN-E 00010083
/dev/rdsk/c6t11d5 d9 0b 5d CL3d 04:e5 OPEN-E 00010083
/dev/rdsk/c6t11d6 d9 0b 5e CL3d 04:e6 OPEN-E 00010083
/dev/rdsk/c6t11d7 d9 0b 5f CL3d 04:e7 OPEN-E 00010083
/dev/rdsk/c7t10d0 cd 0a 50 CL4d 04:d8 OPEN-E 00010083
/dev/rdsk/c7t10d1 cd 0a 51 CL4d 04:d9 OPEN-E 00010083
/dev/rdsk/c7t10d2 cd 0a 52 CL4d 04:da OPEN-E 00010083
/dev/rdsk/c7t10d3 cd 0a 53 CL4d 04:db OPEN-E 00010083
/dev/rdsk/c7t10d4 cd 0a 54 CL4d 04:dc OPEN-E 00010083
/dev/rdsk/c7t10d5 cd 0a 55 CL4d 04:dd OPEN-E 00010083
/dev/rdsk/c7t10d6 cd 0a 56 CL4d 04:de OPEN-E 00010083
/dev/rdsk/c7t10d7 cd 0a 57 CL4d 04:df OPEN-E 00010083
/dev/rdsk/c7t11d0 cd 0b 58 CL4d 04:e0 OPEN-E 00010083
/dev/rdsk/c7t11d1 cd 0b 59 CL4d 04:e1 OPEN-E 00010083
/dev/rdsk/c7t11d2 cd 0b 5a CL4d 04:e2 OPEN-E 00010083
/dev/rdsk/c7t11d3 cd 0b 5b CL4d 04:e3 OPEN-E 00010083
/dev/rdsk/c7t11d4 cd 0b 5c CL4d 04:e4 OPEN-E 00010083
/dev/rdsk/c7t11d5 cd 0b 5d CL4d 04:e5 OPEN-E 00010083
/dev/rdsk/c7t11d6 cd 0b 5e CL4d 04:e6 OPEN-E 00010083
/dev/rdsk/c7t11d7 cd 0b 5f CL4d 04:e7 OPEN-E 00010083
本次分配的ldev是从04:d8到04:e7的.双路径(即C6*和C7*两个路径),共16个ldev.
3.使用pvcreate命令将这些硬盘格式化
pvcreate /dev/rdsk/c6t10d0
pvcreate /dev/rdsk/c6t10d1
pvcreate /dev/rdsk/c6t10d2
pvcreate /dev/rdsk/c6t10d3
pvcreate /dev/rdsk/c6t10d4
pvcreate /dev/rdsk/c6t10d5
pvcreate /dev/rdsk/c6t10d6
pvcreate /dev/rdsk/c6t10d7
pvcreate /dev/rdsk/c6t11d0
pvcreate /dev/rdsk/c6t11d1
pvcreate /dev/rdsk/c6t11d2
pvcreate /dev/rdsk/c6t11d3
pvcreate /dev/rdsk/c6t11d4
pvcreate /dev/rdsk/c6t11d5
pvcreate /dev/rdsk/c6t11d6
pvcreate /dev/rdsk/c6t11d7
虽然是双路径,但每个ldev只需要pvcreate一次就可以了.
4.将新盘分配到相应的vg中
vgextend vg33 /dev/dsk/c6t10d0
vgextend vg33 /dev/dsk/c6t10d1
vgextend vg33 /dev/dsk/c6t10d2
vgextend vg33 /dev/dsk/c6t10d3
vgextend vg33 /dev/dsk/c7t10d4
vgextend vg33 /dev/dsk/c7t10d5
vgextend vg33 /dev/dsk/c7t10d6
vgextend vg33 /dev/dsk/c7t10d7
vgextend vg33 /dev/dsk/c6t11d0
vgextend vg33 /dev/dsk/c6t11d1
vgextend vg33 /dev/dsk/c6t11d2
vgextend vg33 /dev/dsk/c6t11d3
vgextend vg33 /dev/dsk/c7t11d4
vgextend vg33 /dev/dsk/c7t11d5
vgextend vg33 /dev/dsk/c7t11d6
vgextend vg33 /dev/dsk/c7t11d7
vgextend vg33 /dev/dsk/c7t10d0
vgextend vg33 /dev/dsk/c7t10d1
vgextend vg33 /dev/dsk/c7t10d2
vgextend vg33 /dev/dsk/c7t10d3
vgextend vg33 /dev/dsk/c6t11d4
vgextend vg33 /dev/dsk/c6t11d5
vgextend vg33 /dev/dsk/c6t11d6
vgextend vg33 /dev/dsk/c6t11d7
vgextend vg33 /dev/dsk/c7t11d0
vgextend vg33 /dev/dsk/c7t11d1
vgextend vg33 /dev/dsk/c7t11d2
vgextend vg33 /dev/dsk/c7t11d3
vgextend vg33 /dev/dsk/c6t10d4
vgextend vg33 /dev/dsk/c6t10d5
vgextend vg33 /dev/dsk/c6t10d6
vgextend vg33 /dev/dsk/c6t10d7
这里需要注意两点:
首先,想让vg将两个路径都认出来,需要对每个盘vgextend两次(即,每个路径一次.)
其次,也非常重要:将两个路径的盘按交错顺序extend.
现在有16个ldev,共需要vgextend32次.则,可先将C6*的几块盘先extend,然后再C7*的几块盘再extend,然后再C6*,C7*......如此往复.
因为每个ldev的首次vgextend的路径就是该ldev的主路径.在该路径没有出现问题的情况下,系统会优先使用该路径对硬盘进行读写.如果所有的盘全都是C6*为主路径的话,会对该路径的链路造成极大负荷,为了避免该情况的发生,就可以将C6*和C7*两条路径中的硬盘,分别设置成有主有从.
5.在db上也需要认到所有新的ldev,并为它们创建设备文件
ioscan -fn
insf
6.同步MC/SG
在ap2上:
vgexport -s -p -m /tmp/20071114/vg33.map /dev/vg33
rcp /tmp/vg33.map db:/tmp/vg33.map
在db上:
ll /dev/vg33/group #为0x330000
vgexport /dev/vg33
mkdir /dev/vg33
mknod /dev/vg33/group c 64 0x330000
vgimport -s -m /tmp/vg33.map /dev/vg33
7.在ap2将需要扩容的文件系统按要求扩容
lvextend -L 58608 /dev/vg33/lvC620
lvextend -L 50416 /dev/vg33/lvC631
lvextend -L 9056 /dev/vg33/lvC690
lvextend -L 27120 /dev/vg33/lvC6B0
lvextend -L 21168 /dev/vg33/lvC6F0
lvextend -L 10608 /dev/vg33/lvC6J0
lvextend -L 6144 /dev/vg33/lvC6K0
lvextend -L 62416 /dev/vg33/lvC6M0
lvextend -L 60672 /dev/vg33/lvC6N0
lvextend -L 109984 /dev/vg33/lvC6P0
lvextend -L 23552 /dev/vg22/lvsnpjc01
fsadm -b 58608m /home/eoffice/fileAttach/C620
fsadm -b 50416m /home/eoffice/fileAttach/C631
fsadm -b 9056m /home/eoffice/fileAttach/C690
fsadm -b 27120m /home/eoffice/fileAttach/C6B0
fsadm -b 21168m /home/eoffice/fileAttach/C6F0
fsadm -b 10608m /home/eoffice/fileAttach/C6J0
fsadm -b 6144m /home/eoffice/fileAttach/C6K0
fsadm -b 62416m /home/eoffice/fileAttach/C6M0
fsadm -b 60672m /home/eoffice/fileAttach/C6N0
fsadm -b 109984m /home/eoffice/fileAttach/C6P0
fsadm -b 23552m /usr/sap/SNP/JC01
阅读(2471) | 评论(0) | 转发(0) |