[linux-lvm] Unable to create snapshot due to failed merge of prior snapshot

Nathan Cuka nscuka at gmail.com
Sun Nov 23 20:06:53 UTC 2014


Hi Everyone,

I inadvertently created a situation where I deleted an LVM snapshot that
was pending a merge (yes - bonehead move). Now I can neither finish the
merge nor create a new snapshot on the original logical volume. When I try
to create a snapshot I get the following:

> root at ubuntu:~# lvcreate -s -n snap -L 15g /dev/sysvg/syslv
>    Snapshots of an origin that has a merging snapshot is not supported
>
>
and in dmesg I see the following logs:

> Nov 21 20:32:47 ubuntu kernel: [  721.210733] device-mapper: snapshots: Snapshot is marked invalid.
> Nov 21 20:32:47 ubuntu kernel: [  721.211641] device-mapper: snapshots: Snapshot is invalid: can't merge
> Nov 21 20:32:47 ubuntu kernel: [  721.233283] Buffer I/O error on device dm-4, logical block 16
> Nov 21 20:32:47 ubuntu kernel: [  721.233289] Buffer I/O error on device dm-4, logical block 16
>
>
This is not surprising as I did an lvremove of the snapshot (oops). If I do
an lvscan I get the following output:

> root at ubuntu:~# lvscan
>   ACTIVE            '/dev/uservg/userlv' [931.50 GiB] inherit
>   inactive Original '/dev/sysvg/syslv' [152.77 GiB] inherit
>
>
And lvdisplay shows

> root at ubuntu:/# lvdisplay /dev/sysvg/syslv
>   --- Logical volume ---
>   LV Path                /dev/sysvg/syslv
>   LV Name                syslv
>   VG Name                sysvg
>   LV UUID                stuff here
>   LV Write Access        read/write
>   LV Creation host, time hades, 2014-07-09 14:56:49 +0000
>   LV snapshot status     source of
>                          pre-x [INACTIVE]
>   LV Status              available
>   # open                 0
>   LV Size                152.77 GiB
>   Current LE             39108
>   Segments               1
>   Allocation             inherit
>   Read ahead sectors     auto
>   - currently set to     256
>   Block device           252:3
>
>
So the snapshot status is INACTIVE and is trying to merge but I have no
idea how to make LVM try to stop attempting the merge. I can mount and use
the logical volume without apparent problem, but I really would like to be
able to take a snapshot (which is why I wanted to use LVM in the first
place!)

I think that I need to us a lower level tool like dmsetup to accomplish
this but I am not sure how to use this tool and would prefer not to blow
away root if possible (not the end of the world, but would prefer not too).
With dmsetup I have the following info:

> root at ubuntu:/# dmsetup status /dev/sysvg/syslv
> 0 320372736 snapshot-merge Invalid
>
>
And

> root at ubuntu:/# dmsetup info /dev/sysvg/syslv
> Name:              sysvg-syslv
> State:             ACTIVE
> Read Ahead:        256
> Tables present:    LIVE
> Open count:        0
> Event number:      0
> Major, minor:      252, 3
> Number of targets: 1
> UUID: stuff here
>
>
I have looked extensively on the intertubes and either my google kung-fu is
slipping or I have reached toxic levels of caffeine (or both) and can't
find much. Does anyone have any advice about how to restore LVM snapshoting
for me?


System:

> root at hades:~$ uname -a
> Linux hades 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
>
>
LVM info:

> root at ubuntu:/# lvm version
>   LVM version:     2.02.98(2) (2012-10-15)
>   Library version: 1.02.77 (2012-10-15)
>   Driver version:  4.27.0
>
>
TIA

- chook
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20141123/77cfbd65/attachment.htm>


More information about the linux-lvm mailing list