
SQL> alter system set “_optimizer_extended_cursor_sharing”=none scope=spfile;
alter system set “_optimizer_extended_cursor_sharing”=none scope=spfile
*
ERROR at line 1:
ORA-17507: I/O request size 512 is not a multiple of logical block size

在告警日志中存在如下信息:
ORA-19583: 交谈因错误而终止
ORA-17507: I/O 请求大小 512 不是逻辑块大小的倍数
附告警日志


*** 2020-11-24 04:58:14.240
*** SESSION ID:(234.4945) 2020-11-24 04:58:14.240
*** CLIENT ID:() 2020-11-24 04:58:14.240
*** SERVICE NAME:(SYS$BACKGROUND) 2020-11-24 04:58:14.240
*** MODULE NAME:(MMON_SLAVE) 2020-11-24 04:58:14.240
*** ACTION NAME:(Autobackup Control File) 2020-11-24 04:58:14.240
Starting control autobackup
*** 2020-11-24 04:58:14.649
Invalid Request:ORA-17507 lblksiz=16384 rcount=512 maxiosz=33554432
ksedsts()+465<-ksfd_osmvalsz()+105<-ksfd_osmvalio()+115<-ksfd_osmio()+792<-ksfd_io()+2782<-ksfdread()+581<-ksfdread_resilver()+61<-kspifisp()+649<-ksp_spfile_open()+775<-ksp_spfile_get()+689<-ksprds()+88<-krbbbsf()+1032<-krbmdab()+7432<-krbmabac_slave_action()+1226
<-kebm_slave_main()+586<-ksvrdp()+1766<-opirip()+674<-opidrv()+603<-sou2o()+103<-opimai_real()+250<-ssthrdmain()+265<-main()+201<-__libc_start_main()+245Got error: 19583
******************** WARNING ***************************
The errors during Server autobackup are not fatal, as it
is attempted after sucessful completion of the command.
However, it is recomended to take an RMAN control file
backup as soon as possible because the Autobackup failed
with the following error:
ORA-19583: 交谈因错误而终止
ORA-17507: I/O 请求大小 512 不是逻辑块大小的倍数
******************** END OF WARNING *******************
ORA-19583: 交谈因错误而终止
ORA-17507: I/O 请求大小 512 不是逻辑块大小的倍数


show parameter spfile 看看spfile在哪里。
根据报错,This is due to Bug 16870214 : DB STARTUP FAILS WITH ORA-17510 IF SPFILE IS IN 4K SECTOR SIZE DISKGROUP,也就是是spfile在4k扇区大小的磁盘组中有这个bug,参考:Database Startup Fails With Error ORA-17507: I/O Request Size 512 Is Not A Multiple Of Logical Block Size (Doc ID 1578983.1)
可以从V$ASM_DISKGROUP视图中SECTOR_SIZE字段确认。
如果暂时不能打补丁,那么有如下临时解决方案:
Case A) There is another ASM diskgroup available with sector size 512 (see column SECTOR_SIZE in view V$ASM_DISKGROUP)
- Start the instance using sqlplus and a pfile.
- Create pfile from the problem spfile. The location of spfile can be found in the alert.log.
Use "create pfile=’/tmp/init.test.ora’ from spfile=’<spfile location in the current ASM diskgroup’> - Move the spfile to another asm diskgroup where the sector size is not 4k by issuing
create spfile=’’ from pfile=’/tmp/init.test.ora’ - Modify the database attributes in OCR to show new spfile location by issuing
srvctl modify database -d-p “ ” - If there is a pfile (init${ORACLE_SID}.ora) in <RDBMS_HOME>/dbs with an ‘SPFILE=’ statement then this pfile needs to adjusted accordingly
- Recycle the database using "srvctl stop database -d
" or "srvctl start database -d " or using sqlplus
Case B) No other ASM diskgroup with sector size 512 is available
- Start the instance using sqlplus and a pfile.
- Create pfile from the problem spfile. The location of spfile can be found in the alert.log.
Use "create pfile=’/tmp/init.test.ora’ from spfile=’<spfile location in the ASM diskgroup’> - Move the spfile to a local file system.
create spfile=’<RDBMS_HOME>/dbs/spfile.ora’ from pfile=’/tmp/init.test.ora’
You need to replacewith the database name and <RDBMS_HOME> with the location of RDBLE HOME. - Copy the ‘<RDBMS_HOME>/dbs/spfile
.ora’ file to all nodes where the database needs to run - Modify the database attributes in OCR to show new spfile location by issuing
srvctl modify database -d-p “<RDBMS_HOME>/dbs/spfile .ora” - If there is a pfile (init${ORACLE_SID}.ora) in <RDBMS_HOME>/dbs with an ‘SPFILE=’ statement then this pfile needs to adjusted accordingly
- Recycle the database using "srvctl stop database -d
" or "srvctl start database -d " or using sqlplus - Besure to copy the spfile cross to the other nodes if any alter system set
… command is issued to modify the parameters in spfile.


