The "shmmax" value is too large when installing Oracle 11g on RHEL7

1

I am trying to install Oracle Database 11g Release 2 on RHEL 7.2. Executing runfixup.sh, it outputs:

# /tmp/CVU_11.2.0.1.0_oracle/runfixup.sh
Response file being used is :/tmp/CVU_11.2.0.1.0_oracle/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.1.0_oracle/fixup.enable
Log file location: /tmp/CVU_11.2.0.1.0_oracle/orarun.log
Setting Kernel Parameters...
/tmp/CVU_11.2.0.1.0_oracle/orarun.sh: line 244: [: 18446744073692774399: integer expression expected
The value for shmmax in response file is not greater than value of shmmax for current session. Hence not changing it.
/tmp/CVU_11.2.0.1.0_oracle/orarun.sh: line 335: [: 18446744073692774399: integer expression expected
The value for shmall in response file is not greater than value of shmall for current session. Hence not changing it.
The value for semmni in response file is not greater than value of semmni for current session. Hence not changing it.

Take shmmax as an example, the code in runfixup.sh is like this:

 239           #current value of shmmax - value in /proc/sys/kernel/shmmax
 240           cur_shmmax=`/sbin/sysctl -n kernel.shmmax`
 241           #remove the extra spaces in the line.
 242           cur_shmmax=`echo $cur_shmmax | sed 's/ //g'`
 243           echo "shmmax for current session:$cur_shmmax" >> $log_file/orarun.log
 244           if [ $SHMMAX -gt $cur_shmmax ]
 245           then
 246               if  ! $SYSCTL_LOC -w kernel.shmmax="$SHMMAX"
 247               then
 248                 echo "$SYSCTL_LOC failed to set shmmax" |tee -a $log_file/orarun.log
 249               fi
 250            else
 251                  echo "The value for shmmax in response file is not greater than value of shmmax for current session. Hence not changi     ng it." |tee -a $log_file/orarun.log
 252            fi

Check shmmax configuration in system:

# /sbin/sysctl -a | grep shm
kernel.shm_next_id = -1
kernel.shm_rmid_forced = 0
kernel.shmall = 18446744073692774399
kernel.shmmax = 18446744073692774399
kernel.shmmni = 4096
vm.hugetlb_shm_group = 0

And the shmmax configuration value is like this:
enter image description here

My questions are:
(1) The if [ -gt ] in Bash only operates on integers? How to operate on 64-bit long integer?
(2) Is it OK to modify shmmax as the expected value of Oracle hint?

Nan Xiao

Posted 2016-01-15T03:51:55.437

Reputation: 3 535

you should ask this question on [dba.se] or [unix.se] and not on superuser. lol – Evan Carroll – 2018-02-05T23:27:06.213

Answers

0

Bash appears to operate ok on signed 64 bit integers. If you need even more robustness, use bc, e.g. on these unsigned 64 bit integers that bash can't handle.

echo "18446744073709551615 * 2" | bc -l
36893488147419103230
echo "18446744073709551615 > 2" | bc -l
1
echo "18446744073709551615 < 2" | bc -l
0

Offhand I would modify shmmax as Oracle indicates. There are any number of web pages explaining exactly what this will do, in case you have some hesitation about tinkering with the shared memory distribution.

Erik Bryer

Posted 2016-01-15T03:51:55.437

Reputation: 21

0

Same problem to me installing an Oracle XE on RHEL7, the values of shmmax and shmall was the same you show. But the machine has only 3G of RAM, this huge values are not needed. So, I changed the parameters to values less than this in sysctl.conf, and the installation gone ahead without problems.

Best regards, Régis

Regis Vaz

Posted 2016-01-15T03:51:55.437

Reputation: 1

1What values did you set these to, exactly? – bertieb – 2018-06-06T14:10:47.960

show what steps you actually took to solve the problem! – Tim_Stewart – 2018-06-06T14:37:28.347