DBA Hub

📋Steps in this guide1/8

oracleasm utility for ASMLIB - DBACLASS DBACLASS

ASMlib driver is required on  Linux operating systems, to enable a disk readable by ASM. Without ASMLIB, disks can’t be used at asm disks. Below are the steps for configuring ASMlib and marking disks as ASM.   Download Asmlib: You can download these rpm packages directly from OTN: http://www.oracle.com/technetwork/server-storage/linux/downloads/index-088143.html Else, if your system is registered

oracle clusteringintermediate
by OracleDba
13 views
1

Overview

ASMlib driver is required on  Linux operating systems, to enable a disk readable by ASM. Without ASMLIB, disks can’t be used at asm disks. Below are the steps for configuring ASMlib and marking disks as ASM. - Download Asmlib:
2

Section 2

You can download these rpm packages directly from OTN: http://www.oracle.com/technetwork/server-storage/linux/downloads/index-088143.html Else, if your system is registered with ULN, then you can download directly using yum as below. 2. Configure oracleasm:[ Do on all nodes if RAC]

Code/Command (click line numbers to comment):

1
2
3
- Run as root on the database server

yum install oracleasm-support oracleasmlib oracleasm-`uname -r`
3

Section 3

3. Start oracleasm:[ Do on all nodes ] Now as we have configured and started the oracleasm , we can proceed with making the disks as ASM disk.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[root$mapper]#  /etc/init.d/oracleasm init
[root$mapper]#  /etc/init.d/oracleasm configure -i
Configuring the Oracle ASM library driver.

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  without typing an
answer will keep that current value.  Ctrl-C will abort.

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) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:               [  OK  ]

# /etc/init.d/oracleasm start
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:               [  OK  ]
4

Section 4

> NOTE – > IF oracleasm start command is not working, then use oracleasm init command. NOTE – > IF oracleasm start command is not working, then use oracleasm init command. 4.Create ASM disk [ Do only from one node ]
5

Section 5

Createdisk need to be run only from one node 5.Now list and scan the disks [ On all the nodes ] Once disk is created, you need to scan the disks using scandisks on all the nodes,

Code/Command (click line numbers to comment):

1
2
3
4
5
# /etc/init.d/oracleasm createdisk MGMTP1 /dev/mapper/mpathup1
Marking disk "MGMTP1" as an ASM disk:                      [  OK  ]

#  /etc/init.d/oracleasm scandisks
#  /etc/init.d/oracleasm listdisks
6

Section 6

Now, these ASM disks are ready to be added to ASM disk group. automatic start can be enabled or disabled with the ‘enable’ and ‘disable’ options to /etc/init.d/oracleasm: Delete asmdisk

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- Enable 
                                     
# /etc/init.d/oracleasm disable
  Writing Oracle ASM library driver configuration            [  OK  ]
  Unmounting ASMlib driver filesystem                        [  OK  ]
  Unloading module "oracleasm"                               [  OK  ]

-- Disable 

# /etc/init.d/oracleasm enable
  Writing Oracle ASM library driver configuration            [  OK  ]
  Loading module "oracleasm"                                 [  OK  ]
  Mounting ASMlib driver filesystem                          [  OK  ]
  Scanning system for ASM disks                              [  OK  ]
7

Section 7

Disks that are no longer used by ASM can be unmarked using deletedisk command oracleasm deletedisk Check whether a disk is already marked for asm or not:

Code/Command (click line numbers to comment):

1
2
3
4
oracleasm deletedisk OCRVD1

[root~]# oracleasm querydisk /dev/emcpowerac1
Device "/dev/emcpowerac1" is marked an ASM disk with the label "REDO1"
8

Section 8

Get physical disk details with ASM DISK NAMES: blkid command will give information about the physical disks and respective asmdisk label name

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[rootmapper]# /sbin/blkid 
/dev/sdm1: LABEL="REDO06" TYPE="oracleasm"
/dev/sdp1: LABEL="REDO04" TYPE="oracleasm"
/dev/sds1: LABEL="REDO03" TYPE="oracleasm"
/dev/sdv1: LABEL="REDO01" TYPE="oracleasm"
/dev/sdy1: LABEL="REDO05" TYPE="oracleasm"
/dev/sdab1: LABEL="REDO02" TYPE="oracleasm"
/dev/sdjn1: LABEL="REDO04" TYPE="oracleasm"
/dev/sdjk1: LABEL="REDO06" TYPE="oracleasm"
/dev/sdjq1: LABEL="REDO03" TYPE="oracleasm"
/dev/sdjt1: LABEL="REDO01" TYPE="oracleasm"
/dev/sdjw1: LABEL="REDO05" TYPE="oracleasm"
/dev/sdjz1: LABEL="REDO02" TYPE="oracleasm"
/dev/mapper/mpathop1: LABEL="REDO04" TYPE="oracleasm"
/dev/mapper/mpathup1: LABEL="REDO01" TYPE="oracleasm"
/dev/mapper/mpathyp1: LABEL="REDO05" TYPE="oracleasm"
/dev/mapper/mpathsp1: LABEL="REDO03" TYPE="oracleasm"
/dev/mapper/mpathmp1: LABEL="REDO06" TYPE="oracleasm"
/dev/mapper/mpathalp1: LABEL="REDO02" TYPE="oracleasm"

Comments (0)

Please to add comments

No comments yet. Be the first to comment!