<div dir="ltr">Ops, forgot references:<div>[1] <a href="https://github.com/torvalds/linux/blob/1cc15701cd89b0ce695bbc5cff3a2bf3e2efd25f/include/uapi/linux/virtio_blk.h#L54" style="margin:0px;padding:0px;white-space:pre-wrap;font-family:"Helvetica Neue",Arial,sans-serif;font-size:12px">https://github.com/torvalds/linux/blob/1cc15701cd89b0ce695bbc5cff3a2bf3e2efd25f/include/uapi/linux/virtio_blk.h#L54</a></div><div>[2] <a href="https://github.com/torvalds/linux/blob/1cc15701cd89b0ce695bbc5cff3a2bf3e2efd25f/drivers/block/virtio_blk.c#L363" style="margin:0px;padding:0px;white-space:pre-wrap;font-family:"Helvetica Neue",Arial,sans-serif;font-size:12px">https://github.com/torvalds/linux/blob/1cc15701cd89b0ce695bbc5cff3a2bf3e2efd25f/drivers/block/virtio_blk.c#L363</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 16, 2018 at 2:35 PM, Zhenyu Zheng <span dir="ltr"><<a href="mailto:zhengzhenyulixi@gmail.com" target="_blank">zhengzhenyulixi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I meet a problem like this recently:</div><div><br></div><div>When attaching a volume to an instance, in the xml, the disk is described as:</div><div><br></div><div><img src="cid:ii_160fda1a828fd965" alt="Inline image 1" width="544" height="133"><br></div><div>where the serial number here is the volume uuid in Cinder. While inside the vm:</div><div>in /dev/disk/by-id, there is a link for /vdb with the name of "virtio"+truncated serial number:</div><div><br></div><div><img src="cid:ii_160fda307c55c366" alt="Inline image 2" width="544" height="49"><br></div><div><br></div><div>and according to <a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/2/html/Getting_Started_Guide/ch16s03.html" target="_blank">https://access.redhat.com/<wbr>documentation/en-US/Red_Hat_<wbr>Enterprise_Linux_OpenStack_<wbr>Platform/2/html/Getting_<wbr>Started_Guide/ch16s03.html</a></div><div><br></div><div>it seems that we will use this mount the volume.</div><div><br></div><div>The truncate seems to be happen in here [1][2] which is 20 digits.</div><div><br></div><div><b>My question here is: </b>if two volume have the identical first 20 digits in their uuids, it seems that the latter attached one will overwrite the first one's link:</div><div><img src="cid:ii_160fdaaa8ea95818" alt="Inline image 3" width="544" height="343"><br></div><div>(the above graph is snapshot for an volume backed instance, the virtio-15exxxxx was point to vda before, the by-path seems correct though)</div><div><br></div><div>It is rare to have the identical first 20 digits of two uuids, but possible, so what was the consideration of truncate only 20 digits of the volume uuid instead of use full 32?</div><div><br></div><div>BR,</div><div><br></div><div>Kevin Zheng</div></div>
</blockquote></div><br></div>