system : hp-ux B.11.31 --查看hp-ux版本 #uname -a
storage : hp
db : 10.2.0.5.0
由于RAC环境下的数据存储空间快撑满了,于是在存储上划了4个256G的LUN指定给RAC(IP1:10.1.10.56;IP2:10.1.10.57)
1、查看各HOST下现有的磁盘路径,并将LUN指定给HOST后,查看指定后的磁盘路径,对比:
IP1:10.1.10.56
通过#smh, 在SMH->Disks and File Systems->Disks下
Path(s) Device File(s) Use VG Names Paths Size(GB) Description
----------------------------------------------------------------------------------------------------------------------
0/0/0/5/0/0/0.21.13.0.0.0.2 /dev/dsk/c22t0d2 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.13.0.0.0.3 /dev/dsk/c22t0d3 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.13.0.0.0.4 /dev/dsk/c22t0d4 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.13.0.0.0.5 /dev/dsk/c22t0d5 unused - 8 256.00 HP HSV450
指定磁盘后
Path(s) Device File(s) Use VG Names Paths Size(GB) Description
------------------------------------------------------------------------------------------------------
0/0/0/5/0/0/0.21.13.0.0.1.3 /dev/dsk/c48t1d3 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.15.0.0.1.4 /dev/dsk/c50t1d4 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/1.22.13.0.0.1.5 /dev/dsk/c60t1d5 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.13.0.0.1.6 /dev/dsk/c48t1d6 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.13.0.0.0.3 /dev/dsk/c48t0d3 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.13.0.0.0.4 /dev/dsk/c48t0d4 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.13.0.0.0.5 /dev/dsk/c48t0d5 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.13.0.0.0.6 /dev/dsk/c48t0d6 unused - 8 256.00 HP HSV450
*****************************
IP2:10.1.194.57
SMH->Disks and File Systems->Disks
------------------------------------------------------------------------------------------------------
H/W Scan: Thu Oct 11 09:12:14 2012
Path(s) Device File(s) Use VG Names Paths Size(GB) Description
------------------------------------------------------------------------------------------------------
0/0/0/5/0/0/0.21.13.0.0.0.2 /dev/dsk/c22t0d2 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.13.0.0.0.3 /dev/dsk/c22t0d3 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.13.0.0.0.4 /dev/dsk/c22t0d4 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.13.0.0.0.5 /dev/dsk/c22t0d5 unused - 8 256.00 HP HSV450
指定磁盘后
IP:10.1.194.57
SMH->Disks and File Systems->Disks
------------------------------------------------------------------------------------------------------
H/W Scan: Thu Oct 11 14:25:26 2012
Path(s) Device File(s) Use VG Names Paths Size(GB) Description
------------------------------------------------------------------------------------------------------
0/0/0/5/0/0/0.21.13.0.0.0.2 /dev/dsk/c22t0d2 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.13.0.0.0.3 /dev/dsk/c22t0d3 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.13.0.0.0.4 /dev/dsk/c22t0d4 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.13.0.0.0.5 /dev/dsk/c22t0d5 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/1.22.9.0.0.1.4 /dev/dsk/c26t1d4 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.9.0.0.1.5 /dev/dsk/c18t1d5 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/0.21.15.0.0.1.6 /dev/dsk/c24t1d6 unused - 8 256.00 HP HSV450
0/0/0/5/0/0/1.22.15.0.0.1.7 /dev/dsk/c32t1d7 unused - 8 256.00 HP HSV450
2、找出新增加的磁盘路径,找出对应盘符及WWN:
第一种方法:ioscan -funNC disk
第二种方法:根据以上4个结果集,对比出新增加的磁盘路径,找出对应盘符及相应的WWN(eg:c22t0d2前三位应为磁盘通道,对比后四位)
10.1.10.56
新增加的磁盘路径
/dev/dsk/c26t1d4
10.1.10.57
新增加的磁盘路径
/dev/dsk/c48t1d3
/dev/dsk/c50t1d4
/dev/dsk/c60t1d5
/dev/dsk/c48t1d6
10.1.10.56 对应盘符
/dev/rdisk/disk121
/dev/rdisk/disk126
/dev/rdisk/disk133
/dev/rdisk/disk139
10.1.10.57 对应盘符
/dev/rdisk/disk93
/dev/rdisk/disk99
/dev/rdisk/disk108
/dev/rdisk/disk116
4、找出对应盘符的唯一ID,并找出其WWN(盘符应该是字符设备文件):
10.1.1.94.56
$ ll disk121 disk126 disk133 disk139
crw-r----- 1 bin sys 13 0x000025 Oct 11 13:53 disk121
crw-r----- 1 bin sys 13 0x000026 Oct 11 13:54 disk126
crw-r----- 1 bin sys 13 0x000027 Oct 11 13:56 disk133
crw-r----- 1 bin sys 13 0x000028 Oct 11 14:08 disk139
scsimgr lun_map -D /dev/rdisk/disk121 | grep WWID
scsimgr lun_map -D /dev/rdisk/disk126 | grep WWID
scsimgr lun_map -D /dev/rdisk/disk133 | grep WWID
scsimgr lun_map -D /dev/rdisk/disk139 | grep WWID
WWN的结果省略
10.1.194.57
#cd /dev/rdisk
# ll disk93 disk99 disk108 disk116
crw-r----- 1 bin sys 13 0x000015 Oct 11 13:53 disk108
crw-r----- 1 bin sys 13 0x000016 Oct 11 14:06 disk116
crw-r----- 1 bin sys 13 0x000013 Oct 11 13:50 disk93
crw-r----- 1 bin sys 13 0x000014 Oct 11 13:51 disk99
scsimgr lun_map -D /dev/rdisk/disk93 | grep WWID
scsimgr lun_map -D /dev/rdisk/disk99 | grep WWID
scsimgr lun_map -D /dev/rdisk/disk108 | grep WWID
scsimgr lun_map -D /dev/rdisk/disk116 | grep WWID
WWN的结果省略
5、根据一一对应的WWN值,将相应WWN对应两个节点的盘符设置成一致:
10.1.10.56
#mknod /dev/rdisk/data5disk c 13 0x000013
#mknod /dev/rdisk/data6disk c 13 0x000014
#mknod /dev/rdisk/data7disk c 13 0x000015
#mknod /dev/rdisk/data8disk c 13 0x000016
10.1.10.57
#mknod /dev/rdisk/data5disk c 13 0x000025
#mknod /dev/rdisk/data6disk c 13 0x000026
#mknod /dev/rdisk/data7disk c 13 0x000027
#mknod /dev/rdisk/data8disk c 13 0x000028
6、设置两个节点对应盘符路径的权限:
#chown oracle:oinstall /dev/rdisk/data5disk
#chown oracle:oinstall /dev/rdisk/data6disk
#chown oracle:oinstall /dev/rdisk/data7disk
#chown oracle:oinstall /dev/rdisk/data8disk
7、以ORACLE用户检验读写权限
$dd if=/dev/zero of=/dev/rdisk/data5disk count=10 count=1024
8、在其中一节点上为ASM磁盘组添加磁盘
export ORACLE_SID=+ASM3
sqlplus / as sysdba
alter diskgroup DATADG add disk '/dev/rdisk/data5disk';
alter diskgroup DATADG add disk '/dev/rdisk/data6disk';
alter diskgroup DATADG add disk '/dev/rdisk/data7disk';
alter diskgroup DATADG add disk '/dev/rdisk/data8disk';
(注意: 检查diskgroup添加前后的对比.
select a.GROUP_NUMBER, a.name, a.path, b.NAME
from v$asm_disk a,
v$asm_diskgroup b
where a.GROUP_NUMBER = b.GROUP_NUMBER
)