<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">I would assume that most linux distributions at this point in time support getting the wwids through:<br> ```cat /etc/multipath/wwids````</div><div>This can also be parsed out of multipath -ll<br>```<br></div><div dir="ltr">[USER ~]# multipath -ll<br>mpathak (26639613661623365) dm-3 FUSIONIO,ION LUN<br>size=2.7T features='3 queue_if_no_path pg_init_retries 50' hwhandler='1 alua' wp=rw<br>|-+- policy='queue-length 0' prio=50 status=active<br>| |- 7:0:0:1  sdb 8:16 active ready running<br>| `- 8:0:0:1  sdc 8:32 active ready running<br>`-+- policy='queue-length 0' prio=1 status=enabled<br>  |- 9:0:0:1  sdd 8:48 active ready running<br>  `- 10:0:0:1 sde 8:64 active ready running<br>[USER ~]# cat /etc/multipath/wwids | grep -i 26639613661623365<br>/26639613661623365/<br>```<br></div><div>However, I'm curious as to why you would need the wwid as most higher level python management libraries I've worked with are much more concerned with the disk or partition GUID,  LUN number, or some other ID for the disk.<br></div><div>Example:<br>```<br>[USER by-uuid]# ls -al<br>total 0<br>drwxr-xr-x. 2 root root 120 Mar 20 14:58 .<br>drwxr-xr-x. 5 root root 100 Mar 20 14:58 ..<br>lrwxrwxrwx. 1 root root  10 Mar 21 00:04 5b1c21dc-6f65-4d88-99a0-b30f76d08931 -> ../../dm-2<br>lrwxrwxrwx. 1 root root  10 Mar 21 00:04 72e5d3ab-d4b2-4d0a-8b77-ba9dd718871c -> ../../sda1<br>lrwxrwxrwx. 1 root root  10 Mar 21 00:04 df4b2a63-4a56-4173-ba82-45f567d1b5bf -> ../../dm-0<br>lrwxrwxrwx. 1 root root  10 Mar 21 00:04 fa3c2abb-d8d2-4a99-84d2-09f8204e429e -> ../../dm-1<br>[USER by-uuid]# pwd<br>/dev/disk/by-uuid<br><br>```<br></div><div>What do you need the WWID for as the multipath wwid may not be the best option for the application you are looking at?<br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 20, 2019 at 4:28 AM Sahid Orentino Ferdjaoui <<a href="mailto:sahid.ferdjaoui@canonical.com">sahid.ferdjaoui@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
The question is as indicated on title, what would be the best way to<br>
get the WWID of a multipath device, something which would work on any<br>
systems or storages.<br>
<br>
My idea was to read /sys/block/dm-X/name but someone indicated to me<br>
that may not be correct in some situation, like it seems that<br>
/lib/udev/scsi_id would not be correct either.<br>
<br>
To give a bit of context it's for an OpenStack library in Python.<br>
<br>
Thanks,<br>
s.<br>
<br>
--<br>
dm-devel mailing list<br>
<a href="mailto:dm-devel@redhat.com" target="_blank">dm-devel@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/dm-devel" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/dm-devel</a><br>
</blockquote></div>