How to Identify the LUN ID Associated with an Instance Volume

Problem

To identify the LUN ID on the backend storage that corresponds to a particular instance (VM) volume. This is useful for troubleshooting, storage mapping, and validating multipath connectivity.

Environment

  • Private Cloud Director Virtualization - v2025.4 and Higher
  • Private Cloud Director Kubernetes – v2025.4 and Higher
  • Self-Hosted Private Cloud Director Virtualization - v2025.4 and Higher
  • Component - Storage / Block Storage (Cinder, Multipath, LUN Mapping)

Procedure

  1. List the VM’s attached volumes

Run the following command on the compute node hosting the VM:

Command
Copy

The above command lists all block devices (disks) attached to the specified VM and shows their mapping to host devices.

In the above example output, we can see vdb is a block device mapped via multipath.

  1. Obtain the WWID of the multipath device

Identify the multipath name from Step 1 (mpathcq) and run:

Command
Copy
  • The WWID is 123123123123123abc25abc (this uniquely identifies the volume).
  • The devices (sdv, sdab, sdz) show their Host:Channel:Target:LUN (H:C:T:L) tuples.
  1. Identifying the LUN ID from above output
  • In the tuples 0:0:1:2 , 2:0:3:2 , 0:0:0:2 → the last number = LUN ID.
  • So, this volume maps to LUN ID 2 on the storage backend.
  1. We can also cross check using by-path
Command
Copy

Output will show a symlink including lun-2, confirming the backend LUN mapping.

Additional Information

  • In the SCSI address format Host:Channel:Target:LUN (H:C:T:L) , the last digit (L) represents the LUN ID.
  • virsh domblklist helps you trace which device (e.g., /dev/dm-*) is attached to a VM.
  • multipath -ll maps that device to its WWID and shows the backend paths, where you can identify the LUN ID.
  • /dev/disk/by-path/ provides human-readable symlinks, including names like lun-<N>, making it easier to confirm the LUN number.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard