本文共 9824 字,大约阅读时间需要 32 分钟。
Checking iscsi config: [FAILED]
检查iscsi是否已经安装
[root@testdb2 ~]# rpm -qa | grep iscsi
尚未安装
[root@testdb2 ~]# yum install iscsi*
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for iscsi-initiator-utils to pack into transaction set.
iscsi-initiator-utils-4.0 100% |=========================| 6.9 kB 00:00
---> Package iscsi-initiator-utils.i386 0:4.0.3.0-7 set to be updated
--> Running transaction check
--> Processing Dependency: libsysfs.so.1 for package: iscsi-initiator-utils
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for sysfsutils to pack into transaction set.
sysfsutils-1.2.0-1.i386.r 100% |=========================| 4.0 kB 00:00
---> Package sysfsutils.i386 0:1.2.0-1 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
iscsi-initiator-utils i386 4.0.3.0-7 yihaodian 92 k
Installing for dependencies:
sysfsutils i386 1.2.0-1 yihaodian 56 k
Transaction Summary
=============================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 148 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): sysfsutils-1.2.0-1 100% |=========================| 56 kB 00:00
(2/2): iscsi-initiator-ut 100% |=========================| 92 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: sysfsutils ######################### [1/2]
Installing: iscsi-initiator-utils ######################### [2/2]
Installed: iscsi-initiator-utils.i386 0:4.0.3.0-7
Dependency Installed: sysfsutils.i386 0:1.2.0-1
Complete! [root@rac2 ~]# rpm -qa | grep iscsi
iscsi-initiator-utils-4.0.3.0-8
[root@rac2 ~]# cat /etc/initiatorname.iscsi
GenerateName=yes
已经安装成功,编辑文件,加入存储地址,默认端口号3260可以省略
[root@rac2 ~]# cat /dev/null > /etc/iscsi.conf
[root@rac2 ~]# vi /etc/iscsi.conf
DiscoveryAddress=*.*.*.*
重启iscsi服务
[root@rac2 ~]# service iscsi restart
Searching for iscsi-based multipath maps
Found 0 maps
Stopping iscsid: iscsid not running
Checking iscsi config: [ OK ]
Loading iscsi driver: [ OK ]
Starting iscsid: [ OK ]
配置成功
[root@rac2 ~]# more /etc/initiatorname.iscsi
## DO NOT EDIT OR REMOVE THIS FILE!
## If you remove this file, the iSCSI daemon will not start.
## If you change the InitiatorName, existing access control lists
## may reject this initiator. The InitiatorName must be unique
## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames.
InitiatorName=iqn.1987-05.com.cisco:01.e94b10fc7a5e
配置iscsi随机器开启自动启动
[root@rac2 ~]# chkconfig iscsi --list
iscsi 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@rac2 ~]# chkconfig iscsi on
[root@rac2 ~]# chkconfig iscsi --list
iscsi 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@rac2 ~]# chkconfig multipathd --list
multipathd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@rac2 ~]# chkconfig multipathd on
[root@rac2 ~]# chkconfig multipathd --list
multipathd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
接下来连接到存储页面,添加lun group
创建了linux主机到存储的关联,接着创建一个lun
接着将其映射到刚刚新建的组中
重启Linux的iscsi服务
[root@rac2 ~]# service iscsi restart
Searching for iscsi-based multipath maps
Found 0 maps
Stopping iscsid: [ OK ]
Removing iscsi driver: [ OK ]
Checking iscsi config: [ OK ]
Loading iscsi driver: [ OK ]
Starting iscsid: [ OK ]
可以通过fdisk –l看到刚刚新映射的lun
[root@rac2 ~]# fdisk -l
Disk /dev/sda: 898.3 GB, 898319253504 bytes
255 heads, 63 sectors/track, 109214 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 522 4192933+ 83 Linux
/dev/sda2 523 16840 131074335 82 Linux swap
/dev/sda3 16841 22062 41945715 83 Linux
/dev/sda4 22063 109214 700048440 5 Extended
/dev/sda5 22063 109214 700048408+ 83 Linux
Disk /dev/sdb: 209 MB, 209715200 bytes
7 heads, 58 sectors/track, 1008 cylinders
Units = cylinders of 406 * 512 = 207872 bytes
Disk /dev/sdb doesn't contain a valid partition table
编辑multipath.conf文件,将下面一段记录注释
#devnode_blacklist {
# devnode "*"
#}
[root@rac2 ~]# multipath -F
[root@rac2 ~]# multipath -v2
create: mpath1 (360a9800050336d38565a63486f626370)
[size=200 MB][features="1 queue_if_no_path"][hwhandler="0"]
\_ round-robin 0 [prio=2]
\_ 9:0:0:1 sdb 8:16 [ready]
成功将Lun映射
[root@rac2 ~]# more /var/lib/multipath/bindings
# Multipath bindings, Version : 1.0
# NOTE: this file is automatically maintained by the multipath program.
# You should not need to edit this file in normal circumstances.
#
# Format:
# alias wwid
#
mpath0 36842b2b06e778700148674ea06677df0
mpath1 360a9800050336d38565a63486f626370—将mpath1改为ocr1
[root@rac2 ~]# cd /dev/mapper
[root@rac2 mapper]# multipath -F
[root@rac2 mapper]# multipath -v2
create: ocr1 (360a9800050336d38565a63486f626370)
[size=200 MB][features="1 queue_if_no_path"][hwhandler="0"]
\_ round-robin 0 [prio=2]
\_ 9:0:0:1 sdb 8:16 [ready]
[root@rac2 mapper]# ls -altr
total 0
brw-rw---- 1 root disk 253, 0 Apr 18 04:35 ocr1
drwxr-xr-x 2 root root 80 Apr 18 04:35 .
drwxr-xr-x 10 root root 6340 Apr 18 04:35 ..
crw------- 1 root root 10, 63 Apr 18 2011 control
编辑/etc/multipath.conf文件,添加以下内容
multipaths {
multipath {
wwid 360a9800050336d38565a63486f626370
alias ocr1
path_grouping_policy multibus
path_checker readsector0
path_selector "round-robin 0"
failback manual
rr_weight priorities
no_path_retry 5
}
}
对刚刚加载的lun ocr1进行分区
[root@rac2 mapper]# fdisk ocr1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): p
Disk ocr1: 209 MB, 209715200 bytes
7 heads, 58 sectors/track, 1008 cylinders
Units = cylinders of 406 * 512 = 207872 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1008, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1008, default 1008): +100M
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (483-1008, default 483):
Using default value 483
Last cylinder or +size or +sizeM or +sizeK (483-1008, default 1008):
Using default value 1008
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks
然后重启,重新启动之后Linux才会真正能够使用该分区
[root@rac2 mapper]# reboot
Broadcast message from root (pts/1) (Mon Apr 18 04:37:46 2011):
The system is going down for reboot NOW!
重启完成,配置raw映射
[root@rac2 ~]# vi /etc/sysconfig/rawdevices
/dev/raw/raw1 /dev/mapper/ocr1p2
/dev/raw/raw2 /dev/mapper/ocr2p2
/dev/raw/raw3 /dev/mapper/vote1p2
/dev/raw/raw4 /dev/mapper/vote2p2
/dev/raw/raw5 /dev/mapper/vote3p2
/dev/raw/raw6 /dev/mapper/datap1
/dev/raw/raw7 /dev/mapper/recoveryp1
然后开启rawdevicesfuw
[root@rac1 ~]# service rawdevices restart
Assigning devices:
/dev/raw/raw1 --> /dev/mapper/ocr1p2
/dev/raw/raw1: bound to major 253, minor 18
/dev/raw/raw2 --> /dev/mapper/ocr2p2
/dev/raw/raw2: bound to major 253, minor 8
/dev/raw/raw3 --> /dev/mapper/vote1p2
/dev/raw/raw3: bound to major 253, minor 15
/dev/raw/raw4 --> /dev/mapper/vote2p2
/dev/raw/raw4: bound to major 253, minor 17
/dev/raw/raw5 --> /dev/mapper/vote3p2
/dev/raw/raw5: bound to major 253, minor 16
/dev/raw/raw6 --> /dev/mapper/datap1
/dev/raw/raw6: bound to major 253, minor 10
/dev/raw/raw7 --> /dev/mapper/recoveryp1
/dev/raw/raw7: bound to major 253, minor 13
done
[root@rac1 raw]# chown -R oracle:oinstall /dev/raw/*
[root@rac1 raw]# chmod -R 660 /dev/raw/*
[root@rac1 raw]# vi /etc/udev/permissions.d/50-udev.permissions
# raw devices
ram*:oracle:dba:0660
raw/*:oracle:dba:0660
[root@rac2 ~]# chkconfig --list rawdevices
rawdevices 0:off 1:off 2:off 3:on 4:on 5:on 6:off
[root@rac2 ~]# chkconfig rawdevices on
[root@rac2 ~]# chkconfig --list rawdevices
rawdevices 0:off 1:off 2:on 3:on 4:on 5:on 6:off
存储配置完成了,开始安装oracle
1 配置/etc/hosts
2 配置用户等价性
3 配置系统参数
4 安装clusterware
预先检查[oracle@rac1 cluvfy]$ ./runcluvfy.sh stage -pre crsinst -n rac1,rac2 –verbose
OraCrs10g_home
/home/oracle/oracle/product/10.2.0/crs
最后执行root.sh的时候一直不成功
[root@rac1 bin]# ./clsfmt.bin ocr /dev/raw/raw1
clsfmt: Failure trying to resize OCR file from 109340672 bytes to 109342720 bytes
clsfmt: Received unexpected error 4 from skgfifi
skgfifi: Additional information: -2
Additional information: 109340672
经查证是bug
[oracle@rac1 ~]$ unzip p4679769_10201_Linux-x86-64.zip
Archive: p4679769_10201_Linux-x86-64.zip
creating: 4679769/
inflating: 4679769/README.txt
inflating: 4679769/clsfmt.bin
[oracle@rac1 ~]$ cp 4679769/clsfmt.bin /home/oracle/oracle/product/10.2.0/crs/bin/
[root@rac1 bin]# ./clsfmt.bin ocr /dev/raw/raw1
clsfmt: Failure trying to resize OCR file from 109340672 bytes to 109342720 bytes
clsfmt: successfully initialized file /dev/raw/raw1
执行vipca
执行runinstall安装数据库软件
升级至10205
接下来的事情就一帆风顺了
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15480802/viewspace-692981/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15480802/viewspace-692981/