This content has been marked as final. Show 3 replies
If you do not have a RHEL subscription and support, why not using Oracle Linux 6 instead, which is free including updates and provides ASMLib support?
Regarding udev, perhaps it is best to explain it by an example:
Get the unique device name:
Create 2 partitions /dev/sdb1 and /dev/sdb2 using fdisk or parted, e.g.:
# /sbin/scsi_id -g -u -d /dev/sdb 1ATA_VBOX_HARDDISK_VB77dc9e66-e0db83a8
Create a rule file:
parted -s /dev/sdb mkpart primary 1MB 1000MB parted -s /dev/sdb mkpart primary 1000MB 100% # parted -s /dev/sdb print Model: ATA VBOX HARDDISK (scsi) Disk /dev/sdb: 8590MB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 1000MB 999MB primary 2 1000MB 8590MB 7590MB primary
# vi /etc/udev/rules.d/80-oracleasm.rules Enter the following data: KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB77dc9e66-e0db83a8", NAME="ORCLASM1", OWNER="oracle", GROUP="dba", MODE="0660"
Check the ORACLEASM1 device (/dev/sdb1):
Setup and mount /dev/sdb2:
# ls -l /dev/ORCLASM* brw-rw----. 1 oracle dba 8, 17 Dec 6 19:12 ORCLASM1
# mkfs.ext4 /dev/sdb2 # mkdir /mnt/sdb2 # mount /dev/sdb2 /mnt/sdb2 # blkid | grep sdb2 /dev/sdb2: UUID="c120fb64-02b4-46a0-944a-2ec1b7ab8c18" TYPE="ext4"
Oracle Linux will not be an option due to company policy (RH only).
Thanks for the hint with "$parent" - this way I can use partitioned disks as well (successfully tested).
Is it recommended to use a partition or is it recommended to use the unpartitioned disk (or does is simply not matter at all)?
btw, found a good page about this subject: http://www.oracle-base.com/articles/linux/udev-scsi-rules-configuration-in-oracle-linux-5-and-6.php
Thanks a lot,
Is it recommended to use a partition or is it recommended to use the unpartitioned disk (or does is simply not matter at all)?Apparently it does not matter for ASM as long as the partition is a primary partition.
As far as I'm aware, ASMLib requires the candidate disks to be partitioned. There is a separate OTN forum for Oracle ASM topics.