ASMFD的一个bug?
Cannot resize ASM Disk using ASM Filter Driver(AFD) online (文档 ID 2099164.1)
In this Document
APPLIES TO:
Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Information in this document applies to any platform.
SYMPTOMS
User is using AFD. After resizing LUN, ASM Filter Driver don't see extended size (visible in operating system).
After ASM instance restart, there is no change in size of diskgroup. (in v$asm_disk old value for os_mb). Restarting of HAS services was done (csrtctl stop has/crsctl start has), this did not solve the problem. User was able to resize ASM only after host restart.
[783602.921799] sd 1:0:2:0: [sdc] 37748736 512-byte logical blocks: (19.3 GB/18.0 GiB)
[783602.921922] sdc: detected capacity change from 16106127360 to 19327352832 <<<<<<<<<<<<<<<<<<
[783605.115904] blk_update_request: I/O error, dev fd0, sector 0
[root@oralab123 oracleafd!admin]# fdisk -l /dev/sdc
Disk /dev/sdc: 19.3 GB, 19327352832 bytes, 37748736 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
v$asm_disk -> OS_MB also reflects the old size only:
SQL> alter diskgroup FRA resize disk ASM_FRA;
Diskgroup altered.
SQL> select disk_number, state, os_mb, total_mb, free_mb, name from v$asm_disk;
DISK_NUMBER STATE OS_MB TOTAL_MB FREE_MB NAME
----------- -------- ---------- ---------- ----------------------------------------
0 NORMAL 15360 15360 13508 ASM_FRA <<<<<<<<<<
0 NORMAL 15360 15360 10352 ASM_RACZT
[asm@oralab123 ~]$ asmcmd
ASMCMD> lsdsk
Path
AFD:ASM_FRA
AFD:ASM_RACZT
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 15360 10352 0 10352 0 N ASMDG_RACZT/
MOUNTED EXTERN N 512 4096 1048576 15360 13509 0 13509 0 N FRA/ <<<<<<<<<<<<<
ASMCMD> afd_lsdsk
--------------------------------------------------------------------------------
Label Filtering Path
================================================================================
ASM_FRA ENABLED /dev/sdc
ASM_RACZT ENABLED /dev/sdd
ASMCMD> afd_scan
ASMCMD> exit
SQL> alter diskgroup FRA resize disk ASM_FRA 18g;
It gives following errors:
ORA-15032: not all alterations performed
ORA-15057: specified size of 18432 MB is larger than actual size of 15360 MB
KFED don't see correct size:
kfed_output.txt
===============
kfdhdb.secsize: 512 ; 0x0b8: 0x0200
kfdhdb.blksize: 4096 ; 0x0ba: 0x1000
kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000
kfdhdb.mfact: 113792 ; 0x0c0: 0x0001bc80
kfdhdb.dsksize: 15360 ; 0x0c4: 0x00003c00 <<<<<<
Kfod did not detected the change:
Output from kfod disks=all:
--------------------------------------------------------------------------------
Disk Size Path User Group
================================================================================
1: 512 Mb /dev/sda root disk
2: 511 Mb /dev/sda1 root disk
3: 153600 Mb /dev/sdb root disk
4: 18432 Mb /dev/sdc root disk
5: 15360 Mb /dev/sdd root disk
6: 15360 Mb AFD:ASM_FRA <<<<<<<<
7: 15360 Mb AFD:ASM_RACZT
--------------------------------------------------------------------------------
ORACLE_SID ORACLE_HOME
================================================================================
+ASM /oracle/app/asm/product/12.1.0.2/grid
CAUSE
The related fix will be part of the future release 12.2 and is not backportable to 12.1
SOLUTION
In 12.1.0.2, there are 3 workarounds.
- Rolling (node) restart
After they resize a physical device, they can do rolling restart
to reflect the new size on AFD device. They do not need to stop
entire Oracle cluster, and they do not need to offline an ASM disk.
- Stop CRS stack and unload/load AFD by rolling
A user needs to stop CRS, but they do not need to restart a node.
# All operations runs as root
crsctl stop crs
afdload stop
afdload start
asmcmd afd_scan
asmcmd afd_lsdsk
crsctl start crs
- Unlabel and label AFD device
After they resize a physical device, they can unlabel and label AFD device. The (Re-)labeled AFD device has the new size.
However, they need to offline the ASM disk before they unlabel the AFD device. And then, label AFD device again, and online the ASM disk.
They do not need to stop a node, but they need to offline ASM disk while they unlabel and label AFD devices. This means that data redundancy is reduced until the ASM disk is online back.
REFERENCES
如果上面的操作不行
需要卸载asmfd。然后重新配置asmfd
浙公网安备 33010602011771号