Wednesday, October 31, 2012
Add a raw device to OracleASM on RedHat based Linux VMWare guest
- Add disk to server in vm ware console
- Sign onto the guest and rescan the host for the new disk
- echo "- - -" > /sys/class/scsi_host/host0/scan
- Run "fdisk -l" to verify the new disk name
- Partition the new disk
- fdisk /dev/sdX (where X is the letter of the new disk).
- Create a single primary partition that takes up the entire disk
- Find the next raw device number.
- ls -l /dev/raw
- Mark new disk as raw
- raw /dev/raw/rawY /dev/sdX1 (where rawY is the next number available in /dev/raw.)
- Stamp with ASM
- /etc/init.d/oracleasm createdisk VOLX /dev/sdX1 (VOLX is what you want to name the ASM volume. Ex: VOL1, REPOLOGS01, etc.
- Link raw device in correct database directory
- In our environment, each database instance has it's own directory under /u01/oradata/<instance name>
- ln -sf /dev/raw/rawY /u01/oradata/<instance name>/asmdiskX (where X is the same number as VOLX you gave it when stamped with ASM)
- Change permissions on /dev/raw/rawY. Needs to be owned by the oracle user and the oracle dba group. In our environment, the oracle user is oracle and the dba group is dba.
- chown oracle:dba /dev/raw/rawY
- chmod g+rw /dev/raw/rawY
- Modify udev so raw device holds permissions after reboot
- vi /etc/udev/rules.d/60-raw.rules
- Add the following line. Change rawY to whatever you named the raw device in /dev/raw:
- ACTION=="add", KERNEL=="rawY", OWNER="oracle", GROUP=="dba", MODE=="0660"
- Tell the DBA's their disk is ready.
Subscribe to:
Posts (Atom)