陈奇网络工作室

LinuxudevOracleASM磁盘动态管理-实验

建设工作站服务器

1概要

在redhatenterpriseLinux(rhel ) 6之前,Oracle使用ASMLib程序包来管理ASM磁盘。 但是,2011年5月Oracle宣布,Oracle将不再提供redhatenterpriseLinux(rhel ) 6的ASMLib程序包和相关更新。

甲骨文在该声明中宣布,ASMLib更新将通过UnbreakableLinuxnetwork(ULN )发布,并仅向Oracle Linux客户公开。 ULN为Oracle和红帽客户提供服务,但如果客户希望使用ASMLib,则必须使用Oracle的kernel代替移除红帽的kernel。

本实验引入了Oracle ASM,不是用ASMLib,而是用udev动态管理ASM磁盘。

注意: Linux内核2.6和更高版本支持udev。

虚拟机: VMware Workstation 9

操作系统: redhatenterpriselinuxserverrelease 5.6

系统内核:2.6.18-238.el5

数据库: Oracle数据库11.2.0.1

2实验步骤

以前使用udev方法创建了ASM磁盘,安装了Oracle Grid、Oracle数据库,并创建了数据库。 然后,添加四个1G磁盘,扩展每个现有的ASM磁盘组DG_DATA,并创建新的ASM磁盘组DG_NEW_DATA。

检查/dev/sdb、/dev/sdg、/dev/sdh和/dev/sdi中的新磁盘。

[root@ora32 dev]# fdisk -l

Disk /dev/sda: 23.6 GB,23622320128 bytes

255 heads,63 sectors/track,2871 cylinders

units=cylinders of 16065 * 512=8225280 bytes

dvicebootstartendblocksidsystem

/dev/sda1 * 1 65 522081 83 Linux

/dev/sda 266457314874082 Linux swap/Solaris

/dev/sda 34582871193904558 elinuxlvm

Disk /dev/sdb: 1073 MB,1073741824 bytes

255头,63 sectors/track,130 cylinders

units=cylinders of 16065 * 512=8225280 bytes

disk/dev/sdbdoesn\\& quot; tcontainavalidpartitiontable

Disk /dev/sdc: 2147 MB,2147483648 bytes

255头,63 sectors/track,261 cylinders

units=cylinders of 16065 * 512=8225280 bytes

dvicebootstartendblocksidsystem

/dev/sdc1 1 261 2096451 83 Linux

Disk /dev/sdd: 2147 MB,2147483648 bytes

255头,63 sectors/track,261 cylinders

units=cylinders of 16065 * 512=8225280 bytes

dvicebootstartendblocksidsystem

/dev/sdd1 1 261 2096451 83 Linux

Disk /dev/sde: 2147 MB,2147483648 bytes

255头,63 sectors/track,261 cylinders

units=cylinders of 16065 * 512=8225280 bytes

dvicebootstartendblocksidsystem

/dev/sde1 1 261 2096451 83 Linux

Disk /dev/sdf: 2147 MB,2147483648 bytes

255头,63 sectors/track,261 cylinders

units=cylinders of 16065 * 512=8225280 bytes

dvicebootstartendblocksidsystem

/dev/sdf1 1 261 2096451 83 Linux

Disk /dev/sdg: 1073 MB,1073741824 bytes

255头,63 sectors/track,130 cylinders

units=cylinders of 16065 * 512=8225280 bytes

disk/dev/SDGdoesn\\& quot; tcontainavalidpartitiontable

Disk /dev/sdh: 1073 MB,1073741824 bytes

255头,63 sectors/track,130 cylinders

units=cylinders of 16065 * 512=8225280 bytes

disk/dev/SDHdoesn\\& quot; tcontainavalidpartitiontable

Disk /dev/sdi: 1073 MB,1073741824 bytes

255头,63 sectors/track,130 cylinders

units=cylinders of 16065 * 512=8225280 bytes

disk/dev/SDIdoesn\\& quot; tcontainavalidpartitiontable

请将4个磁盘划分为分区,并将每个磁盘划分为一个分区。

[root@ora32 dev]# fdisk -l

Disk /dev/sda: 23.6 GB,23622320128 bytes

255 heads,63 sectors/track,2871 cylinders

units=cylinders of 16065 * 512=8225280 bytes

dvicebootstartendblocksidsystem

/dev/sda1 * 1 65 522081 83 Linux

/dev/sda 266457314874082 Linux swap/Solaris

/dev/sda 34582871193904558 elinuxlvm

Disk /dev/sdb: 1073 MB,1073741824 bytes

255头,63 sectors/track,130 cylinders

units=cylinders of 16065 * 512=8225280 bytes

dvicebootstartendblocksidsystem

/dev/sdb1 1 130 1044193 83 Linux

Disk /dev/sdc: 2147 MB,2147483648 bytes

255头,63 sectors/track,261 cylinders

units=cylinders of 16065 * 512=8225280 bytes

dvicebootstartendblocksidsystem

/dev/sdc1 1 261 2096451 83 Linux

Disk /dev/sdd: 2147 MB,2147483648 bytes

255头,63 sectors/track,261 cylinders

units=cylinders of 16065 * 512=8225280 bytes

dvicebootstartendblocksidsystem

/dev/sdd1 1 261 2096451 83 Linux

Disk /dev/sde: 2147 MB,2147483648 bytes

255头,63 sectors/track,261 cylinders

units=cylinders of 16065 * 512=8225280 bytes

dvicebootstartendblocksidsystem

/dev/sde1 1 261 2096451 83 Linux

Disk /dev/sdf: 2147 MB,2147483648 bytes

255头,63 sectors/track,261 cylinders

units=cylinders of 16065 * 512=8225280 bytes

dvicebootstartendblocksidsystem

/dev/sdf1 1 261 2096451 83 Linux

Disk /dev/sdg: 1073 MB,1073741824 bytes

255头,63 sectors/track,130 cylinders

units=cylinders of 16065 * 512=8225280 bytes

