* [linux-lvm] Restoring snapshot gone bad
@ 2017-09-22 6:03 Mauricio Tavares
2017-09-22 8:11 ` Zdenek Kabelac
2017-09-22 8:30 ` Xen
0 siblings, 2 replies; 3+ messages in thread
From: Mauricio Tavares @ 2017-09-22 6:03 UTC (permalink / raw)
To: LVM general discussion and development
I have a lv, vmzone/desktop that I use as drive for a kvm guest;
nothing special here. I wanted to restore its snapshot so like I have
done many times before I shut guest down and then
lvconvert --merge vmzone/desktop_snap_20170921
Logical volume vmzone/desktop is used by another device.
Can't merge over open origin volume.
Merging of snapshot vmzone/desktop_snap_20170921 will occur on next activation
of vmzone/desktop.
What is it really trying to tell me? How to find out which other
device is using it?
lvdisplay tells me that
lvdisplay /dev/vmzone/desktop
--- Logical volume ---
LV Path /dev/vmzone/desktop
LV Name desktop
VG Name vmzone
LV UUID 3hcB1L-rIRf-PHZQ-I55F-ZXhT-SnSZ-vThO8U
LV Write Access read/write
LV Creation host, time duocismj01e9se, 2017-06-29 15:07:12 -0400
LV snapshot status source of
desktop_snap_20170921 [active]
LV Status available
# open 2
LV Size 100.00 GiB
Current LE 25600
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:6
When I do plain old lvs (or lvs -a -o +devices), the attribute entry
for the desktop looks like
desktop vmzone Owi-aos--- 100.00g
According to https://linux.die.net/man/8/lvs the "O" in Owi-aos--- means it
is merging a snapshot. But, what is its status? Based on how long it
has been that way, I think it is hung but I do not know what is
causing this hangup.
Suggestions?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Restoring snapshot gone bad
2017-09-22 6:03 [linux-lvm] Restoring snapshot gone bad Mauricio Tavares
@ 2017-09-22 8:11 ` Zdenek Kabelac
2017-09-22 8:30 ` Xen
1 sibling, 0 replies; 3+ messages in thread
From: Zdenek Kabelac @ 2017-09-22 8:11 UTC (permalink / raw)
To: LVM general discussion and development, Mauricio Tavares
Dne 22.9.2017 v 08:03 Mauricio Tavares napsal(a):
> I have a lv, vmzone/desktop that I use as drive for a kvm guest;
> nothing special here. I wanted to restore its snapshot so like I have
> done many times before I shut guest down and then
>
> lvconvert --merge vmzone/desktop_snap_20170921
> Logical volume vmzone/desktop is used by another device.
> Can't merge over open origin volume.
> Merging of snapshot vmzone/desktop_snap_20170921 will occur on next activation
> of vmzone/desktop.
>
> What is it really trying to tell me? How to find out which other
> device is using it?
Hi
When you want merge a snapshot - origin must be an unused volume (so not
opened/mounted anywhere).
Merging process 'copies/restores' modified blocks in your origin volume - thus
i.e. filesystem would not be able to handle 'changes' happening underneath its
hands..
So if there are not condition which let you start snapshot merge, the
operation is delayed - likely your 'next' activation of your origin volume in
which case it's pretty sure there is no user so the merge can be started
(or you can 'lvchange --refresh')
>
> lvdisplay tells me that
>
> lvdisplay /dev/vmzone/desktop
> --- Logical volume ---
> LV Path /dev/vmzone/desktop
> LV Name desktop
> VG Name vmzone
> LV UUID 3hcB1L-rIRf-PHZQ-I55F-ZXhT-SnSZ-vThO8U
> LV Write Access read/write
> LV Creation host, time duocismj01e9se, 2017-06-29 15:07:12 -0400
> LV snapshot status source of
> desktop_snap_20170921 [active]
> LV Status available
> # open 2
^^^^
here you can see 'non-zero' open count
> LV Size 100.00 GiB
> Current LE 25600
> Segments 1
> Allocation inherit
> Read ahead sectors auto
> - currently set to 256
> Block device 252:6
>
> When I do plain old lvs (or lvs -a -o +devices), the attribute entry
> for the desktop looks like
>
> desktop vmzone Owi-aos--- 100.00g
>
> According to https://linux.die.net/man/8/lvs the "O" in Owi-aos--- means it
> is merging a snapshot. But, what is its status? Based on how long it
> has been that way, I think it is hung but I do not know what is
> causing this hangup.
Nothing is hanging - it's just postponed for next opportunity...
Progress of merging can be checked easily with command 'lvs'.
Note: while the merging is in progress - you can already use 'merged origin'
so i.e. if you merge snapshot of you 'root' volume - on reboot and next
activation you can already use 'merged' result while actually copying is
processed in the background and you can check its progress percentage.
Regards
Zdenek
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Restoring snapshot gone bad
2017-09-22 6:03 [linux-lvm] Restoring snapshot gone bad Mauricio Tavares
2017-09-22 8:11 ` Zdenek Kabelac
@ 2017-09-22 8:30 ` Xen
1 sibling, 0 replies; 3+ messages in thread
From: Xen @ 2017-09-22 8:30 UTC (permalink / raw)
To: linux-lvm
Mauricio Tavares schreef op 22-09-2017 8:03:
> I have a lv, vmzone/desktop that I use as drive for a kvm guest;
> nothing special here. I wanted to restore its snapshot so like I have
> done many times before I shut guest down and then
>
> lvconvert --merge vmzone/desktop_snap_20170921
> Logical volume vmzone/desktop is used by another device.
> Can't merge over open origin volume.
> Merging of snapshot vmzone/desktop_snap_20170921 will occur on next
> activation
> of vmzone/desktop.
>
> What is it really trying to tell me? How to find out which other
> device is using it?
Other people will have better answers but I think it will be hard to see
unless it is used by the device mapper for some target.
I hope there is a better answer.
But obviously the "o" means open volume (ie. mounted or something else)
and that means that if you can't find a way to close it next time you
boot the machine it will get merged?
I hope there is a good way to get your usage information (apart from
something like "lsof").
Regards.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-22 8:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 6:03 [linux-lvm] Restoring snapshot gone bad Mauricio Tavares
2017-09-22 8:11 ` Zdenek Kabelac
2017-09-22 8:30 ` Xen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).