Professional Documents
Culture Documents
asmdba
[root@localhost grid]# groupadd
asmoper
[root@localhost grid]# groupadd
asmadmin
[root@localhost grid]# groupadd
dba
[root@localhost grid]# groupadd
oinstall
useradd oracle
[root@localhost grid]# usermod -g oinstall -G dba,asmdba oracle
[root@localhost grid]# usermod -g oinstall -G asmdba,asmoper,asmadmin,dba grid
[root@ASM1 grid]# id oracle grid
uid=500(oracle) gid=501(oinstall) groups=501(oinstall),500(dba),503(asmdba)
uid=501(grid) gid=501(oinstall)
groups=501(oinstall),503(asmdba),504(asmoper),505(asmadmin)
Populate /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
$oracleasm createdisk
$oracleasm configure -i grid,asmadmin,y,y
$oracleasm init
$oracleasm status
$oracleasm scandisks
$oracleasm listdisks
$./asmca = create disk groups
Create three RAW Disks: use FDISK
fdisk /dev/sda
/dev/sda7 3462 3711 2008093+ 83 Linux
/dev/sda8 3712 5536 14659281 83 Linux
/dev/sda9 5537 6145 4891761 83 Linux
Change Disk Ownership:
oracle_home/bin
-rwsr-s--x 1 oracle oinstall 210824714 Mar 12 04:53 oracle
chmod 6751 oracle
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
modprobe oracleasm
$ls -l /dev/oracleasm/disks
CRSVOL - 2 GB
DATAVOL - 15GB
FRAVOL - 5Gb
grid_home/bin> ./asmca
conn / as sysasm
alter system set asm_diskstring='/dev/sdb*','/dev/sdc*','/dev/sdd*';
===================================================================================
.bash_profile - for Oracle user;
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.4/db_1; export ORACLE_HOME
ORACLE_SID=ORCL; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export
CLASSPATH
#LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNEL
===================================================================================
==
.bash_profile - for grid user;
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/11.2.0/grid
ORACLE_SID=+ASM
ORACLE_TERM=Xterm
PATH=$PATH:$HOME/bin
Start Installation:
$xhost +
$./runInstaller
= Select Extended Disk - CRSVOL _ other two volumes will be used for database and
flash recovery area while creating database.
As Grid User:
./crsctl stop has ( to stop HAS high availity services )
./crsctl start has
To Manage Disk:
$./asmcmd
DataPump:
select name from V$TABLESPACE;
create directory DB_PUMP as '/DataPump';
expdp system/oracle DIRECTORY=DB_DUMP DUMPFILE=orcl.dmp LOGFILE=full_exp_orcl.log
FULL=YES;
=====================================================================
Device "/dev/sdb1" is already labeled for ASM disk
Solution : dd if=/dev/zero of=/dev/sdb1 bs=1024 count=4