[libvirt-users] iSCSI storage pool autostart

Hello everyone, I have recently installed libvirt 1.0.0 and am having a problem with my iSCSI storage pool's autostarting. They are just going to an inactive state right after a reboot of the host. However once the startup is complete I can manually start the pool without problem. I am getting the following errors in the libvirtd.log file but they don't really give me much as to what could be causing this. I also looked in the messages log file but didn't find anything that looked useful. *2012-11-27 20:06:50.845+0000: 1358: error : virCommandWait:2287 : internal error Child process (/sbin/iscsiadm –mode session) unexpected exit status 21 * *2012-11-27 20:06:50.890+0000: 1358: error : virCommandWait:2287 : internal error Child process (/sbin/iscsiadm –mode session) unexpected exit status 21 * *2012-11-27 20:07:10.159+0000: 1358: error : virCommandWait:2287 : internal error Child process (/sbin/iscsiadm –mode discovery –type sendtargets –portal 192.168.220.50:3260,1) unexpected exit status 4* *2012-11-27 20:07:10.159+0000: 1358: error : storageDriverAutostart:101 : Failed to autostart storage pool ‘stoPool01′: internal error Child process (/sbin/iscsiadm –mode discovery –type sendtargets –portal 192.168.220.50:3260,1) unexpected exit status 4* If anyone has any ideas what is causing this it would be a great help. If you need more information let me know. Thanks, Darcy

On Sun, Dec 2, 2012 at 12:31 AM, rh ev <watchlist@deltavm.com> wrote:
Hello everyone,
I have recently installed libvirt 1.0.0 and am having a problem with my iSCSI storage pool's autostarting. They are just going to an inactive state right after a reboot of the host. However once the startup is complete I can manually start the pool without problem.
I am getting the following errors in the libvirtd.log file but they don't really give me much as to what could be causing this. I also looked in the messages log file but didn't find anything that looked useful.
*2012-11-27 20:06:50.845+0000: 1358: error : virCommandWait:2287 : internal error Child process (/sbin/iscsiadm –mode session) unexpected exit status 21* *2012-11-27 20:06:50.890+0000: 1358: error : virCommandWait:2287 : internal error Child process (/sbin/iscsiadm –mode session) unexpected exit status 21* *2012-11-27 20:07:10.159+0000: 1358: error : virCommandWait:2287 : internal error Child process (/sbin/iscsiadm –mode discovery –type sendtargets –portal 192.168.220.50:3260,1) unexpected exit status 4* *2012-11-27 20:07:10.159+0000: 1358: error : storageDriverAutostart:101 : Failed to autostart storage pool ‘stoPool01′: internal error Child process (/sbin/iscsiadm –mode discovery –type sendtargets –portal 192.168.220.50:3260,1) unexpected exit status 4*
If anyone has any ideas what is causing this it would be a great help. If you need more information let me know.
Thanks,
Darcy
Hi again everyone. Sorry to answer my own question but I found the solution. Isn't that the way, right after you post to the mailing list its solved! Anyway I found this thread from a couple years ago and it talks about it being an ARP issue ( https://www.redhat.com/archives/libvirt-users/2010-March/msg00038.html). I enabled portfast on my switch ports that connects to my hosts and this solved it. I guess my servers can restart faster than my switch ports. -Darcy

Anyway I found this thread from a couple years ago and it talks about it being an ARP issue ( https://www.redhat.com/archives/libvirt-users/2010-March/msg00038.html). I enabled portfast on my switch ports that connects to my hosts and this solved it. I guess my servers can restart faster than my switch ports.
Nice find. I learned that storage pools that do not see their LUNs cannot be started. So, I cooked up a different approach. The dependency for me was that Red Hat does not automatically instantiate virtual HBAs upon reboot, so I had to accomplish it via a shell script in rc.local. The overview for me was: 1. Host boots, libvirt starts normally and fails to start the storage pools because the storage paths don't yet exist. 2. rc.local script runs, performing the following actions: - build virtual HBAs (one pair per VM) - stop libvirt - start libvirt After that point, the storage pools start correctly and the VMs associated with those storage pools start automatically. In essence, I'm able to "automatically" start VMs when the host reboots.

On 2012年12月03日 07:47, mdecheser@comcast.net wrote:
Anyway I found this thread from a couple years ago and it talks about it being an ARP issue ( https://www.redhat.com/archives/libvirt-users/2010-March/msg00038.html). I enabled portfast on my switch ports that connects to my hosts and this solved it. I guess my servers can restart faster than my switch ports.
Nice find. I learned that storage pools that do not see their LUNs cannot be started. So, I cooked up a different approach.
<...> The dependency for me was that Red Hat does not automatically instantiate virtual HBAs upon reboot, </...> It's on my TODO plate, things will be changed soon. Regards, Osier
participants (3)
-
mdecheser@comcast.net
-
Osier Yang
-
rh ev