- I create a disk image for 500M with this command (as root):
dd if=/dev/zero of=/disk3.img bs=516096c count=1000
- then i mount those disk image as local device, so that file will be threaded as phisycal disk
losetup /dev/loop1 /disk3.img
Note: if you want to detach loopback device from disk image, you can use this command:
losetup -d /dev/loop?
- We should configure and run CSS (Cluster Synchronization Service) before configure ASM
that command will create init.cssd service in /etc/init.d and /etc/oracle directory store some information and location to store any information from cssd service.
You can call CSS service with this command:
- download the latest ASMlib source from OracleASM project. (please read some discussion at this). In that directory, there is no configure script, so I download ASMLib kernel module (oracleasm-2.0.3.tar.gz) and use configure script from that. The compilation is success. After make install, we will get /etc/init.d/oracleasm service script.
- now, I have to make oracleasm kernel module is launched safely.
Default user to own the driver interface : oracle
Default group to own the driver interface : oinstall
Start Oracle ASM library driver on boot (y/n) [y]: n
Fix permissions of Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: [ OK ]
Unmounting ASMlib driver filesystem: [ OK ]
- in my case, kernel module oracleasm can't be found by modprobe -r oracleasm, so, I try to call with
I changed modprobe -s "$MODNAME" command with insmod command like above.
- To make our local loopback disk become ASM disk, I have to make ASM disk with /etc/init.d/oracleasm createdisk command :
/etc/init.d/oracleasm createdisk ASMD0 /dev/loop0
/etc/init.d/oracleasm createdisk ASMD1 /dev/loop1
- Based on dizwell.com blog, I should prepare ASM instance with these commands:
$ export ORACLE_SID=+ASM
$ sqlplus / as sysdba
SQL> create spfile from pfile='/tmp/init+ASM.ora';
SQL> startup nomount;
SQL> alter system set ASM_DISKSTRING=''/dev/oracleasm/disks/*';
- now, I will configure ASM with dbca. I choose Configure Automatic Storage Management, and give the group disk with DGROUP1 and choose all of ASMD* as the members.
- Now, with dbca I can create a new database which is using ASM as the database storage.