天天看點

Solaris檢視磁盤小知識 ORA-15025 ORA-27041 文檔 ID 1300393.1

本文參考MOS 

ASM is not Discovering Disks on Solaris: ORA-15025 ORA-27041 SVR4 Error: 5: I/O error. (文檔 ID 1300393.1)

在Solaris上有一塊新磁盤,既無法添加到現有的磁盤組,也不能用這塊磁盤建立新的磁盤組,報錯如下:

SQL> create diskgroup testdg external redundancy disk '/dev/rdsk/c4t60060480000190103592533031453837d0s2';

create diskgroup testdg external redundancy disk '/dev/rdsk/c4t60060480000190103592533031453837d0s2'
*
ERROR at line 1:
ORA-15018: diskgroup cannot be created
ORA-15031: disk specification '/dev/rdsk/c4t60060480000190103592533031453837d0s2' matches no disks
ORA-15025: could not open disk '/dev/rdsk/c4t60060480000190103592533031453837d0s2'
ORA-27041: unable to open file
SVR4 Error: 5: I/O error
Additional information: 42
Additional information: 0
Additional information: 103997248
           

磁盤的所有者和權限均正确

SQL> !ls -l /dev/rdsk/c4t60060480000190103592533031453837d0s2

lrwxrwxrwx 1 root root 67 Feb 22 20:53 /dev/rdsk/c4t60060480000190103592533031453837d0s2 -> 
../../devices/scsi_vhci/[email protected]:c,raw


SQL> ! ls -l /devices/scsi_vhci/[email protected]:c,raw

crw-rw---- 1 oracle dba 118, 338 Mar 2 09:48 /devices/scsi_vhci/[email protected]:c,raw
           

而且,也可以在ASM中檢視到這塊磁盤

SQL> show parameter asm

NAME TYPE VALUE 
---------------- ----------- ------------------------------
asm_diskgroups   string      LOANIQ_REDO01DG01, LOANIQ_REDO02DG01, LOANIQ_ARCHDG01, LOANIQ_DATADG01
asm_diskstring   string      /dev/rdsk/*
asm_power_limit  integer     1

SQL> select path from v$asm_disk;

PATH
--------------------------------------------------------------------------------
/dev/rdsk/c4t60060480000190103592533031453837d0s2
           

而且這塊磁盤可以在OS層面用dd指令進行通路:

SQL> !dd if=/dev/rdsk/c4t60060480000190103592533031453837d0s2 of=/dev/null count=100 bs=8192 
100+0 records in
100+0 records out
           

使用format指令,确定了"/dev/rdsk/c4t60060480000190103592533031453837d0s2" raw device/partitions(分區)不是一個有效的分區,因為它引用的“backup”分區(#2 below),其中包含作業系統分區的卷标(VTOC)作業系統的中繼資料在cylinder # 0

# format
Searching for disks...done

c4t60060480000190103592533031453837d0: configured with capacity of 68.24GB

AVAILABLE DISK SELECTIONS:
0. c2t50060482D5300A28d0 <EMC-SYMMETRIX-5772 cyl 1 alt 2 hd 15 sec 128> /[email protected],700000/[email protected]/[email protected],0/[email protected],0
1. c3t50060482D5300A07d0 <EMC-SYMMETRIX-5772 cyl 1 alt 2 hd 15 sec 128> /[email protected],600000/[email protected]/[email protected],0/[email protected],0
2. c4t20000014C3739DB2d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /scsi_vhci/[email protected]
3. c4t20000014C3739FBCd0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /scsi_vhci/[email protected]
4. c4t60060480000190103592533030463238d0 <EMC-SYMMETRIX-5772 cyl 37270 alt 2 hd 30 sec 128>
.
.
.
.
.
23. c4t60060480000190103592533031453837d0 <EMC-SYMMETRIX-5772 cyl 37270 alt 2 hd 30 sec 128> /scsi_vhci/[email protected]


Specify disk (enter its number): 23
selecting c4t60060480000190103592533031453837d0


[disk formatted]
Disk not labeled. Label it now? yes


FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit


format> p

PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
!<cmd> - execute <cmd>, then return
quit


partition> p

Current partition table (original):
Total disk cylinders available: 37270 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 68 129.38MB (69/0/0) 264960
1 swap wu 69 - 137 129.38MB (69/0/0) 264960
2 backup wu 0 - 37269 68.24GB (37270/0/0) 143116800 <(== Incorrect
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 138 - 37269 67.99GB (37132/0/0) 142586880
7 unassigned wm 0 0 (0/0/0) 0

partition> q
           

使用正确的分區,(e.g. #6) ==)> “/dev/rdsk/c4t60060480000190103592533031453837d0s6”

# chown oracle:dba /dev/rdsk/c4t60060480000190103592533031453837d0s6 

# chmod g+w /dev/rdsk/c4t60060480000190103592533031453837d0s6 

SQL> !dd if=/dev/rdsk/c4t60060480000190103592533031453837d0s2 of=/dev/null count=100 bs=8192
100+0 records in
100+0 records out

SQL> create diskgroup testdg external redundancy disk '/dev/rdsk/c4t60060480000190103592533031453837d0s6';

Diskgroup created.