免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123下一页
最近访问板块 发新帖
查看: 30173 | 回复: 23
打印 上一主题 下一主题

oracle10g rac for hp-ux双机盘符不一致,咋办 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-27 09:47 |只看该作者 |倒序浏览
rt

oracle10g rac 安装IA hp-ux  使用ASM存储方式
但是双机盘符不一致如何 修改?请大家帮帮忙哈 多谢了!

论坛徽章:
0
2 [报告]
发表于 2008-12-27 12:10 |只看该作者
多种解决方法
1.修改盘符,也就是另一台主机的pv的设备文件名,让他与第一台主机盘符一致,具体看hp的红宝书
2.创建另一台主机的pv设备文件名字的连接,和第一台主机一致,就是第2台主机pv相同的硬件地址2个设备文件名,第2个和主机一的pv设备文件名一样
3.创建类似第2种方法,但是要修改2台主机,2台主机都不用pv的名字,而是用新的名字
是将c3t19d5改为诸如asmdisk1的ASM disks名字,在dev目录下mknod来创建
[root@racnode1]# ls -lL c3t19d7
crw-r----- 1 root sys 32, 20 Feb 24 07:14 c3t19d7
[root@racnode1]# mkdir /dev/asmdisk
[root@racnode1]# cd /dev/asmdisk
[root@racnode1]# mknod asmdisk1 c 32 20
[root@racnode1]# ls -l
crw-r--r-- 1 root other 32, 20 May 7 07:50 asmdisk1
major and minor numbers和c3t19d7一样.
[root@racnode1]# chown oracle:dba disk1
[root@racnode1]# ls –l /dev/disk
crw-r--r-- 1 oracle dba 32, 20 May 7 07:50 disk1
现在ASM_DISKSTRING可以设置为/dev/asmdisk/*,现在asm可以按照按asmdisk1这样的标示来访问磁盘,asm仅扫描匹配ASM_DISKSTRING设置的磁盘标示
用V$ASM_DISK来查看扫描到的磁盘

[ 本帖最后由 hp-ux民工 于 2008-12-27 22:36 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2008-12-27 14:05 |只看该作者
非常感谢楼上的解答

我觉得第二种方法和3方法都比较好实施所以我试着第三种方法
进入/dev/rdsk目录执行下面命令 和您显示有出入 看不出来主次设备号啊
bash-3.2# ls -lL c79t0d0
crw-r-----   1 bin        sys        188 0x4f0000 Sep 23 11:46 c79t0d0

您的解答里
“”root@racnode1]# chown oracle:dba disk1                  出现disk1是不是asmdisk1写错了的
[root@racnode1]# ls –l /dev/disk                                     这个命令无法执行说没有disk目录
crw-r--r-- 1 oracle dba 32, 20 May 7 07:50 disk1“”

论坛徽章:
0
4 [报告]
发表于 2008-12-27 16:49 |只看该作者
楼上的哥们,是我的错,
1.我把disk1写成disk啦
2.我把环境从Solaris搬到hp-ux啦
  不过你可以按照方法去修改,不是让你必须一样的
crw-r-----   1 bin        sys        188 0x4f0000 Sep 23 11:46 c79t0d0

已经看出来主号和次号啦,主号188 次号 0x4f0000
mknod asmdisk1 c 188 0x4f0000
就可以啦,我现在没环境,没法验证,你可以自己测试下

俺仅仅是个初学asm的菜鸟,说错啦,休怪!!!

[ 本帖最后由 hp-ux民工 于 2008-12-27 16:54 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2008-12-27 20:43 |只看该作者
If the ioscan command shows different device names for the same device on any
node, then:
a. Change directory to the /dev/rdsk directory.
b. Enter the following command to list the raw disk device names and their
associated major and minor numbers:
# ls -la
The output from this command is similar to the following for each disk device:
crw-r--r-- 1 bin sys 188 0x032000 Nov 4 2003 c3t2d0
In this example, 188 is the device major number and 0x32000 is the device
minor number.
c. Enter the following command to create a new device file for the disk that you
want to use, specifying the same major and minor number as the existing
device file:
# mknod ora_ocr_raw_100m c 188 0x032000
d. Repeat these steps on each node, specifying the correct major and minor
numbers for the new device files on each node.

Enter commands similar to the following on every node to change the owner,
group, and permissions on the character raw device file for each disk device that
you want to use:
■ OCR:
# chown rootinstall /dev/rdsk/cxtydz
# chmod 640 /dev/rdsk/cxtydz
■ Oracle Clusterware voting disk or database files:
# chown oracle:dba /dev/rdsk/cxtydz
# chmod 660 /dev/rdsk/cxtydz

[ 本帖最后由 hp-ux民工 于 2008-12-27 20:45 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2008-12-27 20:59 |只看该作者
Please note that the device paths for Oracle Clusterware and ASM disks must be the same
from both systems. If they are not the same use the following command to map them to a
new virtual device name:
#mksf -C disk -H <hardware path> -I 62 <new virtual device name>
#mksf -C disk -H <hardware path> -I 62 -r <new virtual device name>
Example:
#mksf -C disk -H 0/0/10/0/0.1.0.39.0.1.0 -I 62 /dev/dsk/c8t1d0
#mksf -C disk -H 0/0/10/0/0.1.0.39.0.1.0 -I 62 -r /dev/rdsk/c8t1d0
As you can see at the following output of the ioscan command, now multiple device names
are mapped to the same hardware path.

[ 本帖最后由 hp-ux民工 于 2008-12-27 21:27 编辑 ]

1.JPG (29.34 KB, 下载次数: 188)

asm

asm

论坛徽章:
0
7 [报告]
发表于 2008-12-27 21:13 |只看该作者
How to Change an Instance Number
Not only in cluster environments it is often useful to have a consistent device file naming. The
following procedures may be used to change the instance numbers of such devices. These
numbers determine the naming of the correpsonding device files.
The ioconfig provides the mapping between instance numbers used by the kernel and the
information the I/O system uses to communicate with peripheral devices (hardware paths).
Two copies are maintained (/stand/ioconfig and /etc/ioconfig).
At boot time the ioconfig information is stored in the io_tree kernel data structure (see
ioinit(1M)). The only purpose of the ioconfig is to maintain configuration information when
the system is not running. Even if hardware is removed from the system all mappings keep in
place. This guarantees that no new device file names will appear after such changes. If
removed hardware is added back to the system the original mapping can be reused, since it is
still present in the ioconfig files.
Usually we want to change mappings for disk and lan devices. For lan devices we change
directly the corresponding lan instance numbers. For disk devices we need to take care of the
ext_bus instance numbers. The numbers of such 'External Busses' (aka card instances) are
responsible for the 'c' numbers being part of disk device names.
Look at the following extract of an ioscan -fn output:
ext_bus 3 2/0/1 c720 CLAIMED INTERFACE Built-in SCSI
target 0 2/0/1.3 tgt CLAIMED DEVICE
target 1 2/0/1.5 tgt CLAIMED DEVICE
disk 4 2/0/1.5.0 sdisk CLAIMED DEVICE SEAGATE ST15150N
/dev/dsk/c3t5d0 /dev/rdsk/c3t5d0
The ext_bus instance number (3) is responsible for the 'c3' in 'c3t5d0'. The target (t5) and the
LUN (d0), which affect the rest of the name, are not changeable by software. Instead they
map directly to the underlying hardware configuration.
In the following three procedures are documented, an easy/quick one (Procedure I) and two
other more complicated ones (Procedure II and III).
Usually Procedure I is sufficient and there is no need to try II or III. These are only needed if
Procedure I fails. Procedure II usually works in all cases, but requires two reboots. Procedure
III needs only one reboot and should work in all cases, but you need the ioconfig2infile tool
(adapted from WTEC's parse_ioconfig), which can be obtained from the HP internal site
ftp://einstein.grc.hp.com/TOOLS/MISC (HP internal).


Procedure I
Default procedure, requires one reboot and works without additional tools.
1) Extract a configuration template from the current ioscan output
# ioscan -f | grep -e INTERFACE -e DEVICE | \
grep -v target | \
awk '{print $3, $1, $2}' > /infile
2) Edit /infile and change the ext_bus and lan instances as desired
No class is allowed to get more than one line for the same instance!
3) Bring down the system gracefully to run level 1
# init 1
4) Apply the ioconfig change
# /sbin/ioinit -f /infile -r
The system will reboot immediately if the change is successful.
Warnings like “Input is identical to kernel” can be ignored.
If unsuccessful, the most likely error to happen is:
“ioinit: Instance number X already exists for class XXX”
The problem is that your desired instance assignment conflicts with an existing instance
number. If that instance is bound to hardware that is no longer visible in ioscan, then
you are in trouble and need to perform the Procedure II or III.
5) Verify the changes
Once the system is up, verify that all the instance numbers were changed as expected. It
may be necessary to re-import volume groups to ensure that /etc/lvmtab contains the
correct entries. The lan configuration may need to be changed also.
Procedure II
Reliable, requires two reboots and works without additional tools.
1) Extract a configuration template from the current ioscan output
# ioscan -f | grep -e INTERFACE -e DEVICE | \
grep -v target | \
awk '{print $3, $1, $2}' > /infile
2) Edit /infile and change the ext_bus and lan instances as desired
No class is allowed to get more than one line for the same instance!

[ 本帖最后由 hp-ux民工 于 2008-12-27 21:19 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2008-12-27 21:20 |只看该作者
3) Move away the current ioconfig files and shutdown/reboot
# mv /stand/ioconfig /stand/ioconfig.sav
# mv /etc/ioconfig /etc/ioconfig.sav
# shutdown -ry 0
4) Recreate ioconfig files.
Due to the missing ioconfig files the system will come to an ioinitrc prompt. Now
recreate new ioconfig files from scratch. This prevents you from running into possible
assignment conflicts.
(in ioinitrc)# /sbin/ioinit -c
5) Apply the ioconfig change with your prepared infile
(in ioinitrc)# /sbin/ioinit -f /infile -r
The system will reboot again now if the change was successful.
Warnings like “Input is identical to kernel” can be ignored.
6) Verify the changes
Once the system is up, verify that all the instance numbers were changed as expected. It
may be necessary to re-import volume groups to ensure that /etc/lvmtab contains the
correct entries. The lan configuration may need to be changed also.
Procedure III
Reliable, requires one reboot, needs ioconfig2infile tool. Since the infile is directly extracted
from the current ioconfig you get all mappings, even old ones for hardware that is not longer
visible in ioscan.
1) Extract a configuration template using ioconfig2infile
# ioconfig2infile /etc/ioconfig >/infile
2) Edit /infile and change the ext_bus and lan instances as desired
No class is allowed to get more than one line for the same instance!
3) Bring down the system gracefully to run level 1
# init 1
4) Apply the ioconfig change
# /sbin/ioinit -f /infile -r
The system will reboot immediately if the change is successful.
Warnings like “Input is identical to kernel” can be ignored.
5) Verify the changes
Once the system is up, verify that all the instance numbers were changed as expected. It
may be necessary to re-import volume groups to ensure that /etc/lvmtab contains the
correct entries. The lan configuration may need to be changed also.
NOTE:
If anything goes wrong you can always put the ioconfig copy /etc/ioconfig.sav and
/stand/ioconfig.sav back in place and reboot.

论坛徽章:
0
9 [报告]
发表于 2008-12-27 21:29 |只看该作者
以上3种方法,仅供参考,这是我以前从施工中从别的官方文档中总结出来的。

论坛徽章:
0
10 [报告]
发表于 2008-12-27 21:47 |只看该作者
民工兄答得很好呀,建议此贴精华!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP