RAC因为localhost磁盘空间不够导致has进程挂起

 

[oracle@his1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Wed Jan 15 13:12:42 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.
下面可以启动数据库找不到spfile
SQL> startup
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+ORADATA/crds3db/spfilecrds3db.ora'
ORA-17503: ksfdopn:2 Failed to open file +ORADATA/crds3db/spfilecrds3db.ora
ORA-29701: unable to connect to Cluster Synchronization Service
下面进程下面进群主要代理进程没有起来
CRS-4133: Oracle High Availability Services has been stopped.
[root@his2 bin]# ./crsctl check crs
CRS-4639: Could not contact Oracle High Availability Services
[root@his2 bin]# ./crsctl start crs
CRS-4123: Oracle High Availability Services has been started.

从下面集群日志分析出因为No space left on device
2014-01-13 10:46:06.004
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No space left on device
CLSU-00103: error location: authprep6
CLSU-00104: additional error information: failed to make dir /app/grid/product/11.2.0/grid/auth/css/his1/A6182402

2014-01-13 10:46:48.097
[ctssd(5813)]CRS-2408:The clock on host his1 has been updated by the Cluster Time Synchronization Service to be synchronous with the mean cluster time.
2014-01-13 10:46:47.883
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No space left on device
CLSU-00103: error location: authprep6
CLSU-00104: additional error information: failed to make dir /app/grid/product/11.2.0/grid/auth/css/his1/A4002844

2014-01-13 10:47:40.153
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No space left on device
CLSU-00103: error location: authprep6
CLSU-00104: additional error information: failed to make dir /app/grid/product/11.2.0/grid/auth/css/his1/A5325456

2014-01-13 10:47:46.072
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No 2014-01-13 10:47:52.121
[ctssd(5813)]CRS-2408:The clock on host his1 has been updated by the Cluster Time Synchronization Service to be synchronous with the mean cluster time.
2014-01-13 10:47:48.186
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No space left on device
CLSU-00103: error location: authprep6
CLSU-00104: additional error information: failed to make dir /app/grid/product/11.2.0/grid/auth/css/his1/A8256687

2014-01-13 10:48:37.307
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No space left on device
CLSU-00103: error location: authprep6
CLSU-00104: additional error information: failed to make dir /app/grid/product/11.2.0/grid/auth/css/his1/A0629414

2014-01-13 10:49:04.149
[ctssd(5813)]CRS-2408:The clock on host his1 has been updated by the Cluster Time Synchronization Service to be synchronous with the mean cluster time.
2014-01-13 10:49:36.161
[ctssd(5813)]CRS-2408:The clock on host his1 has been updated by the Cluster Time Synchronization Service to be synchronous with the mean cluster time.
2014-01-13 10:49:37.729
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No space left on device
CLSU-00103: error location: authprep6
CLSU-00104: additional error information: failed to make dir /app/grid/product/11.2.0/grid/auth/css/his1/A3396298

2014-01-13 10:50:12.990
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No space left on device
CLSU-00103: error location: authprep6
CLSU-00104: additional error information: failed to make dir /app/grid/product/11.2.0/grid/auth/css/his1/A2786508

2014-01-13 10:50:13.039
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No space left on device
CLSU-00103: error location: authprep6
CLSU-00104: additional error information: failed to make dir /app/grid/product/11.2.0/grid/auth/css/his1/A7075711

2014-01-13 10:50:40.191
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No space left on device
CLSU-00103: error location: authprep6
CLSU-00104: additional error information: failed to make dir /app/grid/product/11.2.0/grid/auth/css/his1/A9099265

2014-01-13 10:51:15.827
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No space left on device
CLSU-00103: error location: authprep6
CLSU-00104: additional error information: failed to make dir /app/grid/product/11.2.0/grid/auth/css/his1/A8800243

2014-01-13 10:51:20.208
[ctssd(5813)]CRS-2408:The clock on host his1 has been updated by the Cluster Time Synchronization Service to be synchronous with the mean cluster time.
2014-01-13 10:51:48.478
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No space left on device
CLSU-00103: error location: authprep6
CLSU-00104: additional error information: failed to make dir /app/grid/product/11.2.0/grid/auth/css/his1/A4302993

2014-01-13 10:52:24.230
[ctssd(5813)]CRS-2408:The clock on host his1 has been updated by the Cluster Time Synchronization Service to be synchronous with the mean cluster time.
2014-01-13 10:52:40.548
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No space left on device
CLSU-00103: error location: authprep6
CLSU-00104: additional error information: failed to make dir /app/grid/product/11.2.0/grid/auth/css/his1/A5271303

2014-01-13 10:52:54.826
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No 2014-01-13 10:53:36.254
[ctssd(5813)]CRS-2408:The clock on host his1 has been updated by the Cluster Time Synchronization Service to be synchronous with the mean cluster time.
2014-01-13 10:54:08.267
[ctssd(5813)]CRS-2408:The clock on host his1 has been updated by the Cluster Time Synchronization Service to be synchronous with the mean cluster time.
2014-01-13 10:54:24.904
[cssd(5742)]CRS-10000:CLSU-00100: Operating System function: mkdir failed with error data: 28
CLSU-00101: Operating System error message: No space left on device
CLSU-00103: error location: authprep6
CLSU-00104: additional error information: failed to make dir /app/grid/product/11.2.0/grid/auth/css/his1/A0800143

[root@his1 ~]# /etc/init.d/init.ohasd run
[grid@his1 ~]$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

[grid@his1 ~]$ crsctl stat res -t -init
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.asm
      1        ONLINE  ONLINE       his1                     Started            
ora.cluster_interconnect.haip
      1        ONLINE  ONLINE       his1                                        
ora.crf
      1        ONLINE  ONLINE       his1                                        
ora.crsd
      1        ONLINE  ONLINE       his1                                        
ora.cssd
      1        ONLINE  ONLINE       his1                                        
ora.cssdmonitor
      1        ONLINE  ONLINE       his1                                        
ora.ctssd
      1        ONLINE  ONLINE       his1                     ACTIVE:0           
ora.diskmon
      1        ONLINE  ONLINE       his1                                        
ora.drivers.acfs
      1        ONLINE  ONLINE       his1                                        
ora.evmd
      1        ONLINE  ONLINE       his1                                        
ora.gipcd
      1        ONLINE  ONLINE       his1                                        
ora.gpnpd
      1        ONLINE  ONLINE       his1                                        
ora.mdnsd
      1        ONLINE  ONLINE       his1
转载时候提示原作者或者以路径连接方式        请您尊重笔记
技术群:132304250



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29065182/viewspace-1070881/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29065182/viewspace-1070881/

<think>嗯,用户想找HAL_TIM_PeriodElapsedCallback函数的定义位置和用法。首先,我需要回忆一下STM32的HAL库结构。这个回调函数应该和定时器中断相关,对吧?当定时器的周期到了,就会触发这个回调函数。 根据用户提供的引用资料,特别是引用[3],里面提到使用HAL_TIM_Base_Start_IT来启动定时器并开启中断,然后实现中断服务程序中的任务。所以HAL_TIM_PeriodElapsedCallback应该是在用户代码中定义的,用来处理周期性的中断事件。HAL库通常采用回调机制,用户需要自己实现这些回调函数,比如这个函数可能是在定时器更新事件时被调用。 接下来,关于定义的位置,HAL库中的弱定义应该在某个头文件或源文件中,比如stm32xx_hal_tim.h或者对应的.c文件中。用户需要在自己的代码中重新定义这个函数,覆盖弱符号。例如,在main.c或者专门的定时器处理文件中定义。 用法方面,用户需要在初始化定时器并启动中断后,编写这个回调函数的内容,比如翻转LED或者处理数据。同时要注意定时器实例的判断,如果有多个定时器的话,需要用htim的参数来选择正确的定时器。 可能用户遇到的问题是没有正确实现回调函数,或者没有启动中断。需要检查是否调用了正确的启动函数,比如HAL_TIM_Base_Start_IT而不是HAL_TIM_Base_Start,后者可能不会开启中断。 另外,用户可能需要知道如何查找HAL库中的弱定义,这通常是在HAL的源文件中,使用__weak关键字修饰。例如在stm32xx_hal_tim.c中会有这个函数的弱定义,用户在自己的代码中重新实现即可。 还需要提醒用户,中断服务函数的名字可能和CubeMX生成的有关,确保中断向量表正确,以及中断优先级设置合理。如果有多个定时器,回调函数中需要通过htim->Instance来判断是哪个定时器触发的,从而执行不同的操作。 总结一下,回答应该包括回调函数的定义位置在用户代码中,需要覆盖HAL的弱定义,用法是在定时器中断发生时执行用户代码,并注意定时器实例的判断。同时提供示例代码和常见问题解答,帮助用户正确使用。</think>### HAL_TIM_PeriodElapsedCallback 函数解析 #### 1. 函数定义位置 `HAL_TIM_PeriodElapsedCallback` 是STM32 HAL库中定时器更新事件(周期中断)的**弱定义回调函数**,其默认实现位于HAL库的定时器驱动文件中(例如:`stm32xx_hal_tim.c`),但用户需要在工程中**重新实现该函数**以覆盖默认的弱定义[^3]。 具体来说: - **弱定义位置**:`stm32xx_hal_tim.c`(例如`stm32h7xx_hal_tim.c`) - **用户实现位置**:用户代码中(如`main.c`或自定义的定时器处理文件) #### 2. 函数作用 当定时器的计数器溢出(或达到预设周期值)时,触发更新事件中断,此时`HAL_TIM_PeriodElapsedCallback` 会被调用,用于执行用户自定义的周期性任务,例如:LED闪烁、传感器数据采集等[^3]。 #### 3. 函数原型 ```c __weak void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { // 默认空实现(需用户覆盖) } ``` #### 4. 使用步骤 1. **定时器初始化** 配置定时器参数(预分频系数、计数周期等),例如: ```c TIM_HandleTypeDef htim3; htim3.Instance = TIM3; htim3.Init.Prescaler = 8399; // 84MHz/(8400) = 10kHz htim3.Init.CounterMode = TIM_COUNTERMODE_UP; htim3.Init.Period = 9999; // 10kHz/10000 = 1Hz HAL_TIM_Base_Init(&htim3); ``` 2. **启动定时器中断** 使用 `HAL_TIM_Base_Start_IT` 启动定时器并开启中断[^3]: ```c HAL_TIM_Base_Start_IT(&htim3); ``` 3. **实现回调函数** 在用户代码中重新定义函数: ```c void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { if (htim->Instance == TIM3) // 判断触发源 { HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5); // 示例:翻转LED } } ``` #### 5. 注意事项 - 若使用多个定时器,需在回调函数中通过 `htim->Instance` 判断具体触发源[^3]。 - 必须调用 `HAL_TIM_Base_Start_IT`(而非 `HAL_TIM_Base_Start`)以启用中断功能。 - 确保中断服务函数 `TIMx_IRQHandler` 已正确关联到定时器(通常由CubeMX自动生成)。 --- ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值