1.1 配置ASM 磁盘
1.1.1 Asm配置
twonodes#/etc/rc.d/init.d/oracleasm configure –i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: grid
Default group to own the driver interface []: oinstall
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
[@more@]
[root@dnlgl1 mapper]# ls -lt /dev/dm*
brw-rw---- 1 root root 253, 5 Aug 9 17:00 /dev/dm-5
brw-rw---- 1 root root 253, 18 Aug 9 17:00 /dev/dm-18
brw-rw---- 1 root root 253, 17 Aug 9 17:00 /dev/dm-17
brw-rw---- 1 root root 253, 16 Aug 9 17:00 /dev/dm-16
brw-rw---- 1 root root 253, 15 Aug 9 17:00 /dev/dm-15
brw-rw---- 1 root root 253, 14 Aug 9 17:00 /dev/dm-14
brw-rw---- 1 root root 253, 13 Aug 9 17:00 /dev/dm-13
brw-rw---- 1 root root 253, 12 Aug 9 17:00 /dev/dm-12
brw-rw---- 1 root root 253, 11 Aug 9 17:00 /dev/dm-11
brw-rw---- 1 root root 253, 10 Aug 9 17:00 /dev/dm-10
brw-rw---- 1 root root 253, 9 Aug 9 17:00 /dev/dm-9
brw-rw---- 1 root root 253, 8 Aug 9 17:00 /dev/dm-8
brw-rw---- 1 root root 253, 7 Aug 9 17:00 /dev/dm-7
brw-rw---- 1 root root 253, 6 Aug 9 17:00 /dev/dm-6
[root@dnlgl1 mapper]# ls -lt /dev/mapper
total 0
brw-rw---- 1 root disk 253, 9 Aug 9 17:00 ds8100_data_01
brw-rw---- 1 root disk 253, 10 Aug 9 17:00 ds8100_data_02
brw-rw---- 1 root disk 253, 11 Aug 9 17:00 ds8100_data_03
brw-rw---- 1 root disk 253, 12 Aug 9 17:00 ds8100_data_04
brw-rw---- 1 root disk 253, 13 Aug 9 17:00 ds8100_data_05
brw-rw---- 1 root disk 253, 16 Aug 9 17:00 ds8100_data_06
brw-rw---- 1 root disk 253, 17 Aug 9 17:00 ds8100_data_07
brw-rw---- 1 root disk 253, 18 Aug 9 17:00 ds8100_data_08
brw-rw---- 1 root disk 253, 5 Aug 9 17:00 ds8100_data_09
brw-rw---- 1 root disk 253, 6 Aug 9 17:00 ds8100_data_10
brw-rw---- 1 root disk 253, 8 Aug 9 17:00 ds8100_flash_1
brw-rw---- 1 root disk 253, 15 Aug 9 17:00 ds8100_flash_2
brw-rw---- 1 root disk 253, 7 Aug 9 17:00 ds8100_ocr_1
brw-rw---- 1 root disk 253, 14 Aug 9 17:00 ds8100_ocr_2
brw-rw---- 1 root disk 253, 4 Aug 8 15:59 VolGroup00-archivelog
brw-rw---- 1 root disk 253, 3 Aug 8 15:58 VolGroup00-lv_grid
brw-rw---- 1 root disk 253, 2 Aug 8 15:58 VolGroup00-lv_oracle
brw-rw---- 1 root disk 253, 0 Aug 8 15:34 VolGroup00-LogVol00
brw-rw---- 1 root disk 253, 1 Aug 8 15:34 VolGroup00-LogVol01
crw------- 1 root root 10, 63 Aug 8 15:34 control
不可以执行对/dev/dm-*进行化分区,因为两个node的dm-*的连接的设备不一定相同.
chown grid:asmadmin /dev/dm*
oracleasm createdisk OCRVG /dev/dm-7
这样的操作是不建议的.
使用fdisk进行分区,这里就分一个区
#fdisk /dev/mapper/Ds8100_ocr_1
nàpà1…àw
#partprobe 同步磁盘信息
#fdisk –l的输出为:
Disk /dev/mapper/ds8100_1: 128.8 GB, 128849018880 bytes
。。。。。。
Device Boot Start End Blocks Id System
/dev/mapper/ds8100_ocr_1p1 1 15665 125829081 83 Linux
。。。。。。
检查DEV目录下有没有磁盘分区设备
#ls –lt /dev/mapper
……
brw-rw---- 1 root disk 253, 20 Aug 13 09:37 ds8100_ocr_1p1
创建oracleasm磁盘
#oracleasm create disk OCRVG /dev/mapper/Ds8100_ocr_1p1
#oracleasm listdisks
OCRVG
节点2:
#partprobe
#ls –lt /dev/mapper 检查存在分区的设备
brw-rw---- 1 root disk 253, 20 Aug 13 09:37 ds8100_ocr_1p1
#oracleasm scandisks
#oracleasm listdisks
OCRVG
使用了asmlib管理磁盘就不需要设置磁盘访问的权限
如果不使用asmlib(在redhat6中),则需要手工配置udev
1.1 加载hangcheck模块
echo "options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180" >> /etc/modprobe.conf
echo "/sbin/modprobe hangcheck-timer" >> /etc/rc.local
1.2 配置/etc/hosts文件
[root@rac1 ~]# more /etc/hosts
10.90.12.231 dnlgl1
10.90.12.232 dnlgl1-vip
172.10.10.1 dnlgl1-priv
10.90.12.233 dnlgl2
10.90.12.234 dnlgl2-vip
172.10.10.2 dnlgl2-priv
10.90.12.235 scan_vip
[root@rac1 ~]# hostname
Dnlgl1
[root@rac2 ~]# hostname
dnlgl2
1.3 配置/etc/resolv.conf
twonodes# more /etc/resolv.conf
nameserver 10.150.207.50
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/32980/viewspace-1059551/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/32980/viewspace-1059551/