dvicebootstartendblocksidsystem

/dev/sdg1 1 130 1044193 83 Linux

Disk /dev/sdh: 1073 MB,1073741824 bytes

255头,63 sectors/track,130 cylinders

units=cylinders of 16065 * 512=8225280 bytes

dvicebootstartendblocksidsystem

/dev/sdh2 1 130 1044193 83 Linux

Disk /dev/sdi: 1073 MB,1073741824 bytes

255头,63 sectors/track,130 cylinders

units=cylinders of 16065 * 512=8225280 bytes

dvicebootstartendblocksidsystem

/dev/sdi1 1 130 1044193 83 Linux

目前,需要通过udev管理这些磁盘设备文件,在规则文件中将磁盘映射到固定名称,并授予其所属用户、用户组、操作权限等。

查看udev规则文件

[ root @ ora 32 dev ] # CD/etc/udev/rules.d

[root@ora32 rules.d]# ll

总248

- rw-rr1 root root 515 nov 25201005-udev-early.rules

- rw-rr1 root root 948 dec 8201040-multipath.rules

- rw-rr1 root root 16153 nov 25201050-udev.rules

- rw-rr1 root root 163 dec 11201051-dlm.rules

- rw-rr1 root root 471 nov 25201051-hot plug.rules

- rw-rr1 root root 138 may 1017:2855-USM.rules

- rw-rr1 root root 58016 oct 13200660-lib sane.rules

- rw-rr1 root root 143 oct 13201060-net.rules

- rw-rr1 root root 1088 jul 18200660-PCMCIA.rules

- rw-rr1 root root 316 sep 22201060-raw.rules

- rw-rr1 root root 9175 nov 13201060-wacom.rules

- rw-rr1 root root 129 nov 30201061-u input-STD dev.rules

- rw-rr1 root root 214 nov 30201061-u input-wacom.rules

- rw-rr1 root root 1823 sep 19200885-pcscd _ ccid.rules

- rw-rr1 root root 114 aug 29200890-alsa.rules

- rw-rr1 root root 61 nov 25201090-DM.rules

- rw-rr1 root root 82 nov 4201090-Hal.rules

- rw-rr1 root root 107 nov 25201095-PAM-console.rules

- rw-rr1 root root 292 nov 30201098-kexec.rules

- rw-rr1 root root 669 may 1313:5199-Oracle-ASM devices.rules

- rw-rr1根路由60sep16201299-Oracle.rules

- rw-rr1 root root 334 sep 15201299-VMware-SCSI-udev.rules

- rw-rr1 root root 2319 jul 92008 bluetooth.rules

udev规则文件“99-oracle-asmdevices.rules”已创建。 请确认当前的映射规则和ASM磁盘的状况。

[ root @ ora 32 rules.d ] # cat 99-Oracle-ASM devices.rules

KERNEL==sd? 1、BUS==scsi,PROGRAM==/sbin/scsi_id,

result==36000 c 29 c9a 269653 c 7cd 04 ea2EDB0c 71、NAME=ASM_DISK_2G_1、WNER=grid、GROUP=asmadmin、MODE=0660

KERNEL==sd? 1、BUS==scsi,PROGRAM==/sbin/scsi_id,

result==36000 c 29861258 ebc 95 eded 634 a1 f 36 FD,NAME=ASM_DISK_2G_2,WNER=grid,GROUP=asmadmin,MODE=0660

KERNEL==sd? 1、BUS==scsi,PROGRAM==/sbin/scsi_id,

result==36000 c 296 FD 09 d 9e d 213 df 1999820 ca 89、NAME=ASM_DISK_2G_3、WNER=grid、GROUP=asmadmin、MODE=0660

KERNEL==sd? 1、BUS==scsi,PROGRAM==/sbin/scsi_id,

result==36000 c 2934 a E12 FD4af0DD 366 d 85 b 42 f 5、NAME=ASM_DISK_2G_4、WNER=grid、GROUP=asmadmin、MODE=0660

规则的解释以第一条为例。

在系统启动时,udev是否包含系统总线SCSI(bus==SCSI )和内核设备文件名sd? 1(kernel==SD? 1 )过滤需要动态映射的设备,然后重用/sbin/SCSI _ id ( program==/sbin/SCSI _ id )命令输出的SCSI磁盘id, 后续命名、授权等操作( NAME=ASM_DISK_2G_1,WNER=grID,GROUP=asmadmin ),在输出结果中与36000 c 29 c9a 269653 c 7cd 04 ea2EDB0c 77770 c 77 d匹配

[ root @ ora 32 rules.d ] #/sbin/SCSI _ id-g-s/block/SDC/SD C1

36000 c 29 c9a 269653 c 7cd 04 ea2EDB0c 71

[ root @ ora 32 rules.d ] #/sbin/SCSI _ id-g-s/block/SDD/SD D1

36000 c 29861258 ebc 95 eded 634 a1 f 36 FD

[ root @ ora 32 rules.d ] #/sbin/SCSI _ id-g-s/block/SDE/SDE 1

36000 c 296 FD 09 d 9e d 213 df 1999820 ca89

[ root @ ora 32 rules.d ] #/sbin/SCSI _ id-g-s/block/SDF/SD f1

36000 c 2934 a E12 FD4af0DD 366 d 85 b 42 f 5

根据上述结果可知,udev已经建立了以下映射关系。

/block/sdc/sdc1=ASM_DISK_2G_1

/block/sdd/sdd1=ASM_DISK_2G_2

/block/sde/sde1=ASM_DISK_2G_3

/block/sdf/sdf1=ASM_DISK_2G_4

[grid@ora32 dev]$ ll ASM*

brw-rw--1gridasmadmin 8,33 may 1314:57 ASM _ disk _ 2g _ 1

brw-rw--1gridasmadmin 8,49 may 1314:57 ASM _ disk _ 2g _ 2

brw-rw--1gridasmadmin 8,65 may 1314:54a sm _ disk _ 2g _ 3