spfile 位置
V$ASM_DISKGROUP


RMAN> show all;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO
看下这个配置到什么地方了。


尝试放到asm试试,我看报错是自动备份控制文件报错的。
*** ACTION NAME:(Autobackup Control File) 2020-11-24 04:58:14.240




1、备份日志
附件 mweasdbbaklog-2020112611-LEVEL1.log
2、备份错误信息
3、控制设置
4、当前备份脚本
附件 bkinc.sh
纠结点:
1、是否应该在您给的建议处理完成之后才能不出现这个错误,或者把自动备份开关打开。但是自动备份应该是系统自己执行,与设置没有关系。
或者是否可以还原rman设置到全部默认值,以前没有改控制文件自动备份的时候是没有报错的。
2、为什么没有归档日志的备份产生,在备份脚本中写了备份归档日志,难道是系统错误导致归档日志没有备份成功?


Reconfigure the snapshot controlfile so it has a unique name, not instance_name:
RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘+


1、新配置如下
2、问题依旧
3、是否需要修改控制文件位置才能不报错?
4、为什么把归档日志和数据文件备份分两个run进行,就会有归档日志的备份,如果不分开就不会有归档日志的备份。


现在你能确定备份哪个文件有问题吗?可以通过下面测试试试看哪个备份会有问题。
run{
allocate channel c1 type disk;
backup current controlfile format ‘/home/oracle/dbincbak/1mwdbbak_level1C_$(date +%Y%m%d%H)%d%s_%p.bak’;
release channel c1;
}
run{
allocate channel c1 type disk;
backup spfile format ‘/home/oracle/dbincbak/2mwdbbak_level1C_$(date +%Y%m%d%H)%d%s_%p.bak’;
release channel c1;
}
run{
allocate channel c1 type disk;
backup archivelog all format ‘/home/oracle/dbincbak/3mwdbbak_level1C_$(date +%Y%m%d%H)%d%s_%p.bak’;
release channel c1;
}
run{
allocate channel c1 type disk;
backup database format ‘/home/oracle/dbincbak/4mwdbbak_level1C_$(date +%Y%m%d%H)%d%s_%p.bak’;
release channel c1;
}




1、看日志是backup spfile format这块出现了问题,见附件mweasdbbaklog-2020112809-LEVEL1.log
RMAN> 2> 3> 4> 5> 6> 7> 8> 9>
allocated channel: c1
channel c1: SID=1078 instance=easdb1 device type=DISK
Starting backup at 2020-11-28 09:07:32
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on c1 channel at 11/28/2020 09:07:32
ORA-17507: I/O request size 512 is not a multiple of logical block size
2、bkinc.sh是备份脚本,
“----------------------------------------date
---------------------------------------”
source ~/.bash_profile
export FILE=“mweasdbbaklog-”(date +%Y%m%d%H)"-LEVEL1.log"
rman target / log /home/oracle/dbincbak/{FILE}<<EOF
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
sql ‘alter system checkpoint’;
sql ‘alter system switch logfile’;
sql ‘alter system archive log current’;
backup as compressed backupset incremental level=1 CUMULATIVE database tag=mwdb_bk_level1 format ‘/home/oracle/dbincbak/mwdbbak_level1C_(date +%Y%m%d%H)_%d_%s_%p.bak';
crosscheck backup;
delete noprompt expired backup;
delete noprompt obsolete;
release channel c1;
release channel c2;
release channel c3;
}
run
{
allocate channel a1 type disk;
allocate channel a2 type disk;
sql 'alter system checkpoint';
sql 'alter system switch logfile';
sql 'alter system archive log current';
backup as compressed backupset archivelog all tag=mwdb_bkLOG_level1 format '/home/oracle/dbincbak/dbArchLog_level1C_(date +%Y%m%d%H)%d%s_%p.bak’;
crosscheck archivelog all;
delete noprompt expired backup;
delete noprompt obsolete;
release channel a1;
release channel a2;
}
run
{
allocate channel d1 type disk;
backup as compressed backupset current controlfile tag=mwdb_controlfile_level1 format ‘/home/oracle/dbincbak/controlfile_$(date +%Y%m%d%H)_%d_control.bak’;
backup spfile format ‘/home/oracle/dbincbak/mwdbL1_SPFILE_$(date +%Y%m%d%H)%d%s_%p.bak’;
crosscheck backup;
delete noprompt expired backup;
delete noprompt obsolete;
release channel d1;
}
run
{
allocate channel c1 type disk;
backup spfile format ‘/home/oracle/dbincbak/2mwdbbak_level1C_$(date +%Y%m%d%H)%d%s_%p.bak’;
crosscheck backup;
delete noprompt expired backup;
delete noprompt obsolete;
release channel c1;
}
EOF
exit;


