Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How to make LUN's visible manually if you are using ASM in Linux Evironment?

user-image
Question ajoutée par Utilisateur supprimé
Date de publication: 2016/10/17
Amr Ismail
par Amr Ismail , senior oracle DBA , شركه الحلول المتكامله للموانى

1-Download the appropriate ASMLib RPMs from OTN

oracleasm-support-2.1.3-1.el5.x_.rpm

oracleasmlib-2.0.4-1.el5.x_.rpm

oracleasm-2.6.-.el5-2.0.5-1.el5.x_.rpm

2-Install the packages using the following command.

rpm –Uvh oracleasm*.rpm

 3-Configure ASMLib using the following command.

# 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 <ENTER> without typing ananswer will keep that current value.  Ctrl-C will abort.

 

Default user to own the driver interface []: oracle

Default group to own the driver interface []: dba

Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]:

Writing Oracle ASM library driver configuration: done

4-Load the kernel module using the following command.

# /usr/sbin/oracleasm init

Loading module "oracleasm": oracleasm

Mounting ASMlib driver filesystem: /dev/oracleasm

5Mark the five shared disks as follows.

# /usr/sbin/oracleasm createdisk DISK1 /dev/sdb1

Writing disk header: doneInstantiating disk: done

# /usr/sbin/oracleasm createdisk DISK2 /dev/sdc1

Writing disk header: doneInstantiating disk: done

# /usr/sbin/oracleasm createdisk DISK3 /dev/sdd1

Writing disk header: doneInstantiating disk: done

# /usr/sbin/oracleasm createdisk DISK4 /dev/sde1

Writing disk header: doneInstantiating disk: done

# /usr/sbin/oracleasm createdisk DISK5 /dev/sdf1

Writing disk header: doneInstantiating disk: done

6-We can see the disk are now visible to ASM using the "listdisks" command.

# /usr/sbin/oracleasm listdisks

DISK1

DISK2

DISK3

DISK4

DISK5

 

 

 

 

Oluwaseun Dada
par Oluwaseun Dada , Team Lead, Technical and Solution Architect , INLAKS LTD

ASM does not care what the name or device numbers are of a block device, neither does it care whether it is a full disk, a partition, or some other type of device as long as it behaves as a block device under Linux (and probably other UNIX flavors). It does not need partition tables at all but writes its own disk signatures to the volumes it gets.

Imaul Mazid
par Imaul Mazid , Technical Lead , Bharti Airtel Ltd

by using ACFS (ASM cluster File System) and ADVM (ASM Dynamic Volume Manager)

Mahmoud Abdel Aal
par Mahmoud Abdel Aal , SUPPORT ENGINEER , Oracle

You can use the "/etc/init.d/oracleasm querydisk -p  <DISK_NAME>" command.

 

Example :

/etc/init.d/oracleasm querydisk -p DATA_DSK1

Disk "DATA_DSK1" is a valid ASM disk

/dev/sdi1: LABEL="DATA_DSK1" TYPE="oracleasm" 

Mohamed Hassan
par Mohamed Hassan , Database Administrator , EML Payment Solutions Ltd

Hi,

 

You can run the below script using the OS user account that owns Grid Infrastructure. This will map ASM disks to the underlying LUNS:

 

Note: Do Not run this script on a production environment until you test it first on a production-like environment and make sure that it is compatible with your platform and OS and does not cause any outages.

 

#!/bin/bash 

for asmlibdisk in `ls /dev/oracleasm/disks/*` 

do 

echo "ASMLIB disk name: $asmlibdisk" 

asmdisk=`kfed read $asmlibdisk | grep dskname | tr -s ' '| cut -f2 -d' '` 

echo "ASM disk name: $asmdisk" 

majorminor=`ls -l $asmlibdisk | tr -s ' ' | cut -f5,6 -d' '` 

device=`ls -l /dev | tr -s ' ' | grep -w "$majorminor" | cut -f10 -d' '` 

echo "Device path: /dev/$device" 

done 

 

 

yoges varan
par yoges varan , Hewlett Packard

run asmca then you can view the Lun's

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?