Now, I use localConnector to connect volume. The return info of initialize_connection is:
{'driver_volume_type': 'local',
'data': {'device_path': '/dev/disk/by-id/wwn-0x*'}}
Normally, there is no problem with this path.But while a VM is running with high IO on the node, we find the path(/dev/disk/by-id/wwn-0x*) will not generate, so that the path cannot be found when attach volume to the VM.
Here is the log:
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [req-56899fa0-2397-466f-b3e3-7c60a106bf2d 6c206dbc4c444cfd83f1589a53111d89 9b6ef46a629444adbf2af9b061235e95 - default default] [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] Driver failed to attach volume c2d369af-5ef7-4f9b-aa55-aa1ee676524c at /dev/vdc: libvirtError: Cannot access storage file '/dev/disk/by-id/wwn-0x6888603000000049f44c68e027145106': No such file or directory
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] Traceback (most recent call last):
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 567, in _volume_attach
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] device_type=self['device_type'], encryption=encryption)
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1568, in attach_volume
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] encryption=encryption)
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] self.force_reraise()
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] six.reraise(self.type_, self.value, self.tb)
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1541, in attach_volume
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] guest.attach_device(conf, persistent=True, live=live)
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/guest.py", line 306, in attach_device
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] self._domain.attachDeviceFlags(device_xml, flags=flags)
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 190, in doit
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] result = proxy_call(self._autowrap, f, *args, **kwargs)
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 148, in proxy_call
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] rv = execute(f, *args, **kwargs)
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 129, in execute
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] six.reraise(c, e, tb)
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 83, in tworker
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] rv = meth(*args, **kwargs)
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] File "/usr/lib64/python2.7/site-packages/libvirt.py", line 605, in attachDeviceFlags
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] if ret == -1: raise libvirtError ('virDomainAttachDeviceFlags() failed', dom=self)
2020-03-03 11:28:54.710 21843 ERROR nova.virt.block_device [instance: ac41cb7f-ecc2-4530-a3a0-45beae36f54e] libvirtError: Cannot access storage file '/dev/disk/by-id/wwn-0x6888603000000049f44c68e027145106': No such file or directory