11.2.0.1使用ASM存储,已经用了一天,发现有些问题,决定卸载后重新安装,但在卸载ASM时报错,网上说要下载单独的卸载包来使用deinstall卸载工具,但我发现其实安装完毕后,安装目录也有deinstall文件。
[grid@szmlserver12_32 ~]$ find $ORACLE_HOME -name 'deinstall'
/u01/app/11.2.0/grid/inventory/Templates/deinstall
/u01/app/11.2.0/grid/inventory/Templates/deinstall/deinstall --查看文件日期是2009年的,说明是安装完毕就有的
/u01/app/11.2.0/grid/deinstall
/u01/app/11.2.0/grid/deinstall/deinstall --最近时间的
卸载:
[grid@szmlserver12_32 deinstall]$ cd /u01/app/11.2.0/grid/deinstall
[grid@szmlserver12_32 deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2012-06-20_09-14-37-PM/logs/
############ ORACLE DEINSTALL & DECONFIG TOOL START ############
######################## CHECK OPERATION START ########################
Install check configuration START
Checking for existence of the Oracle home location /data/g01/app/grid
Oracle Home type selected for de-install is: SIHA
Oracle Base selected for de-install is: /data/g01/app
Checking for existence of central inventory location /data/g01/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /data/g01/app/grid
Install check configuration END
Traces log file: /tmp/deinstall2012-06-20_09-14-37-PM/logs//crsdc.log
ERROR: Can't deconfigure Oracle Restart before removing or downgrading managed Oracle databases.
Network Configuration check config START
Network de-configuration trace file location: /tmp/deinstall2012-06-20_09-14-37-PM/logs/netdc_check3957010869283265415.log
Specify all Oracle Restart enabled listeners that are to be de-configured [LISTENER]:
Network Configuration check config END
Asm Check Configuration START
ASM de-configuration trace file location: /tmp/deinstall2012-06-20_09-14-37-PM/logs/asmcadc_check3796217799711335334.log
Specify the ASM Diagnostic Destination [ ]: /data/g01/app/grid --手动输入
Specify the diskgroups that are managed by this ASM instance []: CRS
--手动输入
De-configuring ASM will drop all the diskgroups at cleanup time. Do you want deconfig tool to drop the diskgroups y|n [y]:
######################### CHECK OPERATION END #########################
####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /data/g01/app/grid
The cluster node(s) on which the Oracle home exists are: (Please input nodes seperated by ",", eg: node1,node2,...)null
Oracle Home selected for de-install is: /data/g01/app/grid
Inventory Location where the Oracle home registered is: /data/g01/oraInventory
Following Oracle Restart enabled listener(s) will be de-configured: LISTENER
ASM instance will be de-configured from this Oracle home
A log of this session will be written to: '/tmp/deinstall2012-06-20_09-14-37-PM/logs/deinstall_deconfig2012-06-20_09-14-56-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2012-06-20_09-14-37-PM/logs/deinstall_deconfig2012-06-20_09-14-56-PM.err'
ERROR: The deconfiguration and deinstallation tool has detected runtime errors when checking the existing configuration due to which the tool cannot continue with clean up operation. Please check the log files for more information. Rerun the tool after fixing the errors to proceed with the ORACLE_HOME clean up.
############# ORACLE DEINSTALL & DECONFIG TOOL END #############
没办法,找相关文档手动卸载试试:
用root用户登录
[root@szmlserver12_32 install]# cd /u01/app/11.2.0/grid/crs/install/
[root@szmlserver12_32 install]# ./rootcrs.pl -verbose -deconfig -force -lastnode --如果是RAC去掉-lastnode ,在最后一个节点这样输入,我是单实例
2012-06-20 21:21:51: Parsing the host name
2012-06-20 21:21:51: Checking for super user privileges
2012-06-20 21:21:51: User has super user privileges
Using configuration parameter file: ./crsconfig_params
Can't open /etc/oracle/scls_scr/szmlserver12_32/root/ohasdrun for write: No such file or directory at s_crsconfig_lib.pm line 1021.
[root@szmlserver12_32 install]# ./crsconfig_params
之后再使用./deinstall就可以自动卸载完成:
[grid@szmlserver12_32 deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2012-06-20_09-24-35-PM/logs/
############ ORACLE DEINSTALL & DECONFIG TOOL START ############
######################## CHECK OPERATION START ########################
Install check configuration START
Checking for existence of the Oracle home location /data/g01/app/grid
Oracle Home type selected for de-install is: SIHA
Oracle Base selected for de-install is: /data/g01/app
Checking for existence of central inventory location /data/g01/oraInventory
Checking for existence of the Oracle Grid Infrastructure home
Install check configuration END
Traces log file: /tmp/deinstall2012-06-20_09-24-35-PM/logs//crsdc.log
Network Configuration check config START
Network de-configuration trace file location: /tmp/deinstall2012-06-20_09-24-35-PM/logs/netdc_check2499560354177913132.log
Specify all Oracle Restart enabled listeners that are to be de-configured [LISTENER]:
Network Configuration check config END
Asm Check Configuration START
ASM de-configuration trace file location: /tmp/deinstall2012-06-20_09-24-35-PM/logs/asmcadc_check7734960688914370386.log
Specify the ASM Diagnostic Destination [ ]: /data/g01/app/grid
Specify the diskgroups that are managed by this ASM instance []: CRS
De-configuring ASM will drop all the diskgroups at cleanup time. Do you want deconfig tool to drop the diskgroups y|n [y]:
######################### CHECK OPERATION END #########################
####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is:
The cluster node(s) on which the Oracle home exists are: (Please input nodes seperated by ",", eg: node1,node2,...)null
Oracle Home selected for de-install is: /data/g01/app/grid
Inventory Location where the Oracle home registered is: /data/g01/oraInventory
Following Oracle Restart enabled listener(s) will be de-configured: LISTENER
ASM instance will be de-configured from this Oracle home
Do you want to continue (y - yes, n - no)? [n]: y --输入y
A log of this session will be written to: '/tmp/deinstall2012-06-20_09-24-35-PM/logs/deinstall_deconfig2012-06-20_09-24-43-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2012-06-20_09-24-35-PM/logs/deinstall_deconfig2012-06-20_09-24-43-PM.err'
######################## CLEAN OPERATION START ########################
ASM de-configuration trace file location: /tmp/deinstall2012-06-20_09-24-35-PM/logs/asmcadc_clean6946263878619887120.log
ASM Clean Configuration START
ASM deletion in progress. This operation may take few minutes.
ASM Clean Configuration END
Network Configuration clean config START
Network de-configuration trace file location: /tmp/deinstall2012-06-20_09-24-35-PM/logs/netdc_clean2146199785756490070.log
De-configuring Oracle Restart enabled listener(s): LISTENER
De-configuring listener: LISTENER
Stopping listener: LISTENER
Warning: Failed to stop listener. Listener may not be running.
Deleting listener: LISTENER
Listener deleted successfully.
Listener de-configured successfully.
De-configuring Listener configuration file...
Listener configuration file de-configured successfully.
De-configuring Naming Methods configuration file...
Naming Methods configuration file de-configured successfully.
De-configuring backup files...
Backup files de-configured successfully.
The network configuration has been cleaned up successfully.
Network Configuration clean config END
Oracle Universal Installer clean START
Detach Oracle home '/data/g01/app/grid' from the central inventory on the local node : Done
Delete directory '/data/g01/app/grid' on the local node : Done
Delete directory '/data/g01/oraInventory' on the local node : Done
The Oracle Base directory '/data/g01/app' will not be removed on local node. The directory is not empty.
Oracle Universal Installer cleanup was successful.
Oracle Universal Installer clean END
Oracle install clean START
Clean install operation removing temporary directory '/tmp/install' on node 'szmlserver12_32'
Oracle install clean END
######################### CLEAN OPERATION END #########################
####################### CLEAN OPERATION SUMMARY #######################
ASM instance was de-configured successfully from the Oracle home
Following Oracle Restart enabled listener(s) were de-configured successfully: LISTENER
Oracle Restart is stopped and de-configured successfully.
Successfully detached Oracle home '/data/g01/app/grid' from the central inventory on the local node.
Successfully deleted directory '/data/g01/app/grid' on the local node.
Successfully deleted directory '/data/g01/oraInventory' on the local node.
Oracle Universal Installer cleanup was successful.
Run 'rm -rf /etc/oraInst.loc' as root on node(s) 'szmlserver12_32' at the end of the session.
Oracle install successfully cleaned up the temporary directories.
#######################################################################
############# ORACLE DEINSTALL & DECONFIG TOOL END #############
再用root登陆运行rm -rf /etc/oraInst.loc即可.
再重新安装的过程中,遇到建立磁盘的时候,无法选择磁盘:

原来上图的STATUS都是member,当时没仔细看,一个磁盘都无法勾选,后来意识到应该是之前使用过后,ASM依然可以识别出磁盘头信息,所以:
# fdisk /dev/asm-diske
再查看时无法发现 /dev/asm-diske,里面只剩7块磁盘了,感觉应该是磁盘头信息让ASM无法识别,使用dd命令填充磁盘头前512个字节即可:
# dd if=/dev/zero count=10 bs=512 of=/dev/sde
再启动安装即可发现
手动卸载Oracle 11g R2的ASM实例
在尝试使用./deinstall卸载Oracle 11g R2 ASM实例时遇到错误,文章详细记录了解决过程。首先,通过检查发现deinstall工具已存在于安装目录下,但直接运行报错。然后,通过root用户运行特定命令进行手动卸载,包括使用rootcrs.pl进行配置解除和强制卸载。最终成功卸载并解决了ASM识别磁盘的问题,为重新安装扫清了障碍。
5196

被折叠的 条评论
为什么被折叠?



