**這個很大程度上是grid 11.2.0.1 的一個BUG,另外發現在CPU爲AMD時會觸發這個bug,而intel則不會。
執行root.sh腳本報錯
# ./root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2013-04-03 14:53:56: Checking for super user privileges
2013-04-03 14:53:56: User has super user privileges
2013-04-03 14:53:56: Parsing the host name
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
/etc/profile: line 6: ulimit: max user processes: cannot modify limit: Operation not permitted
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node oracle11gr2 successfully pinned.
Adding daemon to inittab
Failed to start oracle-ohasd, error:
ohasd failed to start: Inappropriate ioctl for device at /u01/app/11.2.0/grid/crs/install/roothas.pl line 296.
或者可能如下錯誤:
Addingdaemontoinittab
CRS-4124:OracleHighAvailabilityServicesstartupfailed.
CRS-4000:CommandStartfailed,orcompletedwitherrors.
ohasdfailedtostart:Inappropriateioctlfordevice
ohasdfailedtostartat/u01/app/11.2.0/grid/crs/install/rootcrs.plline443.
CRS-4124:OracleHighAvailabilityServicesstartupfailed.
CRS-4000:CommandStartfailed,orcompletedwitherrors.
ohasdfailedtostart:Inappropriateioctlfordevice
ohasdfailedtostart:Inappropriateioctlfordeviceat/u01/app/11.2.0/grid/crs/install/roothas.plline296.
解決方案
第一步:回退root.sh腳本操作
#/u01/app/11.2.0/grid/crs/install/roothas.pl -deconfig -force -verbose
2013-04-0314:44:34:Checkingforsuperuserprivileges
2013-04-0314:44:34:Userhassuperuserprivileges
2013-04-0314:44:34:Parsingthehostname
Usingconfigurationparameterfile:/u01/app/11.2.0/grid/crs/install/crsconfig_params
CRS-4639:CouldnotcontactOracleHighAvailabilityServices
CRS-4000:CommandStopfailed,orcompletedwitherrors.
CRS-4639:CouldnotcontactOracleHighAvailabilityServices
CRS-4000:CommandDeletefailed,orcompletedwitherrors.
CRS-4544:UnabletoconnecttoOHAS
CRS-4000:CommandStopfailed,orcompletedwitherrors.
/u01/app/11.2.0/grid/bin/acfsdriverstate:line51:/lib/acfstoolsdriver.sh:Nosuchfileordirectory
/u01/app/11.2.0/grid/bin/acfsdriverstate:line51:exec:/lib/acfstoolsdriver.sh:cannotexecute:Nosuchfileordirectory
SuccessfullydeconfiguredOracleRestartstack
第二步:
方法1: 編輯$GRID_HOME/crs/install/s_crsconfig_lib.pm,查找if ($srv eq “ohasd”) { # Start OHASD
# Start OHASD後方插入下列代碼:my$UPSTART_OHASD_SERVICE="oracle-ohasd";
my$INITCTL="/sbin/initctl";
($status,@output)=system_cmd_capture("$INITCTL
start $UPSTART_OHASD_SERVICE");
if(0!=$status)
{
error("Failed
to start $UPSTART_OHASD_SERVICE, error: $!");
return$FAILED;
}
最後應該如下所示一樣:
# Check to see if the service is OHASD
if($srveq"ohasd"){
# Create the autorun file
my$AUTORUNFILE=catfile($SCRBASE,$HOST,$HAS_USER,"ohasdrun");
open(AUTORUN,">$AUTORUNFILE")
ordie"Can't
open $AUTORUNFILE for write: $!";
printAUTORUN"stopn";
close(AUTORUN);
s_set_ownergroup($HAS_USER,$HAS_GROUP,$AUTORUNFILE)
ordie"Can't
change ownership of $AUTORUNFILE: $!";
s_set_perms("0644",$AUTORUNFILE)
ordie"Can't
change permissions of $AUTORUNFILE: $!";
#
Add OHASD to inittab
print"Adding
daemon to inittabn";
s_remove_itab("cssd|evmd|crsd|ohasd")orreturn$FAILED;
system("$INIT
q");
sleep(5);
s_add_itab()orreturn$FAILED;
system("$INIT
q");
#
Start OHASD
####################插在此處地方############################
my$UPSTART_OHASD_SERVICE="oracle-ohasd";
my$INITCTL="/sbin/initctl";
($status,@output)=system_cmd_capture("$INITCTL
start $UPSTART_OHASD_SERVICE");
if(0!=$status)
{
error("Failed
to start $UPSTART_OHASD_SERVICE, error: $!");
return$FAILED;
}
#####################################################################
$status=system("$CRSCTL
start has");
}elsif($srveq"crsexcl"){
trace("Starting
Oracle clusterware exclusive");
#
Create the autorun file
(推薦)方法2:在執行root.sh腳本時出現Adding daemon to inittab的時候,在另一個窗口使用root立即執行以下命令:
#vi /etc/init/oracle-ohasd.conf
startonrunlevel[35]
stoponrunlevel[!35]
respawn
exec/etc/init.d/init.ohasdrun>/dev/null2>&1</dev/null
如果使用方法2:則在執行完畢root.sh腳本後也必須創建,否則重啓系統後無法自動啓動HAS
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2013-04-03 14:45:16: Checking for super user privileges
2013-04-03 14:45:16: User has super user privileges
2013-04-03 14:45:16: Parsing the host name
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
/etc/profile: line 6: ulimit: max user processes: cannot modify limit: Operation not permitted
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node oracle11gr2 successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
ADVM/ACFS is not supported on oraclelinux-release-6Server-3.0.2.x86_64
oracle11gr2 2013/04/03 14:45:50 /u01/app/11.2.0/grid/cdata/oracle11gr2/backup_20130403_144550.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 4020 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
[root@oracle11gR2 grid]#
root.sh腳本執行成功
按照方法一的實施方法,會net配置錯誤,在安裝完成後還需要手動netca
所以比較推薦方法二