brw-rw--1gridasmadmin 8,81 may 1314:57 ASM _ disk _ 2g _ 4

在Oracle视图中查看当前磁盘组和磁盘的使用情况。

[ grid @ ora 32~~ ] $ sqlplus/assysasm

SQL * plus:11.2.0.1.0版productiononmonmay 1314:54:012013

版权所有( c ) 1982,2009,Oracle. All rights reserved。

连接到:

Oracle数据库11 genterpriseeditionrelease 11.2.0.1.064位产品

witheautomaticstoragemanagementoption

SQL

SQL

SQL col name for a10

SQL SELECT group_number,name,type,state,total_mb,free_mb,offline _ disksfromv $ ASM _ disk group;

group _ numbernametypestatetotal _ MB free _ MB offline _ disks

——————---- ————---- ——---——---————

1 DG_DATA EXTERN MOUNTED 8188 6448 0

SQL col group# for 99

SQL col disk# for 99

SQL col name for a5

SQL col path for a11

SQL col LABEL for a7

SQL col FAILGROUP for a10

SQL select GROUP_NUMBER group#,DISK_NUMBER disk#,LABEL,STATE,FAILGROUP,name,path,TOTAL_MB,free_MBfroup

group # disk # labelstatefailgroupnamepathtotal _ MB free _ MB

3354---- ——-——---- ——---- ——---——---——

1 normal DG _ data _ 00dg _ da/dev/ASM _ di 20471612

02 TA_00 SK_2G_3

02

1 normal DG _ data _ 00dg _ da/dev/ASM _ di 20471611

03 TA_00 SK_2G_4

03

1 normal DG _ data _ 00dg _ da/dev/ASM _ di 20471613

01 TA_00 SK_2G_2

01

group # disk # labelstatefailgroupnamepathtotal _ MB free _ MB

3354---- ——-——---- ——---- ——---——---——

1 normal DG _ data _ 00dg _ da/dev/ASM _ di 20471612

00 TA_00 SK_2G_1

00

在此,用udev将新添加的4台硬盘映射到所需的设备文件中,将其中2台硬盘添加到ASM磁盘组DG_DATA中,重新创建ASM磁盘组DG_NEW_DATA

[ root @ ora 32 rules.d ] #/sbin/SCSI _ id-g-s/block/sdb/SD B1

36000 c 2968513 d 97 EB 7cd d d 25 bdbd 10600

[ root @ ora 32 rules.d ] #/sbin/SCSI _ id-g-s/block/SDG/SD G1

36000 c 29682 b a5 EC 7a4c8a 189499 a 89bb

[ root @ ora 32 rules.d ] #/sbin/SCSI _ id-g-s/block/SDH/SDH 2

36000 c 292 a a4 a4e BBB 25 d 15 d 2084 c01 ca

[ root @ ora 32 rules.d ] #/sbin/SCSI _ id-g-s/blokc/SDI/SDI 1

新的设备映射规则

[ root @ ora 32 rules.d ] # vi99-Oracle-ASM devices.rules

KERNEL==sd? 1、BUS==scsi,PROGRAM==/sbin/scsi_id,

result==36000 c 29 c9a 269653 c 7cd 04 ea2EDB0c 71、NAME=ASM_DISK_2G_1、WNER=grid、GROUP=asmadmin、MODE=0660

KERNEL==sd? 1、BUS==scsi,PROGRAM==/sbin/scsi_id,

result==36000 c 29861258 ebc 95 eded 634 a1 f 36 FD,NAME=ASM_DISK_2G_2,WNER=grid,GROUP=asmadmin,MODE=0660

KERNEL==sd? 1、BUS==scsi,PROGRAM==/sbin/scsi_id,

result==36000 c 296 FD 09 d 9e d 213 df 1999820 ca 89、NAME=ASM_DISK_2G_3、WNER=grid、GROUP=asmadmin、MODE=0660

KERNEL==sd? 1、BUS==scsi,PROGRAM==/sbin/scsi_id,

result==36000 c 2934 a E12 FD4af0DD 366 d 85 b 42 f 5、NAME=ASM_DISK_2G_4、WNER=grid、GROUP=asmadmin、MODE=0660

KERNEL==sd? 1、BUS==scsi,PROGRAM==/sbin/scsi_id,

result==36000 c 2968513 d 97 EB 7cd 25 bdbd 10600,NAME=ASM_DISK_1G_1,WNER=grid,GROUP=asmadmin,MODE=0660

KERNEL==sd? 1、BUS==scsi,PROGRAM==/sbin/scsi_id,

result==36000 c 29682 b a5 EC 7a4c8a 189499 a 89 bb,NAME=ASM_DISK_1G_2,WNER=grid,GROUP=asmadmin,MODE=0660

KERNEL==sd? 1、BUS==scsi,PROGRAM==/sbin/scsi_id,

result==36000 c 292 a a4e BBB 25 d 15 d 2084 c01 ca、NAME=ASM_DISK_1G_3、WNER=grid、GROUP=asmadmin、MODE=0660

KERNEL==sd? 1、BUS==scsi,PROGRAM==/sbin/scsi_id,

result==36000 c 29 a 98 ca 1b D8 a 0012 e 99 f992 a 19 d、NAME=ASM_DISK_1G_4、WNER=grid、GROUP=asmadmin、MODE=0660

首次配置udev映射关系时,必须执行以下操作:

1、在目录/etc/udev/rules.d/中创建新的99-oracle-asmdevices.rules文件。

2 .将SCSI设备配置为可信设备,配置/etc/scsi_id.config文件,并添加选项=-g设置。

[ root @ ora 32 rules.d ] # cat/etc/SCSI _ id.config

#

# SCSI _ id配置

#

# loweroruppercasehasnoaffectontheleftside.quotes ( ) are

# requiredforspacesinvalues.modelisthesameasthescsi

# inquiryproductidentificationfield.perthescsiinquiry,the vendor

# is limited to 8 bytes,模型to 16 bytes。

#

# thefirstmatchinglinefoundisused.shortmatchesmatchlongerones,

