Knowledge Base
2025.10
GENERIC
Networking
Storage
Compute
Designate
Orchestration
Self-Hosted
Install
UPGRADE
Monitoring
Add-Ons
Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
How to Identify the LUN ID Associated with an Instance Volume
Summarize Page
Copy Markdown
Open in ChatGPT
Open in Claude
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
- List the VMβs attached volumes
Run the following command on the compute node hosting the VM:
Command
βx
$ virsh domblklist <DOMAIN_ID>βExample output: β$ virsh domblklist vm-101βTarget Source------------------------------------------------vda /var/lib/libvirt/images/vm1.qcow2vdb /dev/disk/by-id/dm-name-mpathcqThe 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.
- Obtain the WWID of the multipath device
Identify the multipath name from Step 1 (mpathcq) and run:
Command
$ multipath -ll | grep -A5 <DM-NAME>βExample output:β$ multipath -ll | grep -A5 mpathcqβmpathcq (123123123123123abc25abc) dm-9 3PARdata,VVsize=50G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw`-+- policy='round-robin 0' prio=50 status=active |- 0:0:1:2 sdv 65:80 active ready running |- 2:0:3:2 sdab 65:176 active ready running |- 0:0:0:2 sdz 65:144 active ready running- 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.
- 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.
- We can also cross check using by-path
Command
$ ls -l /dev/disk/by-path/ | grep <DEVICE-NAME>βExample output: β$ ls -l /dev/disk/by-path/ | grep sdvβlrwxrwxrwx 1 root root 9 Aug 20 10:15 pci-0000:3b:00.0-fc-0x1235000abc-lun-2 -> ../../sdvOutput 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 domblklisthelps you trace which device (e.g., /dev/dm-*) is attached to a VM.multipath -llmaps 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
Last updated on
Was this page helpful?
Next to read:
Change Default Volume Type for Block StorageDiscard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message