All of lore.kernel.org
 help / color / mirror / Atom feed
* snapshot-origin freezes system - what am I doing wrong?
@ 2015-05-15 10:45 Atom2
  2015-05-15 12:11 ` Zdenek Kabelac
  0 siblings, 1 reply; 7+ messages in thread
From: Atom2 @ 2015-05-15 10:45 UTC (permalink / raw)
  To: dm-devel

Hello list,
I am trying to setup a cow snapshot for a LV that is used as a master 
image for a number of VMs. The idea basically is to be able to update 
the master image even when VMs are up and running; the VMs should then 
still see the old state of the image and only when they are restarted 
they should connect to the new image.
Searching the net seemed to point towards a snapshot-origin/snapshot 
solution - however I am unable to get this to work. Information on the 
net seems to be sparse, so I though I'd ask the experts on the list. 
Here are my steps:

1.) I have a LV in volume group VG named master.ROOT 
(/dev/mapper/VG-master.ROOT), 8GB, formatted as ext4
2.) I create a sparese file: truncate -size=8G /tmp/snapshot
3.) losetup -f /tmp/snapshot --> gives /dev/loop0
4.) dmsetup create mytest.img --table "0 $(blockdev --getsz 
/dev/mapper/VG-master.ROOT) snapshot-origin /dev/mapper/VG-master.ROOT
5.) dmsetup create mytest.img.cow --table "0 $(blockdev --getsz 
/dev/loop0) snapshot /dev/mapper/VG-master.ROOT /dev/loop0 P 8"

So far so good ... however, when I try to mount the origin device by
6.) mount /dev/mapper/mytest.img
the mount call doesn't return and the system gets unresponsive/freezes 
up to a point when OOM-killer is being invoked. Login attempts on the 
console time out and in essence it is only possible to reboot the system 
using magic-sysreq key combinations.

I'd be very much obliged if someone in the know could provide me with 
information what's wrong with this approach.

Many thanks in advance Atom2


P.S. Trying to replicate the setup with a second loop device instead of 
the LV for the master image seems to not suffer from this problem - 
mounting is possible without a hickup. The issue therefore seems to be 
connecte with the LV as the snapshot-origin device, but I have no clue 
how to sort that.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-05-15 19:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-15 10:45 snapshot-origin freezes system - what am I doing wrong? Atom2
2015-05-15 12:11 ` Zdenek Kabelac
2015-05-15 16:47   ` Atom2
2015-05-15 17:58     ` Zdenek Kabelac
2015-05-15 18:48       ` Atom2
2015-05-15 18:56         ` Zdenek Kabelac
2015-05-15 19:23           ` Atom2

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.