# ifyoudonotwantsuchamatchspacefilltheextrabytes.ifno model

# is specified,only the vendor string need match。

#

# ptions=any SCSI _ idcommandlineoptions

# vendor=string[,model=string],options=per-device SCSI _ id options

# somelibatadrivesrequirevpdpage0x 80

vendor=ATA,options=-p0x80

options=-g

测试udev是否正确映射

[ root @ ora 32~] # test udev/block/SDG/SD G1

-bash: testudev: command not found

[ root @ ora 32~] # udevtest/block/sdb/SD B1

main:lookingatdevice\\\& quot; /block/sdb/SDB1\\\& quot; 来自subsystem\& amp; quot; block\\\& quot;

udev _ rules _ get _ name:add symlink\\ & amp; quot; disk/by-id/SCSI-36000 c 2968513 d 97 EB 7cd 25 bdbd 10600-part1\

udev _ rules _ get _ name:add symlink\& amp; quot; disk/by-path/PCI-0000:00:10.0-SCSI-0:0:1:0 -部件1

run_program:\\& quot;/lib/udev/vol _ idexport/dev/. tmp-8-17\\ & amp; quot;

run_program:\\\& quot; /lib/udev/vol_id\\& quot; ReturnedwithStatus4

run_program:\\\& quot; /sbin/SCSI_id\\\& quot;

run_program:\\\& quot; /sbin/SCSI_id\\& quot; ( ( stdout ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) )

run_program:\\& quot; /sbin/SCSI_id\\& quot; ReturnedwithStatus0

run_program:\\\& quot; /sbin/SCSI_id\\\& quot;

run_program:\\\& quot; /sbin/SCSI_id\\& quot; ( ( stdout ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) )

run_program:\\& quot; /sbin/SCSI_id\\& quot; ReturnedwithStatus0

run_program:\\\& quot; /sbin/SCSI_id\\\& quot;

run_program:\\\& quot; /sbin/SCSI_id\\& quot; ( ( stdout ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) )

run_program:\\& quot; /sbin/SCSI_id\\& quot; ReturnedwithStatus0

run_program:\\\& quot; /sbin/SCSI_id\\\& quot;

run_program:\\\& quot; /sbin/SCSI_id\\& quot; ( ( stdout ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) )

run_program:\\& quot; /sbin/SCSI_id\\& quot; ReturnedwithStatus0

run_program:\\\& quot; /sbin/SCSI_id\\\& quot;

run_program:\\\& quot; /sbin/SCSI_id\\& quot; ( ( stdout ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) )

run_program:\\& quot; /sbin/SCSI_id\\& quot; ReturnedwithStatus0

udev _ rules _ get _ name:rule applied,\\\& quot; SDB1\\& quot; becomes\\& quot; ASM_disk_1g_1__ ) ) ) ) ) ASM_disk_1g_1__ ) ) ) 652 )

run_program:\\\& quot; /sbin/SCSI_id\\\& quot;

run_program:\\\& quot; /sbin/SCSI_id\\& quot; ( ( stdout ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) )

run_program:\\& quot; /sbin/SCSI_id\\& quot; ReturnedwithStatus0

run_program:\\\& quot; /sbin/SCSI_id\\\& quot;

run_program:\\\& quot; /sbin/SCSI_id\\& quot; ( ( stdout ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) )

run_program:\\& quot; /sbin/SCSI_id\\& quot; ReturnedwithStatus0

run_program:\\\& quot; /sbin/SCSI_id\\\& quot;

run_program:\\\& quot; /sbin/SCSI_id\\& quot; ( ( stdout ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) ) ) 36000 c 2968513 d 97 EB 7cd 25 bdbd 10600 ( ( ) ) ) )

run_program:\\& quot; /sbin/SCSI_id\\& quot; ReturnedwithStatus0

udev_device_event:device\\\& quot; /block/sdb/SDB1\\& quot; alreadyindatabase,validatecurrentlypresentsymlining

udev _ node _ add:creatingdevicenode\\\& amp; quot; /dev/ASM_disk_1g_1\\_,major=____8\_

udev _ node _ add:creating symlink\\ & amp; quot;/dev/disk/by-id/SCSI-36000 c 2968513 d 97 EB 7cd 25 bdbd 10600-part1\

udev _ node _ add:creating symlink\\ & amp; quot;/dev/disk/by-path/PCI-0000:00:10.0-SCSI-0:0:1:0-path

main:run:\\& quot; socket:/org/kernel/udev/monitor\& amp; quot;

main:run:\\\& quot; /lib/udev/udev_run_devd\\\& quot;

main:run:\\& quot; socket:/org/free desktop/Hal/udev _ event\& amp; quot;

main:run:\\& quot;/sbin/PAM _ console _ apply/dev/ASM _ disk _ 1g _1/dev/disk/by-id/SCSI-36000 c

main:run:\\\& quot; /bin/sh-c\\\& quot; echo 180/sys/block/sdb/SD B1/time out _ _ _ & amp; quot;

[ root @ ora 32~] # udevtest/block/SDG/SD G1

main:lookingatdevice\\\& quot; /block/SDG/SDG1\\\& quot; 来自subsystem\& amp; quot; block\\& quot;

udev _ rules _ get _ name:add symlink\\ & amp; quot; disk/by-id/SCSI-36000 c 29682 b a5 EC 7a4c8a 189499 a 89 B- part1\

udev _ rules _ get _ name:add symlink\& amp; quot; disk/by-path/PCI-0000:00:10.0-SCSI-0:0:6:0 -部件1

run_program:\\& quot;/lib/udev/vol _ idexport/dev/. tmp-8-97\\ & amp; quot;

run_program:\\\& quot; /lib/udev/vol_id\\& quot; ReturnedwithStatus4

run_program:\\\& quot; /sbin/SCSI_id\\\& quot;

run_program:\\\& quot; /sbin/SCSI_id\\& quot; ( ( stdout ) ) ) ) ) 36000 c 29682 b a5 EC 7a4c8a 189499 a 89 bb ) () ) ) ) 36000 c 29682 b a5 EC 7a4c8a 189499 a 89 bb ) ) ) )

