أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
rpm –Uvh oracleasm*.rpm
# 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
# /usr/sbin/oracleasm init
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm
# /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
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.
by using ACFS (ASM cluster File System) and ADVM (ASM Dynamic Volume Manager)
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"
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
run asmca then you can view the Lun's