asm库diskgroup所属的磁盘号发生变化
http://blog.itpub.net/7199859/viewspace-629179/
参照官方文档说明:如果asm库diskgroup所属的磁盘发生变化,对数据库是没有任何影响的,库能正常打开,因为oracle
是会检查磁盘存放路径ASM_DISKSTRING 参数和磁盘头的,即磁盘头不破坏的话,则没有任何问题,以下为详细官方文档说明:
Disk DiscoveryWhen an ASM instance initializes, ASM discovers and examines the contents of all of the disks that are in the paths designated in the ASM_DISKSTRING initialization parameter. For purposes of this discussion, a "disk" is an ASM disk as defined in [url=file:///D:/10.2.0.2文档/server.102/b14231/storeman.htm#i1021951]"Overview of the Components of Automatic Storage Management"[/url]. Disk discovery also takes place when you:
- Run the ALTER DISKGROUP...ADD DISK and ALTER DISKGROUP...RESIZE DISK commands.
- Query the V$ASM_DISKGROUP and V$ASM_DISK views.
After a disk is successfully discovered, it appears in the V$ASM_DISK view. Disks that belong to a disk group—that is, that have a disk group name in the disk header—have a header status of MEMBER. Disks that were discovered but that have not yet been assigned to a disk group have a header status of either CANDIDATE or PROVISIONED.
When an ASM instance starts, it automatically discovers all available ASM disks. Discovery is the process of determining every disk device to which the ASM instance has been given I/O permissions (by some operating system mechanism), and of examining the contents of the first block of such disks to see if they are recognized as belonging to a disk group. ASM discovers disks in the paths that are listed in an initialization parameter, or if the parameter is NULL, in an operating system–dependent default path.
下面为测试验证过程:
p570b@root#mpio_get_config -Av
Frame. id 0:
Storage Subsystem worldwide name: 60ab8005112fe00004b6649ef
Controller count: 2
Partition count: 1
Partition 0:
Storage Subsystem Name = 'GDCDC_DS4700'
hdisk LUN # Ownership User Label
hdisk9 7 A (preferred) Array0_lun16_5G
hdisk10 8 A (preferred) Array1_lun20_5G
hdisk11 9 B (preferred) Array0_lun15_60G
hdisk12 10 A (preferred) Array0_lun0_200G
hdisk13 11 B (preferred) Array0_lun1_200G
hdisk14 12 A (preferred) Array0_lun2_200G
hdisk15 13 B (preferred) Array0_lun3_200G
hdisk16 14 A (preferred) Array0_lun4_200G
hdisk17 15 A (preferred) Array1_lun0_200G
hdisk18 16 B (preferred) Array1_lun1_200G
hdisk19 17 A (preferred) Array1_lun2_200G
hdisk20 18 B (preferred) Array1_lun3_200G
hdisk21 19 A (preferred) Array1_lun4_200G
lspv
hdisk9 none None
hdisk10 none None
hdisk11 none None
hdisk12 none None
hdisk13 none None
hdisk14 none None
hdisk15 none None
hdisk16 none None
hdisk17 none None
hdisk18 none None
hdisk19 none None
hdisk20 none None
hdisk21 none None
asm磁盘组dg_data1使用到的磁盘
SQL> select total_mb,path,name from v$asm_disk;
TOTAL_MB PATH NAME
---------- -------------------- --------------------
0 /dev/rhdisk15
0 /dev/rhdisk16
0 /dev/rhdisk19
0 /dev/rhdisk20
0 /dev/rhdisk21
5120 /dev/rhdisk10 CRS_0000
61440 /dev/rhdisk11 SYSDG_0000
204800 /dev/rhdisk12 DGRECOVER_0000
204800 /dev/rhdisk13 DG_DATA1_0000
204800 /dev/rhdisk14 DG_DATA1_0001
204800 /dev/rhdisk17 DG_DATA1_0002
204800 /dev/rhdisk18 DG_DATA1_0003
5120 /dev/rhdisk9 CRS_0001
可以看到DG_data1磁盘组用到的磁盘组编号为rhdisk13,rhdisk14,rhdisk17,rhdisk18,对应的lun号
hdisk13 11 B (preferred) Array0_lun1_200G
hdisk14 12 A (preferred) Array0_lun2_200G
hdisk17 15 A (preferred) Array1_lun0_200G
hdisk18 16 B (preferred) Array1_lun1_200G
停止p570a,p570b节点上的crs
crsctl stop crs
现在从p570a,p570b节点上删除
rmdev -dl hdisk15
rmdev -dl hdisk16
rmdev -dl hdisk17
rmdev -dl hdisk18
rmdev -dl hdisk19
rmdev -dl hdisk20
rmdev -dl hdisk21
存储上删除hdisk15,hdisk16两个lun,不让p570a,p570b节点认到
hdisk15 13 B (preferred) Array0_lun3_200G
hdisk16 14 A (preferred) Array0_lun4_200G
然后再p570a,p570b上重新cfgmgr -v
lspv
hdisk9 none None
hdisk10 none None
hdisk11 none None
hdisk12 none None
hdisk13 none None
hdisk14 none None
hdisk15 none None
hdisk16 none None
hdisk17 none None
hdisk18 none None
hdisk19 none None
p570b@root#mpio_get_config -Av
Frame. id 0:
Storage Subsystem worldwide name: 60ab8005112fe00004b6649ef
Controller count: 2
Partition count: 1
Partition 0:
Storage Subsystem Name = 'GDCDC_DS4700'
hdisk LUN # Ownership User Label
hdisk9 7 A (preferred) Array0_lun16_5G
hdisk10 8 A (preferred) Array1_lun20_5G
hdisk11 9 B (preferred) Array0_lun15_60G
hdisk12 10 A (preferred) Array0_lun0_200G
hdisk13 11 B (preferred) Array0_lun1_200G
hdisk14 12 A (preferred) Array0_lun2_200G
hdisk15 15 A (preferred) Array1_lun0_200G
hdisk16 16 B (preferred) Array1_lun1_200G
hdisk17 17 A (preferred) Array1_lun2_200G
hdisk18 18 B (preferred) Array1_lun3_200G
hdisk19 19 A (preferred) Array1_lun4_200G
可以看到hdisk15,hdisk16,就是原来hdisk17,hdisk18所对应的lun号
重新赋予权限
chown grid:asmadmin /dev/rhdisk15
chown grid:asmadmin /dev/rhdisk16
chown grid:asmadmin /dev/rhdisk17
chown grid:asmadmin /dev/rhdisk18
chown grid:asmadmin /dev/rhdisk19
chmod 660 /dev/rhdisk15
chmod 660 /dev/rhdisk16
chmod 660 /dev/rhdisk17
chmod 660 /dev/rhdisk18
chmod 660 /dev/rhdisk19
/usr/sbin/chdev -l hdisk15 -a reserve_policy=no_reserve
/usr/sbin/chdev -l hdisk16 -a reserve_policy=no_reserve
/usr/sbin/chdev -l hdisk17 -a reserve_policy=no_reserve
/usr/sbin/chdev -l hdisk18 -a reserve_policy=no_reserve
/usr/sbin/chdev -l hdisk19 -a reserve_policy=no_reserve
然后两个节点启动crs
可以看到dg_data1 online,并且数据库已经打开
[grid@p570b:/grid/app]$r
crsctl status resource -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRS.dg
ONLINE ONLINE p570b
ora.DGRECOVER.dg
ONLINE ONLINE p570b
ora.DG_DATA1.dg
ONLINE ONLINE p570b
ora.gdcdc.db
1 ONLINE ONLINE p570a open
2 ONLINE ONLINE p570b open
这时查询v$asm_disk
SQL> select path,name from v$asm_disk;
PATH NAME
-------------------- --------------------
/dev/rhdisk17
/dev/rhdisk18
/dev/rhdisk19
/dev/rhdisk10 CRS_0000
/dev/rhdisk11 SYSDG_0000
/dev/rhdisk12 DGRECOVER_0000
/dev/rhdisk13 DG_DATA1_0000
/dev/rhdisk14 DG_DATA1_0001
/dev/rhdisk15 DG_DATA1_0002
/dev/rhdisk16 DG_DATA1_0003
/dev/rhdisk9 CRS_0001
可以看出hdisk磁盘发生变化
原文地址:https://blog.csdn.net/jycjyc/article/details/143775061
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!