run_program:\\& quot; /sbin/SCSI_id\\& quot; ReturnedwithStatus0

run_program:\\\& quot; /sbin/SCSI_id\\\& quot;

run_program:\\\& quot; /sbin/SCSI_id\\& quot; ( ( stdout ) ) ) ) ) 36000 c 29682 b a5 EC 7a4c8a 189499 a 89 bb ) () ) ) ) 36000 c 29682 b a5 EC 7a4c8a 189499 a 89 bb ) ) ) )

run_program:\\& quot; /sbin/SCSI_id\\& quot; ReturnedwithStatus0

run_program:\\\& quot; /sbin/SCSI_id\\\& quot;

run_program:\\\& quot; /sbin/SCSI_id\\& quot; ( ( stdout ) ) ) ) ) 36000 c 29682 b a5 EC 7a4c8a 189499 a 89 bb ) () ) ) ) 36000 c 29682 b a5 EC 7a4c8a 189499 a 89 bb ) ) ) )

run_program:\\& quot; /sbin/SCSI_id\\& quot; ReturnedwithStatus0

run_progr

am: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c29682ba5ec7a4c8a189499a89bb\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c29682ba5ec7a4c8a189499a89bb\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c29682ba5ec7a4c8a189499a89bb\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

udev_rules_get_name: rule applied, \\\’sdg1\\\’ becomes \\\’ASM_DISK_1G_2\\\’

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c29682ba5ec7a4c8a189499a89bb\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c29682ba5ec7a4c8a189499a89bb\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

udev_device_event: device \\\’/block/sdg/sdg1\\\’ already in database, validate currently present symlinks

udev_node_add: creating device node \\\’/dev/ASM_DISK_1G_2\\\’, major = \\\’8\\\’, minor = \\\’97\\\’, mode = \\\’0660\\\’, uid = \\\’503\\\’, gid = \\\’504\\\’

udev_node_add: creating symlink \\\’/dev/disk/by-id/scsi-36000c29682ba5ec7a4c8a189499a89bb-part1\\\’ to \\\’../../ASM_DISK_1G_2\\\’

udev_node_add: creating symlink \\\’/dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:6:0-part1\\\’ to \\\’../../ASM_DISK_1G_2\\\’

main: run: \\\’socket:/org/kernel/udev/monitor\\\’

main: run: \\\’/lib/udev/udev_run_devd\\\’

main: run: \\\’socket:/org/freedesktop/hal/udev_event\\\’

main: run: \\\’/sbin/pam_console_apply /dev/ASM_DISK_1G_2 /dev/disk/by-id/scsi-36000c29682ba5ec7a4c8a189499a89bb-part1 /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:6:0-part1\\\’

main: run: \\\’/bin/sh -c \\\’echo 180 >/sys/block/sdg/sdg1/timeout\\\’\\\’

 

 

 

[root@ora32 ~]# udevtest /block/sdh/sdh2

main: looking at device \\\’/block/sdh/sdh2\\\’ from subsystem \\\’block\\\’

udev_rules_get_name: add symlink \\\’disk/by-id/scsi-36000c292aa4a4ebbb25d15d2084c01ca-part1\\\’

udev_rules_get_name: add symlink \\\’disk/by-path/pci-0000:00:10.0-scsi-0:0:8:0-part1\\\’

run_program: \\\’/lib/udev/vol_id –export /dev/.tmp-8-113\\\’

run_program: \\\’/lib/udev/vol_id\\\’ returned with status 4

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c292aa4a4ebbb25d15d2084c01ca\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c292aa4a4ebbb25d15d2084c01ca\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c292aa4a4ebbb25d15d2084c01ca\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c292aa4a4ebbb25d15d2084c01ca\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c292aa4a4ebbb25d15d2084c01ca\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c292aa4a4ebbb25d15d2084c01ca\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c292aa4a4ebbb25d15d2084c01ca\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

udev_rules_get_name: rule applied, \\\’sdh2\\\’ becomes \\\’ASM_DISK_1G_3\\\’

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c292aa4a4ebbb25d15d2084c01ca\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

udev_device_event: device \\\’/block/sdh/sdh2\\\’ already in database, validate currently present symlinks

udev_node_add: creating device node \\\’/dev/ASM_DISK_1G_3\\\’, major = \\\’8\\\’, minor = \\\’113\\\’, mode = \\\’0660\\\’, uid = \\\’503\\\’, gid = \\\’504\\\’

udev_node_add: creating symlink \\\’/dev/disk/by-id/scsi-36000c292aa4a4ebbb25d15d2084c01ca-part1\\\’ to \\\’../../ASM_DISK_1G_3\\\’

udev_node_add: creating symlink \\\’/dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:8:0-part1\\\’ to \\\’../../ASM_DISK_1G_3\\\’

main: run: \\\’socket:/org/kernel/udev/monitor\\\’

main: run: \\\’/lib/udev/udev_run_devd\\\’

main: run: \\\’socket:/org/freedesktop/hal/udev_event\\\’

main: run: \\\’/sbin/pam_console_apply /dev/ASM_DISK_1G_3 /dev/disk/by-id/scsi-36000c292aa4a4ebbb25d15d2084c01ca-part1 /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:8:0-part1\\\’

main: run: \\\’/bin/sh -c \\\’echo 180 >/sys/block/sdh/sdh2/timeout\\\’\\\’

[root@ora32 ~]# udevtest /block/sdi/sdi1

main: looking at device \\\’/block/sdi/sdi1\\\’ from subsystem \\\’block\\\’

udev_rules_get_name: add symlink \\\’disk/by-id/scsi-36000c29a98ca1bd8a0012e99f992a19d-part1\\\’

udev_rules_get_name: add symlink \\\’disk/by-path/pci-0000:00:10.0-scsi-0:0:9:0-part1\\\’