分别在2个节点都看下spfile的路径
show parameter pfile;
然后分别在2个节点执行
create pfile=’/tmpe/init.orabak’ from spifle=’+xx’;
看下2个节点都能否正常读到文件


1、两个节点应该都不能读取文件
2、目录查询结果如下
3、DF命令的结果
4、xfs_growfs的命令


asmcmd cp datadg/easdb/spfileeasdb.ora /tmp
看看能否拷贝到文件系统
如果可以的话
strings spfileeasdb.ora 把文本拷贝出来,根据文本直接重新创建一个pfile,再重新生成一个spfile试试。


1、可以按照您给的方式进行处理,但是打开后很多乱码
}|{z
9EASDB
TAG20201123T163147
8n6p
69+M
ro?U
8n6p
69+M
ro?U
~/;EASDB
LXbo
~/;i
~/;EASDB
LXbo
~/;i
easdb1
easdb2
easdb1
easdb2
F’do
?pOdo
?F’do
pOdo
F’do
F’do
?pOdo
?F’do
pOdo
F’do
Q+5;
Q+5;
++5;
++5;
~/;VS
X+5;
X+5;
fCp
;’ <
Q+5;
Q+5;
++5;
++5;
~/;VS
X+5;
X+5;
fCp
;’ <
+FRANDREDG/easdb/onlinelog/group_1.260.992968429
+FRANDREDG/easdb/onlinelog/group_2.261.992968429
+DATADG/easdb/datafile/system.262.992968429
+DATADG/easdb/datafile/sysaux.263.992968433
2、文件中还有很多归档日志的文件名称,但是这些已经不存在了。例如:
FRANDREDG/easdb/archivelog/2020_11_17/thread_2_seq_284294.4474.1056727547
~/;r
FRANDREDG/easdb/archivelog/2020_11_17/thread_1_seq_244479.7169.1056727547
FRANDREDG/easdb/archivelog/2020_11_17/thread_2_seq_284295.6395.1056727673
FRANDREDG/easdb/archivelog/2020_11_17/thread_2_seq_284296.5447.1056727871
但是查询目录是没有的
还有很多备份文件名称,但是都已经过期删除了
home/oracle/dbincbak/mwdbbak_level1c_EASDB_20201121_66081_1.bak
MWDB_BK_LEVEL1
DISK
home/oracle/dbincbak/mwdbbak_level1c_EASDB_20201121_66079_1.bak
MWDB_BK_LEVEL1
3、目前pfile文件


strings spfileeasdb.ora 看到的是很多乱码?正常来说应该是很多参数和值才对呀。


1、目前是这样的
2、我现在准备重建spfile文件,但是具体的格式我记不住,能给份比较准确的内容吗?
帮忙在有集群的环境下弄份spfile文件,我基于这个重新创建。


建议如果有备份建议参考备份,每个库的参数设置都不太一样。如果没有可以参考现网生产库的其他参数修改。


如果你的数据在正常运行可以通过以下语句提取参数。
select inst_id,name,value from gv$parameter t where t.ISDEFAULT=‘FALSE’


1、按照您的建议弄完pfile文件后,还是重新创建到asm的+DATAGD里面,还是在服务器本地硬盘的目录中。
2、使用原始名字还是新名字比较合适


学习了


这是Oracle数据库的错误信息,主要是因为I/O请求的大小不是逻辑块大小的倍数导致的。
Oracle数据库的逻辑块大小通常是2KB、4KB、8KB、16KB、32KB等,而I/O请求的大小必须是这些逻辑块大小的倍数,否则就会出现这个错误。
解决方法:
1. 检查你的I/O请求大小是否是逻辑块大小的倍数,如果不是,需要调整为逻辑块大小的倍数。
2. 如果你无法确定逻辑块大小,可以使用DBMS_UTILITY.GET_PARAMETER_VALUE函数来获取。
3. 如果你无法调整I/O请求大小,可能需要重新配置你的硬件或者操作系统来支持逻辑块大小的倍数的I/O请求。


