ORACLE LINUX 5.5 UDEV繫結asm磁碟問題

muxinqing發表於2014-05-23

 

[root@his1 ~]# fdisk -l

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         535     4192965   82  Linux swap / Solaris
/dev/sda3             536       19452   151950802+  83  Linux

Disk /dev/sdb: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        1305    10482381   83  Linux

Disk /dev/sdd: 429.4 GB, 429496729600 bytes
255 heads, 63 sectors/track, 52216 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1       52216   419424988+  83  Linux

Disk /dev/sde: 558.9 GB, 558907785216 bytes
255 heads, 63 sectors/track, 67950 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1       67950   545808343+  83  Linux
[root@his1 ~]# scsi_id -g -u -s /block/sdc1
[root@his1 ~]# scsi_id -g -u -s /block/sdd
36002219000b5f93c000017de4f663068
[root@his1 ~]# scsi_id -g -u -s /block/sdd1
[root@his1 ~]# scsi_id -g -u -s /block/sdd
36002219000b5f93c000017de4f663068
[root@his1 ~]# scsi_id -g -u -s /block/sdc
36002219000b5f946000017f74f663251
[root@his1 ~]# scsi_id -g -u -s /block/sde
36002219000b5f946000017fa4f66330f
[root@his1 ~]# vim  /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sdc1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="36002219000b5f946000017f74f663251", NAME="oracrs", OWNER="grid", GRO
UP="asmadmin", MODE="0660"  #10G
KERNEL=="sdd1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="36002219000b5f93c000017de4f663068", NAME="oradata", OWNER="grid", GRO
UP="asmadmin", MODE="0660" #400G
KERNEL=="sde1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="36002219000b5f946000017fa4f66330f", NAME="oraarch", OWNER="grid", GRO
UP="asmadmin", MODE="0660" #500G
~
~

~
[root@his1 ~]# vim /etc/scsi_id.config
#
# scsi_id configuration
#
# lower or upper case has no affect on the left side. Quotes (") are
# required for spaces in values. Model is the same as the SCSI
# INQUIRY product identification field. Per the SCSI INQUIRY, the vendor
# is limited to 8 bytes, model to 16 bytes.
#
# The first matching line found is used. Short matches match longer ones,
# if you do not want such a match space fill the extra bytes. If no model
# is specified, only the vendor string need match.
#
# options=
# vendor=string[,model=string],options=

# some libata drives require vpd page 0x80
vendor="ATA",options=-p 0x80
options=-g
~
~
~
~
~
"/etc/scsi_id.config" 18L, 677C written                      
[root@his1 ~]# udevcontrol  reload_rules
[root@his1 ~]# start_udev
Starting udev:                                             [  OK  ]
[root@his1 ~]# ls /dev/ora*
/dev/oraarch  /dev/oracrs  /dev/oradata

/dev/oracleasm:
disks  iid
[root@his1 ~]# cd /dev/
[root@his1 dev]# ls -la ora
oraarch    oracleasm/ oracrs     oradata   
[root@his1 dev]# ls -la ora*
brw-rw---- 1 grid disk 8, 65 May 23 12:04 oraarch
brw-rw---- 1 grid disk 8, 33 May 23 12:04 oracrs
brw-rw---- 1 grid disk 8, 49 May 23 12:04 oradata

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29065182/viewspace-1168222/,如需轉載,請註明出處,否則將追究法律責任。

相關文章