run_program: \\\’/lib/udev/vol_id –export /dev/.tmp-8-129\\\’

run_program: \\\’/lib/udev/vol_id\\\’ returned with status 4

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c29a98ca1bd8a0012e99f992a19d\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c29a98ca1bd8a0012e99f992a19d\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c29a98ca1bd8a0012e99f992a19d\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c29a98ca1bd8a0012e99f992a19d\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c29a98ca1bd8a0012e99f992a19d\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c29a98ca1bd8a0012e99f992a19d\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c29a98ca1bd8a0012e99f992a19d\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

run_program: \\\’/sbin/scsi_id\\\’

run_program: \\\’/sbin/scsi_id\\\’ (stdout) \\\’36000c29a98ca1bd8a0012e99f992a19d\\\’

run_program: \\\’/sbin/scsi_id\\\’ returned with status 0

udev_rules_get_name: rule applied, \\\’sdi1\\\’ becomes \\\’ASM_DISK_1G_4\\\’

udev_device_event: device \\\’/block/sdi/sdi1\\\’ already in database, validate currently present symlinks

udev_node_add: creating device node \\\’/dev/ASM_DISK_1G_4\\\’, major = \\\’8\\\’, minor = \\\’129\\\’, mode = \\\’0660\\\’, uid = \\\’503\\\’, gid = \\\’504\\\’

udev_node_add: creating symlink \\\’/dev/disk/by-id/scsi-36000c29a98ca1bd8a0012e99f992a19d-part1\\\’ to \\\’../../ASM_DISK_1G_4\\\’

udev_node_add: creating symlink \\\’/dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:9:0-part1\\\’ to \\\’../../ASM_DISK_1G_4\\\’

main: run: \\\’socket:/org/kernel/udev/monitor\\\’

main: run: \\\’/lib/udev/udev_run_devd\\\’

main: run: \\\’socket:/org/freedesktop/hal/udev_event\\\’

main: run: \\\’/sbin/pam_console_apply /dev/ASM_DISK_1G_4 /dev/disk/by-id/scsi-36000c29a98ca1bd8a0012e99f992a19d-part1 /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:9:0-part1\\\’

main: run: \\\’/bin/sh -c \\\’echo 180 >/sys/block/sdi/sdi1/timeout\\\’\\\’

 

 

重新启动udev服务

[root@ora32 ~]# /sbin/udevcontrol reload_rules

[root@ora32 ~]# /sbin/start_udev

Starting udev: [  OK  ]

 

查看一下新映射的磁盘

[root@ora32 ~]# ll /dev/ASM*

brw-rw—- 1 grid asmadmin 8,  17 May 13 15:40 /dev/ASM_DISK_1G_1

brw-rw—- 1 grid asmadmin 8,  97 May 13 15:40 /dev/ASM_DISK_1G_2

brw-rw—- 1 grid asmadmin 8, 113 May 13 15:40 /dev/ASM_DISK_1G_3

brw-rw—- 1 grid asmadmin 8, 129 May 13 15:40 /dev/ASM_DISK_1G_4

brw-rw—- 1 grid asmadmin 8,  33 May 13 15:43 /dev/ASM_DISK_2G_1

brw-rw—- 1 grid asmadmin 8,  49 May 13 15:43 /dev/ASM_DISK_2G_2

brw-rw—- 1 grid asmadmin 8,  65 May 13 15:42 /dev/ASM_DISK_2G_3

brw-rw—- 1 grid asmadmin 8,  81 May 13 15:43 /dev/ASM_DISK_2G_4

 

通过Oracle视图查看一下ASM磁盘情况

[grid@ora32 ~]$ sqlplus / as sysasm

 

SQL*Plus: Release 11.2.0.1.0 Production on Mon May 13 15:42:05 2013

 

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production

With the Automatic Storage Management option

 

SQL>

SQL> col group# for 99

SQL> col disk# for 99

SQL> col name for a5

SQL> col path for a11

SQL> col LABEL for a7

SQL> col FAILGROUP for a10

SQL> select GROUP_NUMBER group#,DISK_NUMBER disk#,LABEL,STATE,FAILGROUP,name,path,TOTAL_MB,FREE_MB from v$asm_disk;

 

GROUP# DISK# LABEL   STATE    FAILGROUP  NAME  PATH          TOTAL_MB    FREE_MB

—— —– ——- ——– ———- —– ———– ———- ———-

     0     0         NORMAL                    /dev/ASM_DI          0          0

                                               SK_1G_3

 

     0     1         NORMAL                    /dev/ASM_DI          0          0

                                               SK_1G_2

 

     0     2         NORMAL                    /dev/ASM_DI          0          0

                                               SK_1G_1

 

     0     3         NORMAL                    /dev/ASM_DI          0          0

                                               SK_1G_4

 

GROUP# DISK# LABEL   STATE    FAILGROUP  NAME  PATH          TOTAL_MB    FREE_MB

—— —– ——- ——– ———- —– ———– ———- ———-

 

     1     2         NORMAL   DG_DATA_00 DG_DA /dev/ASM_DI       2047       1612

                              02         TA_00 SK_2G_3

                                         02

 

     1     3         NORMAL   DG_DATA_00 DG_DA /dev/ASM_DI       2047       1611

                              03         TA_00 SK_2G_4

                                         03

 

     1     1         NORMAL   DG_DATA_00 DG_DA /dev/ASM_DI       2047       1613

                              01         TA_00 SK_2G_2

 

GROUP# DISK# LABEL   STATE    FAILGROUP  NAME  PATH          TOTAL_MB    FREE_MB

—— —– ——- ——– ———- —– ———– ———- ———-

                                         01

 

     1     0         NORMAL   DG_DATA_00 DG_DA /dev/ASM_DI       2047       1612

                              00         TA_00 SK_2G_1

                                         00

 

 

8 rows selected.

此时发现新添加的4块硬盘,已经可以通过视图进行查询,但是FAILGROUP、NAME等属性为空,因为磁盘还没有加到ASM磁盘组。ASM是怎么认到新增加的磁盘?其实它是根据参数文件中的属性asm_diskstring自动扫描到的,这个参数是在安装GRID同时配置ASM时设置的。

