[pve-devel] Problems creating live snapshot

Michael Rasmussen mir at datanom.net
Wed Jun 7 18:21:41 CEST 2017


On Wed, 7 Jun 2017 12:36:43 +0200 (CEST)
Dietmar Maurer <dietmar at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20170607/c1a7c25a/attachment.sig>


More information about the pve-devel mailing list