About

Martin Klier

usn-it.de

Make Linux Disk IDs Visible for UDEV (in VMware)

VMware is a factor

Times and syntaxes change, so it’s time to refresh an old blog post a bit. Especially VMware has established its place in the Oracle world, and it can be tricky to map disk IDs directly into the VM. Many sources recommend to use the SCSI addresses, but I learned to never trust people who have to map devices and do not know for what they will be used.

A prime example is Oracle Real Application Cluster (RAC) – maybe you want a simplified setup on VMware vSpehere in your lab. If you map the same (shared) disk with different SCSI IDs into two different machines, you won’t have too much fun if you think same SCSI ID means same disk. Sounds obvious?

Years ago, I wrote this post about using UDEV to detect Linux devices instead of using ASMlib. Or nowadays, the ASM Filter Driver, because both are surplus additional Oracle software pieces, delivering zero benefit.

Prepare VMware

It’s very simple:

  1. Set the Extended Parameter for the VM
    “disk.enableUUID=true”
    to get disk serial numbers exposed to the VM at all.
  2. If using shared disks (RAC), set SCSI Controller
    “SCSI Bus Sharing”= “Virtual”

You have to stop the VM to be able to change these settings.

Prepare any Linux

First: New Syntax. This applies for all Linux systems.
udevinfo is dead, today scan for device IDs with:

  • udevadm info –query=all –path=/sys/block/dm-1
  • lsblk -P -o NAME,MODEL,SERIAL,SIZE

Two examples for the /etc/udev/rules.d/99-storage.rules file:

  • Multipath
    KERNEL==”dm-“, ENV{DM_MPATH}==”360060e8016023d000001023d00000102″, SYMLINK+=”disk/by-id/ASMREDO1-1″, OWNER:=”oracle”, GROUP:=”oinstall”
  • SCSI
    KERNEL==”sd?”, ENV{ID_SERIAL}==”36000c29682376749c24d24fdf4ada978″, SYMLINK+=”disk/by-id/ASMOCW-1″, OWNER:=”oracle”, GROUP:=”oinstall”

Run detection and use the rules:
udevadm trigger

I hope this helps, stay safe and consistent
Martin

ORATOP in Oracle 19c
Oracle PGA Analysis Query

2 thoughts on “Make Linux Disk IDs Visible for UDEV (in VMware)

  1. Hello! Was wondering if there were any new information for 2021… I am trying to gather the serial number from the vmware side, but I am a Linux engineer…

    Before I go asking to have things turned on, I need to make sure that nothing has changed since 2019…

    Any help would be much appreciated…

    Thanks
    Ed

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.