Yih-Herng Chuang
2011-Aug-09 22:28 UTC
[libvirt-users] the naming convention libvirt names a block based storage volume
Seems like different libvirt versions generate a storage volume name in different format. We would like to learn how libvirt names a storage volume under a block based storage pool. So that we may properly extract the LUN identifier out of the volume name for now and in the future. On host A loaded with libvirt 0.8.7 # virsh vol-list SanPool1 Name Path ----------------------------------------- unit:0:0:11 /dev/disk/by-id/wwn-0x600a0b800013071a000035ec4e32b832 On host B loaded with libvirt 0.8.1 # virsh vol-list SanPool1 Name Path ----------------------------------------- 1.0.0.0 /dev/disk/by-id/wwn-0x60080e500017e1d40000d0b74d873b13 Regards, --Yih Yih-Herng Chuang IBM Center for Microsoft Technologies 3600 Carillon Point, Kirkland WA 98033 (DID) (425) 803-7285 (TIE) 977-7285 YihHerng at us.ibm.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20110809/4263470a/attachment.htm>
Daniel P. Berrange
2011-Aug-10 09:20 UTC
[libvirt-users] the naming convention libvirt names a block based storage volume
On Tue, Aug 09, 2011 at 03:28:50PM -0700, Yih-Herng Chuang wrote:> > > Seems like different libvirt versions generate a storage volume name in > different format. We would like to learn how libvirt names a storage > volume under a block based storage pool. So that we may properly extract > the LUN identifier out of the volume name for now and in the future. > > On host A loaded with libvirt 0.8.7 > # virsh vol-list SanPool1 > Name Path > ----------------------------------------- > unit:0:0:11 /dev/disk/by-id/wwn-0x600a0b800013071a000035ec4e32b832This is the new naming scheme which we plan to stick with long term. The key point of the naming scheme is that the name is stable across reboots, and across login/logout of iSCSI targets.> > On host B loaded with libvirt 0.8.1 > > # virsh vol-list SanPool1 > Name Path > ----------------------------------------- > 1.0.0.0 /dev/disk/by-id/wwn-0x60080e500017e1d40000d0b74d873b13This was the old method, which was broken, because we should not have been including the HBA number in the name (the leading '1' here). The HBA number changes every time you login to an iSCSI target, or everytime an NPIV HBA is created, so it resulted in an unstable name which changed frequently Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|