$ udevadm info --query=all --name=/dev/sdX |  egrep "WWN|SERIAL"
E: ID_SERIAL=ST6000NM0004-1FFFFF_ZZZZAAAA
E: ID_SERIAL_SHORT=Z4D0HDFG
E: ID_WWN=0x5000c50000000000                              <<== Use this id
E: ID_WWN_WITH_EXTENSION=0x5000c50000000000

For dm-multipath devices, use DM_UUID (dm device Universally Unique IDentifier). 
This identifier is nominally based up the underlying device's WWID or serial number. 
Replace mpathX below with the dm-multipath name to be used as ASM disk.
$ udevadm info --query=all --name=/dev/mapper/mpathX |  grep -i "DM_UUID"
E: DM_UUID=mpath-36001405a02467a627a24e62afa3d506c         <<== Use this id

$ udevadm info --query=all --name=/dev/sdX | grep -i "ID_WWN"
E: ID_WWN=0x6001405a02467a62
E: ID_WWN_VENDOR_EXTENSION=0x7a24e62afa3d506c
E: ID_WWN_WITH_EXTENSION=0x6001405a02467a627a24e62afa3d506c
# sg_inq -p 0x83 /dev/sdX
VPD INQUIRY: Device Identification page
  Designation descriptor number 1, descriptor length: 20
    designator_type: NAA,  code_set: Binary
    associated with the addressed logical unit
      NAA 6, IEEE Company_id: 0x1405
      Vendor Specific Identifier: 0xa02467a62
      Vendor Specific Identifier Extension: 0x7a24e62afa3d506c
      [0x6001405a02467a627a24e62afa3d506c]

 

Create Rule(s): Create a udev rule file /etc/udev/rules.d/96-storage-asm.rules and add a udev rule for each disk or multipath device.

Apply Rule(s): As root, reload the udev service for the above changes to take effect and create the ASM disks. See "How to reload "udev rules" without restarting udev service? " for more complete steps.

# udevadm control --reload-rules
# udevadm trigger --type=devices --action=change
 

Leave a Reply

Your email address will not be published. Required fields are marked *