On Wed, 7 Jun 2017 12:36:43 +0200 (CEST)
Dietmar Maurer <diet...@proxmox.com> wrote:

> > We allocate the snapshot file on an active storage, so it should not 
> > be necessary to activate it again.
> > 
> > Note: see __snapshot_save_vmstate and foreach_writable_storage  
> 
> So the storage can be assumed to be active. The state volume itself if 
> activated before we use it (see posting from fabian).
> 
I found the problem. It was Fabian which pointed me in the right
direction.

The problematic part in activate_volume:
# Add new LUN's to session
os_request("iscsiadm -m session -r $sid -R", 0, 60);
# Remove all LUN's from session which is not currently active
deactivate_luns($scfg, $volname, $active_luns);

It seems related to a timing between UDEV is called to create a link and when 
this link is actually available so adding a sleep 1 sorts this out. When you do 
a --login to target this is no problem since the call to login will not return 
until all LUN symlinks are created.

# Add new LUN's to session
os_request("iscsiadm -m session -r $sid -R", 0, 60);
sleep 1;
# Remove all LUN's from session which is not currently active
deactivate_luns($scfg, $volname, $active_luns);


-- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
/usr/games/fortune -es says:
The urge to gamble is so universal and its practice so pleasurable
that I assume it must be evil.
                -- Heywood Broun

Attachment: pgpjO1Fj2F0q9.pgp
Description: OpenPGP digital signature

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to