Oracleasm - Utility of ASMLIB

Oracleasm - Utility of ASMLIB

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.

  1. Download Asmlib:

You can download these rpm packages directly from OTN:

Oracle ASMLib Downloads for Oracle Linux 8

Else, if your system is registered with ULN, then you can download directly using yum as below.

- Run as root on the database server
yum install oracleasm-support oracleasmlib oracleasm-`uname -r`        

??2. Configure oracleasm:[ Do on?all nodes if RAC]

[root$raul_lab]# /etc/init.d/oracleasm init
[root$raul_lab]# /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 []: grid
Default group to own the driver interface []: asmadmin
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 ]        

????3. Start oracleasm: [ Do on all nodes ]

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

Now as we have configured and started the?oracleasm, we can proceed with making the disks as ASM disk.

4.Create ASM disk [ Do only from one node ]

Createdisk need to be run only from one node

# /etc/init.d/oracleasm createdisk DATA1 /dev/sda1
Marking disk "DATA1" as an ASM disk: [ OK ]        

??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:

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

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:

-- 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 ]        

Delete asmdisk

Disks that are no longer used by ASM can be unmarked using deletedisk command oracleasm deletedisk

oracleasm deletedisk VOTING02        

Check whether a disk is already marked for asm or not:

[root$raul_lab]# oracleasm querydisk /dev/sdb1
Device "/dev/sdb1" is marked an ASM disk with the label "DATA02"        

Get physical disk details with ASM DISK NAMES:

[root$raul_lab]# /sbin/blkid
/dev/sda1: LABEL="DATA01" TYPE="oracleasm"
/dev/sdb1: LABEL="DATA02" TYPE="oracleasm"
/dev/sdc1: LABEL="DATA03" TYPE="oracleasm"
/dev/sdd1: LABEL="FRA01" TYPE="oracleasm"
/dev/sde1: LABEL="FRA02" TYPE="oracleasm"
/dev/sdf1: LABEL="FRA03" TYPE="oracleasm"
/dev/sdg1: LABEL="FRA04" TYPE="oracleasm"
/dev/sdh1: LABEL="VOTING01" TYPE="oracleasm"
/dev/sdi1: LABEL="ACFS01" TYPE="oracleasm"
/dev/sdj1: LABEL="REDO01" TYPE="oracleasm"
/dev/sdk1: LABEL="REDO02" TYPE="oracleasm"
/dev/sdl1: LABEL="REDO03" TYPE="oracleasm"        







要查看或添加评论,请登录

Raul Pessoa, MBA的更多文章

社区洞察

其他会员也浏览了