SQL> show parameter ASM

 

NAME                                 TYPE        VALUE

———————————— ———– ——————————

asm_diskgroups                       string

asm_diskstring                       string      /dev/ASM*

asm_power_limit                      integer     1

asm_preferred_read_failure_groups    string

 

 

 

将磁盘ASM_DISK_1G_1、ASM_DISK_1G_2添加到磁盘组DG_DATA中。

SQL> ALTER DISKGROUP DG_DATA ADD disk \\\’/dev/ASM_DISK_1G_1\\\’;

 

Diskgroup altered.

 

SQL> ALTER DISKGROUP DG_DATA ADD disk \\\’/dev/ASM_DISK_1G_2\\\’;

 

Diskgroup altered.

 

新建磁盘组DG_NEW_DATA,将ASM_DISK_1G_3、ASM_DISK_1G_4添加到磁盘组中。

SQL> CREATE DISKGROUP DG_NEW_DATA external REDUNDANCY DISK \\\’/dev/ASM_DISK_1G_3\\\’,\\\’/dev/ASM_DISK_1G_4\\\’;

 

Diskgroup created.

 

通过Oracle 视图查看一下新增ASM磁盘组、ASM磁盘的情况

SQL> col name for a10

SQL> SELECT group_number,name,type,state,total_mb,free_mb,offline_disks FROM V$ASM_diskgroup;

 

GROUP_NUMBER NAME       TYPE   STATE         TOTAL_MB    FREE_MB OFFLINE_DISKS

———— ———- —— ———– ———- ———- ————-

           1 DG_DATA    EXTERN MOUNTED          10226       8482             0

           2 DG_NEW_DAT EXTERN MOUNTED           2038       1986             0

             A

 

SQL> select GROUP_NUMBER group#,DISK_NUMBER disk#,LABEL,STATE,FAILGROUP,name,path,TOTAL_MB,FREE_MB from v$asm_disk;

 

    GROUP# DISK# LABEL   STATE    FAILGROUP  NAME  PATH          TOTAL_MB

———- —– ——- ——– ———- —– ———– ———-

   FREE_MB

———-

         1     2         NORMAL   DG_DATA_00 DG_DA /dev/ASM_DI       2047

                                  02         TA_00 SK_2G_3

                                             02

      1697

 

         1     3         NORMAL   DG_DATA_00 DG_DA /dev/ASM_DI       2047

                                  03         TA_00 SK_2G_4

                                             03

      1697

 

    GROUP# DISK# LABEL   STATE    FAILGROUP  NAME  PATH          TOTAL_MB

———- —– ——- ——– ———- —– ———– ———-

   FREE_MB

———-

 

         1     1         NORMAL   DG_DATA_00 DG_DA /dev/ASM_DI       2047

                                  01         TA_00 SK_2G_2

                                             01

      1699

 

         1     0         NORMAL   DG_DATA_00 DG_DA /dev/ASM_DI       2047

                                  00         TA_00 SK_2G_1

                                             00

 

    GROUP# DISK# LABEL   STATE    FAILGROUP  NAME  PATH          TOTAL_MB

———- —– ——- ——– ———- —– ———– ———-

   FREE_MB

———-

      1697

 

         2     0         NORMAL   DG_NEW_DAT DG_NE /dev/ASM_DI       1019

                                  A_0000     W_DAT SK_1G_3

                                             A_000

                                             0

       994

 

         1     5         NORMAL   DG_DATA_00 DG_DA /dev/ASM_DI       1019

 

    GROUP# DISK# LABEL   STATE    FAILGROUP  NAME  PATH          TOTAL_MB

———- —– ——- ——– ———- —– ———– ———-

   FREE_MB

———-

                                  05         TA_00 SK_1G_2

                                             05

       846

 

         1     4         NORMAL   DG_DATA_00 DG_DA /dev/ASM_DI       1019

                                  04         TA_00 SK_1G_1

                                             04

       846

 

 

    GROUP# DISK# LABEL   STATE    FAILGROUP  NAME  PATH          TOTAL_MB

———- —– ——- ——– ———- —– ———– ———-

   FREE_MB

———-

         2     1         NORMAL   DG_NEW_DAT DG_NE /dev/ASM_DI       1019

                                  A_0001     W_DAT SK_1G_4

                                             A_000

                                             1

       992

 

 

8 rows selected.

 

 

根据实验要求4块硬盘添加完毕,接下来将硬盘ASM_DISK_1G_1、ASM_DISK_1G_2从ASM磁盘组DG_DATA中删除,然后将udev映射规则删除。

SQL> ALTER DISKGROUP DG_DATA DROP DISK DG_DATA_0004;

 

Diskgroup altered.

 

SQL> ALTER DISKGROUP DG_DATA DROP DISK DG_DATA_0005;

 

Diskgroup altered.

 

 

 

 

SQL> col group# for 99

SQL> col disk# for 99

SQL> col name for a5

SQL> col path for a11

SQL> col LABEL for a7

SQL> col FAILGROUP for a10

SQL> select GROUP_NUMBER group#,DISK_NUMBER disk#,LABEL,STATE,FAILGROUP,name,path,TOTAL_MB,FREE_MB from v$asm_disk;

 

GROUP# DISK# LABEL   STATE    FAILGROUP  NAME  PATH          TOTAL_MB    FREE_MB

—— —– ——- ——– ———- —– ———– ———- ———-

     0     0         NORMAL                    /dev/ASM_DI          0          0

                                               SK_1G_2

 

     0     1         NORMAL                    /dev/ASM_DI          0          0

                                               SK_1G_1

 

     1     2         NORMAL   DG_DATA_00 DG_DA /dev/ASM_DI       2047       1612

                              02         TA_00 SK_2G_3

                                         02

 

     1     3         NORMAL   DG_DATA_00 DG_DA /dev/ASM_DI       2047       1611

 

