iSCSI and enable disks for ASM

Helpful tips for my iSCSI storage buds that want to enable/provision disks for ASM

# get initiator name of host or hosts
cat /etc/iscsi/initiatorname.iscsi

# create volume on san and present to host
login to san, create volume, add initator(s) to access

# get wwid for each disk and update alias in multipath.conf
multipath -ll
or
scsi_id -g -u -s /block/sdd

# create partiton on dev
fdisk /dev/mapper/DATA18

# add device map from partition table and verify it can be seen
kpartx -a /dev/mapper/DATA18
kpartx -l /dev/mapper/DATA18

# set partition alignment
echo “2048,,” | sfdisk -uS /dev/mapper/DATA18

# create the asm disk
oracleasm createdisk DATA18 /dev/mapper/DATA18p1

#verify you can see disk
oracleasm scandisks
oracleasm listdisks