Oracle 11g ASM install on Solaris 10 with RAW data files
I was installing a Oracle 11g + ASM server for testing and upgrade purpose when I came across a problem : how do I create RAW « filsystem » for ASM ?
I found a lot of docs for doing this with Linux, but nothing about Solaris.
Of course you will quickly find something about ‘lofs’ and ‘lofsadm’. This is the right starting point. But then ?
It seems ASM wants to have « real » block device for use with ASM. If I’m wrong, please, comment and correct me.
My solution was to :
- create two ‘zeroed’ files with DD, around 8Gb each. They will be used in a RAID 0 redundancy. This should be managed by ASM itself, and need to be configured. Do this as user Oracle
$ cd /opt/oracle $ mkdir disks $ dd if=/dev/zero of=/opt/oracle/disks/baytestdb_asm1_disk1 bs=8192 count=1000000 $ dd if=/dev/zero of=/opt/oracle/disks/baytestdb_asm1_disk2 bs=8192 count=1000000
- use ‘lofiadm’ to link the files as block devices. Do this as root user :
# lofiadm -a /opt/oracle/disks/baytestdb_asm1_disk1 /dev/lofi/1 # lofiadm -a /opt/oracle/disks/baytestdb_asm1_disk2 /dev/lofi/2 # lofiadm Block Device File /dev/lofi/1 /opt/oracle/disks/baytestdb_asm1_disk1 /dev/lofi/2 /opt/oracle/disks/baytestdb_asm1_disk2
- use ‘mknod’ to create a copy of the block device in your Oracle directory and give appropriate rights.
# ls -l /dev/lofi lrwxrwxrwx 1 root root 29 Nov 25 14:39 1 -> ../../devices/pseudo/lofi@0:1 lrwxrwxrwx 1 root root 29 Nov 25 14:39 2 -> ../../devices/pseudo/lofi@0:2 # ls -l /devices/pseudo/lofi@0:1 brw------- 1 root sys 147, 1 Nov 25 14:30 /devices/pseudo/lofi@0:1 # ls -l /devices/pseudo/lofi@0:2 brw------- 1 root sys 147, 2 Nov 25 14:36 /devices/pseudo/lofi@0:2
You will use the numbers 147, 1 and 147, 2 to create the node :
# cd /opt/oracle/disks # mknod baytestdb_asm1_disk_1 c 147 1 # mknod baytestdb_asm1_disk_2 c 147 2 # chown oracle:oinstall baytestdb_asm1_disk_* # chmod 660 baytestdb_asm1_disk_*
- Tell the Oracle ASM Installer to search in the directory (/opt/oracle/disks in my case and NOT /opt/oracle/disks/*)
OK, I admit, names of dd files and block device are not good/clear… I still havn’t found a real good and clear naming. But, heh, I did my part. Now, do yours and propose the names
I did all this on the latest Solaris 10/08 :
cat /etc/release Solaris 10 10/08 s10s_u6wos_07b SPARC Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 27 October 2008 uname -a SunOS indus.adm.groupertl.net 5.10 Generic_137137-09 sun4v sparc SUNW,Sun-Fire-T1000
I will not come over all the recommended for Oracle install, like having oracle user and oinstall, oper and dba groups. Once you have all the pre-requisit and the new devices created as above, start here.
Untar, unzip or uncpio the ASM install files and the DB files. I like to do this in /opt/oracle/install.
Oracle disks are in /opt/oracle/disks. Oracle home is in /opt/oracle/shellhome. Oracle product files are in /opt/oracle/product/11. If you have RAC (crs), I do intall in /opt/oracle/product/11/crs_1. For ASM and DBs, I install in /opt/oracle/product/11/oracle_base/asm_1 and db_1.
Once this is done, start the installer as user oracle :
$ /opt/oracle/install/11GR1ASM/database/runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 180 MB. Actual 6241 MB Passed Checking swap space: must be greater than 150 MB. Actual 6564 MB Passed Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2008-11-27_10-30-27AM. Please wait ...-bash-3.00$ Warning: Cannot convert string "-monotype-arial-regular-r-normal--*-140-*-*-p-*-iso8859-1" to type FontStruct
Don’t care for the font error.
As a side note, if you are working on the server from a remote host, using SSH, you will have to redirect the display. You will have all the informations if you don’t. If you are on a Mac OsX, you will need to :
- start the X11 server (found in the Xcode tools I think)
- configure your SSH client to redirect the DISPLAY (this is by default I think – on every Unix OS)
- use the -X -Y options to ssh like : ssh -X -Y oracle@my_server_name
The Oracle installer will open with this window.
Choose the Advanced Install and click next.
Remember the baytest_asm1 name. You may have to use it later when you administer your oracle install.
Enter here, the ASM password. Keep it secure.
In Normal redundancy you will need two disks. They are not used as mirror, but should guaranty some redundancy. High redundancy will require 3 disks. External… you have to manage it. Use this is you already have some RAID you are trusting in
Click Install and wait. Wait. Waiiiiiit……….
You will have to run the script on the host as root. You will only have to give a directory where some files will be installed. Don’t use the /usr/local/bin offer. Change it to somewhere in /opt/oracle, at least. You will have to do the same thing for the Database install in a few moments.
# /opt/oracle/product/11/oracle_base/asm_1/root.sh Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /opt/oracle/product/11/oracle_base/asm_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: /opt/oracle/asmbin Entries will be added to the /var/opt/oracle/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. Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. Configuration for local CSS has been initialized Cleaning up Network socket directories Setting up Network socket directories Adding to inittab Startup will be queued to init within 30 seconds. Checking the status of new Oracle init process... Expecting the CRS daemons to be up within 600 seconds. Cluster Synchronization Services is active on these nodes. indus Cluster Synchronization Services is active on all the nodes. Oracle CSS service is installed and running under init(1M) Finished product-specific root actions.
You can click OK and go to the next step.
And you are done.
Let’s go with the DB install now. Just run the DB installer.
$ /opt/oracle/install/11GR1DB/database/runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 180 MB. Actual 5825 MB Passed Checking swap space: must be greater than 150 MB. Actual 6507 MB Passed Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2008-11-27_11-17-05AM. Please wait ...-bash-3.00$ Warning: Cannot convert string "-monotype-arial-regular-r-normal--*-140-*-*-p-*-iso8859-1" to type FontStruct Oracle Universal Installer, Version 220.127.116.11.0 Production Copyright (C) 1999, 2007, Oracle. All rights reserved.
You will encounter one or two error message. Just click OK and go on. One done, click OK and Next.
You now have to run a script as root. Copy the script name and start it in a root shell of the host.
# /opt/oracle/product/11/oracle_base/db_1/root.sh Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /opt/oracle/product/11/oracle_base/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: /opt/oracle/dbbin Entries will be added to the /var/opt/oracle/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. Finished product-specific root actions.
And you are done.
Now you should have some running processes on the host. Notice the two listeners, one for ASM, one for the DB.
Also note the /opt/oracle/product/11/oracle_base/asm_1/bin/ocssd.bin process. This one is the link between ASM and the database.
Check next post for the Oracle 18.104.22.168 to 22.214.171.124 upgrade.