GROUP# DISK# LABEL   STATE    FAILGROUP  NAME  PATH          TOTAL_MB    FREE_MB

—— —– ——- ——– ———- —– ———– ———- ———-

                              03         TA_00 SK_2G_4

                                         03

 

     1     1         NORMAL   DG_DATA_00 DG_DA /dev/ASM_DI       2047       1614

                              01         TA_00 SK_2G_2

                                         01

 

     1     0         NORMAL   DG_DATA_00 DG_DA /dev/ASM_DI       2047       1611

                              00         TA_00 SK_2G_1

                                         00

 

 

GROUP# DISK# LABEL   STATE    FAILGROUP  NAME  PATH          TOTAL_MB    FREE_MB

—— —– ——- ——– ———- —– ———– ———- ———-

     2     0         NORMAL   DG_NEW_DAT DG_NE /dev/ASM_DI       1019        994

                              A_0000     W_DAT SK_1G_3

                                         A_000

                                         0

 

     2     1         NORMAL   DG_NEW_DAT DG_NE /dev/ASM_DI       1019        992

                              A_0001     W_DAT SK_1G_4

                                         A_000

                                         1

 

 

8 rows selected.

 

 

 

[root@ora32 ~]# vi /etc/udev/rules.d/99-oracle-asmdevices.rules

 

KERNEL==sd?1, BUS==scsi, PROGRAM==/sbin/scsi_id,

RESULT==36000c29c9a269653c7cd04ea2edb0c71, NAME=ASM_DISK_2G_1, WNER=grid, GROUP=asmadmin, MODE=0660

 

KERNEL==sd?1, BUS==scsi, PROGRAM==/sbin/scsi_id,

RESULT==36000c29861258ebc95eded634a1f36fd, NAME=ASM_DISK_2G_2, WNER=grid, GROUP=asmadmin, MODE=0660

 

KERNEL==sd?1, BUS==scsi, PROGRAM==/sbin/scsi_id,

RESULT==36000c296fd09d9ed213df1999820ca89, NAME=ASM_DISK_2G_3, WNER=grid, GROUP=asmadmin, MODE=0660

 

KERNEL==sd?1, BUS==scsi, PROGRAM==/sbin/scsi_id,

RESULT==36000c2934ae12fd4af0dd366d85b42f5,  NAME=ASM_DISK_2G_4, WNER=grid, GROUP=asmadmin, MODE=0660

 

#KERNEL==sd?1, BUS==scsi, PROGRAM==/sbin/scsi_id,

#RESULT==36000c2968513d97eb7cdd25bdbd10600,  NAME=ASM_DISK_1G_1, WNER=grid, GROUP=asmadmin, MODE=0660

 

#KERNEL==sd?1, BUS==scsi, PROGRAM==/sbin/scsi_id,

#RESULT==36000c29682ba5ec7a4c8a189499a89bb,  NAME=ASM_DISK_1G_2, WNER=grid, GROUP=asmadmin, MODE=0660

 

KERNEL==sd?1, BUS==scsi, PROGRAM==/sbin/scsi_id,

RESULT==36000c292aa4a4ebbb25d15d2084c01ca,  NAME=ASM_DISK_1G_3, WNER=grid, GROUP=asmadmin, MODE=0660

 

KERNEL==sd?1, BUS==scsi, PROGRAM==/sbin/scsi_id,

RESULT==36000c29a98ca1bd8a0012e99f992a19d,  NAME=ASM_DISK_1G_4, WNER=grid, GROUP=asmadmin, MODE=0660

 

重新启动udev

[root@ora32 dev]# /sbin/udevcontrol reload_rules

[root@ora32 dev]# /sbin/start_udev

Starting udev: [  OK  ]

 

查看一下dev下的设备,发现仍然存在/dev/ASM_DISK_1G_1,/dev/ASM_DISK_1G_2

[root@ora32 dev]# ll /dev/ASM*

brw-rw—- 1 grid asmadmin 8,  17 May 13 16:15 /dev/ASM_DISK_1G_1

brw-rw—- 1 grid asmadmin 8,  97 May 13 16:15 /dev/ASM_DISK_1G_2

brw-rw—- 1 grid asmadmin 8, 113 May 13 16:38 /dev/ASM_DISK_1G_3

brw-rw—- 1 grid asmadmin 8, 129 May 13 16:37 /dev/ASM_DISK_1G_4

brw-rw—- 1 grid asmadmin 8,  33 May 13 16:38 /dev/ASM_DISK_2G_1

brw-rw—- 1 grid asmadmin 8,  49 May 13 16:38 /dev/ASM_DISK_2G_2

brw-rw—- 1 grid asmadmin 8,  65 May 13 16:38 /dev/ASM_DISK_2G_3

brw-rw—- 1 grid asmadmin 8,  81 May 13 16:37 /dev/ASM_DISK_2G_4

 

不知道是何原因。将数据库实例和ASM实例都停掉后,重新启动udev服务后发现dev下仍然存在/dev/ASM_DISK_1G_1,/dev/ASM_DISK_1G_2,通过udevinfo查询发现已经在udev不存在记录。

 

[root@ora32 dev]# udevinfo -q path -n /dev/ASM_DISK_1G_1

no record for \\\’ASM_DISK_1G_1\\\’ in database

[root@ora32 dev]# udevinfo -q path -n /dev/ASM_DISK_1G_2

no record for \\\’ASM_DISK_1G_2\\\’ in database

[root@ora32 dev]#

[root@ora32 dev]# udevinfo -q path -n /dev/ASM_DISK_1G_3

/block/sdh/sdh2

 

 

在网上查阅了资料,并未找到解决/dev/ASM_DISK_1G_1,/dev/ASM_DISK_1G_2为什么仍然存在的原因,继续跟踪这个问题。

更多关于云服务器,域名注册,虚拟主机的问题,请访问西部数码官网:www.chenqinet.cn

相关推荐

后台-系统设置-扩展变量-手机广告位-内容页底部广告位3