ASM Whole
ASM Whole
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-261, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-261, default 261):
Using default value 261
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
4. [root@localhost dev]# ll sd*
brw-r----- 1 root disk 8, 0 Aug 17 11:21 sda
brw-r----- 1 root disk 8, 1 Aug 17 11:22 sda1
brw-r----- 1 root disk 8, 2 Aug 17 11:21 sda2
brw-r----- 1 root disk 8, 3 Aug 17 11:22 sda3
brw-r----- 1 root disk 8, 16 Aug 17 11:43 sdb
brw-r----- 1 root disk 8, 17 Aug 17 11:43 sdb1
brw-r----- 1 root disk 8, 32 Aug 17 11:21 sdc
brw-r----- 1 root disk 8, 48 Aug 17 11:21 sdd
5. [root@localhost dev]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
1
Note:- the os user must have the primary group as oinstall and not primary group as dba
Default user to own the driver interface [test]: exam
Default group to own the driver interface [dba]: oinstall
Start Oracle ASM library driver on boot (y/n) [y]:
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:
[ OK ]
Scanning the system for Oracle ASMLib disks:
[ OK ]
[root@orawave6 common rpms]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "VOL1" as an ASM disk:
[ OK ]
[ OK ]
[ OK ]
ora.LISTENER.lsnr
ONLINE ONLINE
localhost
ora.asm
ONLINE ONLINE
localhost
Started
ora.ons
OFFLINE OFFLINE localhost
-------------------------------------------------------------------------------Cluster Resources
-------------------------------------------------------------------------------ora.cssd
1
ONLINE ONLINE
localhost
ora.diskmon
1
OFFLINE OFFLINE
ora.evmd
1
ONLINE ONLINE
localhost
[exam@localhost bin]$ clear
[exam@localhost bin]$ ./crsctl status resource -t
-------------------------------------------------------------------------------NAME
TARGET STATE
SERVER
STATE_DETAILS
-------------------------------------------------------------------------------Local Resources
-------------------------------------------------------------------------------ora.DATA.dg
ONLINE ONLINE
localhost
ora.LISTENER.lsnr
ONLINE ONLINE
localhost
ora.asm
ONLINE ONLINE
localhost
Started
ora.ons
OFFLINE OFFLINE localhost
-------------------------------------------------------------------------------Cluster Resources
-------------------------------------------------------------------------------ora.cssd
1
ONLINE ONLINE
localhost
ora.diskmon
1
OFFLINE OFFLINE
ora.evmd
1
ONLINE ONLINE
localhost
[exam@localhost bin]$ vi /etc/oratab
+ASM:/u02/exam/11.2.0:n
Asmdb:/u02/exam/11.2.0:n
/////////////////////////////////////////pfile creation //////////////////////////////////////////////
[exam@localhost dbs]$ cat initasmdb.ora
db_name=asmdb
db_create_file_dest='+DATA'
db_create_online_log_dest_1='+DATA'
undo_management=auto
sga_target=700m
////////////////////////////////////////////////////////////////////////////////////////////////////////
[exam@localhost bin]$ cd
[exam@localhost ~]$ cd 11.2.0/dbs
[exam@localhost dbs]$ vi initasmdb
[exam@localhost dbs]$ vi initasmdb.ora
[exam@localhost dbs]$ cd
[exam@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri Aug 22 16:06:27 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 732352512 bytes
Fixed Size
1339036 bytes
Variable Size
205521252 bytes
Database Buffers
520093696 bytes
Redo Buffers
5398528 bytes
SQL> create database asmdb;
Database created.
SQL> select name from v$database;
NAME
--------ASMDB
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
///////////////////////////////////////////// connecting to asm group /////////////////////////////
[exam@localhost ~]$ . oraenv
ORACLE_SID = [asmdb] ? +ASM
The Oracle base for ORACLE_HOME=/u02/asm/exam/11.2.0 is /u02/exam
[exam@localhost ~]$ asmcmd
ASMCMD> lsdg
State Type Rebal Sector Block
AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB
Offline_disks Voting_files Name
MOUNTED EXTERN N
512 4096 1048576 2047 1560
0
1560
0
DATA/
ASMCMD> ls
DATA/
ASMCMD> cd DATA/
ASMCMD> cd ASMDB/
ASMCMD> ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
////////////////////////////// list the no of clients using the asm instance ///////////////////////
ASMCMD> lsct
DB_Name Status Software_Version Compatible_version Instance_Name Disk_Group
asmdb CONNECTED
11.2.0.1.0
11.2.0.0.0 asmdb
DATA
//////////////////////////////////////////// shift ctrl tab /////////////////////////////////////
[root@localhost ~]# ps -ef|grep +ASM
exam 5406 1 0 13:05 ?
00:00:03 asm_pmon_+ASM
exam 5410 1 0 13:05 ?
00:00:00 asm_psp0_+ASM
exam 5415 1 0 13:05 ?
00:00:04 asm_vktm_+ASM
exam 5421 1 0 13:05 ?
00:00:00 asm_gen0_+ASM
exam 5425 1 0 13:05 ?
00:00:00 asm_diag_+ASM
exam 5429 1 0 13:05 ?
00:00:08 asm_dia0_+ASM
exam 5433 1 0 13:05 ?
00:00:00 asm_mman_+ASM
exam 5437 1 0 13:05 ?
00:00:00 asm_dbw0_+ASM
exam 5441 1 0 13:05 ?
00:00:00 asm_lgwr_+ASM
exam 5445 1 0 13:05 ?
00:00:00 asm_ckpt_+ASM
exam 5449 1 0 13:05 ?
00:00:00 asm_smon_+ASM
exam 5453 1 0 13:05 ?
00:00:00 asm_rbal_+ASM
exam 5457 1 0 13:05 ?
00:00:04 asm_gmon_+ASM
exam 5461 1 0 13:05 ?
00:00:00 asm_mmon_+ASM
exam 5465 1 0 13:05 ?
00:00:00 asm_mmnl_+ASM
exam 5470 1 0 13:05 ?
00:00:00 oracle+ASM
(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
exam 12824 1 0 16:15 ?
00:00:00 oracle+ASM_asmb_asmdb
(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
exam 13102 13092 0 16:23 ?
00:00:00 oracle+ASM
(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
root 13316 13285 0 16:30 pts/2 00:00:00 grep +ASM
////////////////////////////////////////////////////////////////////////////////////////////////////////////
ASMCMD> exit
[exam@localhost ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.3.0 Production on Fri Aug 22 16:37:10 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Automatic Storage Management option
2612
2047
ORCL:VOL2
2611
2047
FREE_MB TOTAL_MB
1739
2047
ORCL:VOL2
1740
2047
ORCL:VOL3
1744
2047
2612
2047
ORCL:VOL2
2611
2047
1738
2047
ORCL:VOL3
1743
2047