All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] more vg problems or oddities...not using dmsetup remove seems to be bad?
@ 2011-09-12  0:44 Linda A. Walsh
  2011-09-12  3:04 ` Stuart D. Gathman
  2011-09-12  7:33 ` Ray Morris
  0 siblings, 2 replies; 8+ messages in thread
From: Linda A. Walsh @ 2011-09-12  0:44 UTC (permalink / raw)
  To: LVM general discussion and development



tried to remove an unmounted active snapshot.

lvremove said it wouldn't remove an active snapshot.

Tried -an -- can't change active snapshot.


Tried turning off monitoring --monitor -n
It gave no message
tried removing again...can't remove active snap

tried --ignoremonitoring

no message but still can't remove

tried -- merging it...

Said it couldn't merge with open origin,
then merging with origin on next activation...

Now still can't remove, but says "
  Can't remove merging snapshot logical volume "Home-2011.09.03-00.28.36"
...

decided to try dmsetup remove --

it couldn't remove it either -- resource/device busy...

So now I'm concerned...is it going to try to merge back any changes it 
recorded by reversing them?

i.e. put the original volume back the way it was when the snapshot started?

Says it couldn't do it on open volume -- does that mean it won't start 
this until I reboot,
then it will take a long time to become active?

seems like the dmsetup remove of the parts was the safest way to
kill off an active snapshot...but this feels contorted.

I'm wondering if I really want this 'merge' it wants to do...and if not, 
how do I abort
it?

Thanks!

(hoping system stays up until I get this sorted out!)...

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

* Re: [linux-lvm] more vg problems or oddities...not using dmsetup remove seems to be bad?
  2011-09-12  0:44 [linux-lvm] more vg problems or oddities...not using dmsetup remove seems to be bad? Linda A. Walsh
@ 2011-09-12  3:04 ` Stuart D. Gathman
  2011-09-12  3:14   ` Stuart D. Gathman
  2011-09-12  7:33 ` Ray Morris
  1 sibling, 1 reply; 8+ messages in thread
From: Stuart D. Gathman @ 2011-09-12  3:04 UTC (permalink / raw)
  To: LVM general discussion and development

On Sun, 11 Sep 2011, Linda A. Walsh wrote:

> tried to remove an unmounted active snapshot.
>
> lvremove said it wouldn't remove an active snapshot.
>
> Tried -an -- can't change active snapshot.

This is an annoying bug (IMHO).  Use lvremove -f (making sure it
really isn't open).

> Tried turning off monitoring --monitor -n
> It gave no message
> tried removing again...can't remove active snap
>
> tried --ignoremonitoring
>
> no message but still can't remove
>
> tried -- merging it...

Ooops.  You likely did not want that.  That reverts the origin volume
to the snapshot by copying the original data for updated sectors from
the snapshot.  This is an extremely useful feature, but *not* when
you invoke it accidentally!

> Now still can't remove, but says "
> Can't remove merging snapshot logical volume "Home-2011.09.03-00.28.36"
> ...

Correct.  You *don't* want to interrupt the merge.  That will just 
corrupt stuff.

> So now I'm concerned...is it going to try to merge back any changes it 
> recorded by reversing them?

Yes.

> i.e. put the original volume back the way it was when the snapshot started?

Yes.

> Says it couldn't do it on open volume -- does that mean it won't start this 
> until I reboot,
> then it will take a long time to become active?

Possibly.  I've never tried it on an open volume.

> I'm wondering if I really want this 'merge' it wants to do...and if not, how 
> do I abort it?

If it is really delayed until boot (or close), then you have a chance to abort
it, but I don't know how.  I hope an expert answers.  Meanwhile, I'll
peruse the man page to see if it talks about delayed merge.

--
 	      Stuart D. Gathman <stuart@bmsi.com>
     Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

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

* Re: [linux-lvm] more vg problems or oddities...not using dmsetup remove seems to be bad?
  2011-09-12  3:04 ` Stuart D. Gathman
@ 2011-09-12  3:14   ` Stuart D. Gathman
  2011-09-12  4:05     ` Linda A. Walsh
  2011-09-12  4:08     ` Linda A. Walsh
  0 siblings, 2 replies; 8+ messages in thread
From: Stuart D. Gathman @ 2011-09-12  3:14 UTC (permalink / raw)
  To: LVM general discussion and development

On Sun, 11 Sep 2011, Stuart D. Gathman wrote:

> On Sun, 11 Sep 2011, Linda A. Walsh wrote:
>
>> tried -- merging it...
>
> Ooops.  You likely did not want that.  That reverts the origin volume
> to the snapshot by copying the original data for updated sectors from
> the snapshot.  This is an extremely useful feature, but *not* when
> you invoke it accidentally!

>> I'm wondering if I really want this 'merge' it wants to do...and if not, 
>> how do I abort it?
>
> If it is really delayed until boot (or close), then you have a chance to 
> abort
> it, but I don't know how.  I hope an expert answers.  Meanwhile, I'll
> peruse the man page to see if it talks about delayed merge.

The man page says:

   If both the origin and snapshot volume are not open the merge will start
   immediately.   Otherwise, the  merge  will start the first time either the
   origin or snap??? shot are activated and both are closed.  Merging a snapshot
   into an  origin that cannot be closed, for example a root filesystem, is
   deferred until the next time the origin volume is  activated.  When  merging
   starts, the resulting logical volume will have the origin's name, minor
   number and UUID.  While  the  merge  is  in progress,  reads  or  writes  to
   the origin appear as they were directed to the snapshot being merged.  When
   the merge finishes, the merged snapshot is removed.  Multiple snapshots may
   be specified on the commandline or a @tag may be used to specify multi??? ple
   snapshots be merged to their respective origin.

If you have space, I would copy your origin LV while you can.  There is
nothing about cancelling the merge.  I suspect you could restore the metadata
backup from before your merge.  But make backups first!

--
 	      Stuart D. Gathman <stuart@bmsi.com>
     Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

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

* Re: [linux-lvm] more vg problems or oddities...not using dmsetup remove seems to be bad?
  2011-09-12  3:14   ` Stuart D. Gathman
@ 2011-09-12  4:05     ` Linda A. Walsh
  2011-09-12  4:08     ` Linda A. Walsh
  1 sibling, 0 replies; 8+ messages in thread
From: Linda A. Walsh @ 2011-09-12  4:05 UTC (permalink / raw)
  To: LVM general discussion and development

I might as well nuke the merge....I'd have to restore 2 images to 
restore all the files
to this morning....if something went bad, but if I wait around...

I can't see it merging block diffs on an actively mounted file system...that
would just be insane!

really seems like best thing would be to nuke the merge somehow, then 
wouldn't
have to resort to backups...

Restoring a TB of data takes a bit of time...

The file system it's trying to merge to is my home dir...
(where all my work goes...;-)...

But while past performance is no guarantee of future performance, currently
my system's uptime stands at 44 days, so it could be a while before said 
merge
happens, or ... could happen sooner if I 'try to fix it'....;-)
(power is on UPS, so usually reboots happen because I do something  -- 
usually planned,
but occasionally after shooting one's self in foot...)...

Since it can't start the merge...seems like there should be a way to 
stop it w/o causing problems.

**--case in point re:shooting self in foot -- merging 8 day old snap 
w/current vol in trying to
work around bugs...*sigh*

You may be right...the force option may be less painful that fixing this 
merge thing
if it goes south...




Stuart D. Gathman wrote:
> On Sun, 11 Sep 2011, Stuart D. Gathman wrote:
>
>> On Sun, 11 Sep 2011, Linda A. Walsh wrote:
>>
>>> tried -- merging it...
>>
>> Ooops.  You likely did not want that.  That reverts the origin volume
>> to the snapshot by copying the original data for updated sectors from
>> the snapshot.  This is an extremely useful feature, but *not* when
>> you invoke it accidentally!
>
>>> I'm wondering if I really want this 'merge' it wants to do...and if 
>>> not, how do I abort it?
>>
>> If it is really delayed until boot (or close), then you have a chance 
>> to abort
>> it, but I don't know how.  I hope an expert answers.  Meanwhile, I'll
>> peruse the man page to see if it talks about delayed merge.
>
> The man page says:
>
>   If both the origin and snapshot volume are not open the merge will 
> start
>   immediately.   Otherwise, the  merge  will start the first time 
> either the
>   origin or snap??? shot are activated and both are closed.  Merging a 
> snapshot
>   into an  origin that cannot be closed, for example a root 
> filesystem, is
>   deferred until the next time the origin volume is  activated.  When  
> merging
>   starts, the resulting logical volume will have the origin's name, minor
>   number and UUID.  While  the  merge  is  in progress,  reads  or  
> writes  to
>   the origin appear as they were directed to the snapshot being 
> merged.  When
>   the merge finishes, the merged snapshot is removed.  Multiple 
> snapshots may
>   be specified on the commandline or a @tag may be used to specify 
> multi??? ple
>   snapshots be merged to their respective origin.
>
> If you have space, I would copy your origin LV while you can.  There is
> nothing about cancelling the merge.  I suspect you could restore the 
> metadata
> backup from before your merge.  But make backups first!
>
> -- 
>           Stuart D. Gathman <stuart@bmsi.com>
>     Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 
> 591-6154
> "Confutatis maledictis, flammis acribus addictis" - background song for
> a Microsoft sponsored "Where do you want to go from here?" commercial.
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

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

* Re: [linux-lvm] more vg problems or oddities...not using dmsetup remove seems to be bad?
  2011-09-12  3:14   ` Stuart D. Gathman
  2011-09-12  4:05     ` Linda A. Walsh
@ 2011-09-12  4:08     ` Linda A. Walsh
  1 sibling, 0 replies; 8+ messages in thread
From: Linda A. Walsh @ 2011-09-12  4:08 UTC (permalink / raw)
  To: LVM general discussion and development

Here's a sadistic (or masochistic, maybe both, if I do it to myself)... 
question...

If I start a snapshot today... (or if one is already running)...

And the merge happens, will the snapshot take today have the
data to undo the merge?




Stuart D. Gathman wrote:
> On Sun, 11 Sep 2011, Stuart D. Gathman wrote:
>
>> On Sun, 11 Sep 2011, Linda A. Walsh wrote:
>>
>>> tried -- merging it...
>>
>> Ooops.  You likely did not want that.  That reverts the origin volume
>> to the snapshot by copying the original data for updated sectors from
>> the snapshot.  This is an extremely useful feature, but *not* when
>> you invoke it accidentally!
>
>>> I'm wondering if I really want this 'merge' it wants to do...and if 
>>> not, how do I abort it?
>>
>> If it is really delayed until boot (or close), then you have a chance 
>> to abort
>> it, but I don't know how.  I hope an expert answers.  Meanwhile, I'll
>> peruse the man page to see if it talks about delayed merge.
>
> The man page says:
>
>   If both the origin and snapshot volume are not open the merge will 
> start
>   immediately.   Otherwise, the  merge  will start the first time 
> either the
>   origin or snap??? shot are activated and both are closed.  Merging a 
> snapshot
>   into an  origin that cannot be closed, for example a root 
> filesystem, is
>   deferred until the next time the origin volume is  activated.  When  
> merging
>   starts, the resulting logical volume will have the origin's name, minor
>   number and UUID.  While  the  merge  is  in progress,  reads  or  
> writes  to
>   the origin appear as they were directed to the snapshot being 
> merged.  When
>   the merge finishes, the merged snapshot is removed.  Multiple 
> snapshots may
>   be specified on the commandline or a @tag may be used to specify 
> multi??? ple
>   snapshots be merged to their respective origin.
>
> If you have space, I would copy your origin LV while you can.  There is
> nothing about cancelling the merge.  I suspect you could restore the 
> metadata
> backup from before your merge.  But make backups first!
>
> -- 
>           Stuart D. Gathman <stuart@bmsi.com>
>     Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 
> 591-6154
> "Confutatis maledictis, flammis acribus addictis" - background song for
> a Microsoft sponsored "Where do you want to go from here?" commercial.
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

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

* Re: [linux-lvm] more vg problems or oddities...not using dmsetup remove seems to be bad?
  2011-09-12  0:44 [linux-lvm] more vg problems or oddities...not using dmsetup remove seems to be bad? Linda A. Walsh
  2011-09-12  3:04 ` Stuart D. Gathman
@ 2011-09-12  7:33 ` Ray Morris
  2011-09-12 13:57   ` Stuart D. Gathman
  1 sibling, 1 reply; 8+ messages in thread
From: Ray Morris @ 2011-09-12  7:33 UTC (permalink / raw)
  To: linux-lvm

>> tried to remove an unmounted active snapshot.
>> 
>> lvremove said it wouldn't remove an active snapshot.
>> 
>> Tried -an -- can't change active snapshot.

> Use lvremove -f 

What's directly in the LV? A partition perhaps? A raid block?
If it says that it can't be removed because it's in active use,
busy, it's probably telling you the truth. I've had this happen 
a couple of times. In one case, it held a virtual machine with 
a partition I had mapped using kpartx, so I had to use kpartx
to unmap that partition. I think the other time the LV was itself
a PV, or else it was shared using gnbd.

--force means, in my opinion at least, "Yes, I know what I'm doing.
I understand why the system is saying I better not do this, but
I want to force it to happen anyway". When it's used to mean "I don't 
understand what's going on, I don't know why this is a bad idea, 
but do it anyway", that sounds to me like a recipe for problems.
-- 
Ray Morris
support@bettercgi.com

Strongbox - The next generation in site security:
http://www.bettercgi.com/strongbox/

Throttlebox - Intelligent Bandwidth Control
http://www.bettercgi.com/throttlebox/

Strongbox / Throttlebox affiliate program:
http://www.bettercgi.com/affiliates/user/register.php




On Sun, 11 Sep 2011 17:44:48 -0700
"Linda A. Walsh" <lvm@tlinx.org> wrote:

> 
> 
> tried to remove an unmounted active snapshot.
> 
> lvremove said it wouldn't remove an active snapshot.
> 
> Tried -an -- can't change active snapshot.
> 
> 
> Tried turning off monitoring --monitor -n
> It gave no message
> tried removing again...can't remove active snap
> 
> tried --ignoremonitoring
> 
> no message but still can't remove
> 
> tried -- merging it...
> 
> Said it couldn't merge with open origin,
> then merging with origin on next activation...
> 
> Now still can't remove, but says "
>   Can't remove merging snapshot logical volume
> "Home-2011.09.03-00.28.36" ...
> 
> decided to try dmsetup remove --
> 
> it couldn't remove it either -- resource/device busy...
> 
> So now I'm concerned...is it going to try to merge back any changes
> it recorded by reversing them?
> 
> i.e. put the original volume back the way it was when the snapshot
> started?
> 
> Says it couldn't do it on open volume -- does that mean it won't
> start this until I reboot,
> then it will take a long time to become active?
> 
> seems like the dmsetup remove of the parts was the safest way to
> kill off an active snapshot...but this feels contorted.
> 
> I'm wondering if I really want this 'merge' it wants to do...and if
> not, how do I abort
> it?
> 
> Thanks!
> 
> (hoping system stays up until I get this sorted out!)...
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 

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

* Re: [linux-lvm] more vg problems or oddities...not using dmsetup remove seems to be bad?
  2011-09-12  7:33 ` Ray Morris
@ 2011-09-12 13:57   ` Stuart D. Gathman
  2011-09-12 17:27     ` [linux-lvm] How to stop MERGE? (was Re: more vg problems or oddities...not using dmsetup remove seems to be bad?) Linda A. Walsh
  0 siblings, 1 reply; 8+ messages in thread
From: Stuart D. Gathman @ 2011-09-12 13:57 UTC (permalink / raw)
  To: LVM general discussion and development

On Mon, 12 Sep 2011, Ray Morris wrote:

> --force means, in my opinion at least, "Yes, I know what I'm doing.
> I understand why the system is saying I better not do this, but
> I want to force it to happen anyway". When it's used to mean "I don't
> understand what's going on, I don't know why this is a bad idea,
> but do it anyway", that sounds to me like a recipe for problems.

The problem is, when the snapshot is "active" (has an 'a' in the status
in lvs), but not "open" (no 'o' in the status), lvremove still
refuses to remove, complaining about the LV being "active".

There seems to be some confusion about terminology.  Active means
it is loaded into device mapper and mapped to /dev/vgname/lvname AFAIKT.

Fortunately, lvremove -f seems to complain when the LV is actually open.

In the OP problem, we don't know the exact error message, so perhaps
the snapshot really was open.  In any case, she needs to stop the
merge from happening the next time the LV is activated.

--
 	      Stuart D. Gathman <stuart@bmsi.com>
     Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

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

* [linux-lvm] How to stop MERGE? (was Re: more vg problems or oddities...not using dmsetup remove seems to be bad?)
  2011-09-12 13:57   ` Stuart D. Gathman
@ 2011-09-12 17:27     ` Linda A. Walsh
  0 siblings, 0 replies; 8+ messages in thread
From: Linda A. Walsh @ 2011-09-12 17:27 UTC (permalink / raw)
  To: LVM general discussion and development




Stuart D. Gathman wrote:
>
> In the OP problem, we don't know the exact error message, so perhaps
> the snapshot really was open.  In any case, she needs to stop the
> merge from happening the next time the LV is activated.
---
I've only seen 1 error message ..

Ah....here are the two messages...this ****IS NOT*** a snapshot volume...
it's a static volume!

Here's lvs.  I'm going to remove the oldest static 'snap' (not an active
snapshot, but a copy of one that existed back then.  It's currently
mounted, .. (lv Home-2011.07.20-13.43.15; you'll never guess when the
snapshot was started or what the base LV was.. ;-) )...
It's currently mounted, and no 's' in status... (i.e. not an active 
snapshot).



NOTE, poor 'Home' has 'O' status -- thinks it is MERGing, but nothing
for it to MERGE with! -- this is a problem waiting to happen that I need
to ABORT.

# lvs
  LV                       VG         Attr   LSize  
  Backups                  Backups    -wi-ao  10.91t
  Home                     Home+Space Owi-ao   1.00t
  Home-2011.07.20-13.43.15 Home+Space -wi-ao 171.00g    <-about to remove
  Home-2011.07.25-16.24.53 Home+Space -wi-ao   1.88g
....     
  Home-2011.08.31-07.34.53 Home+Space -wi-ao   1.86g
  Home-2011.09.04-19.25.08 Home+Space swi-ao   1.00t Home     1.25
  Home.diff                Home+Space -wi-ao 512.00g


# lvremove /dev/Home+Space/Home-2011.07.20-13.43.15    # first w/o 
umounting it...
Can't remove open logical volume "Home-2011.07.20-13.43.15"
ok... so lets. unmount it...
# umount /home/snapdir/@GMT-2011.07.20-13.43.15
# lvremove /dev/Home+Space/Home-2011.07.20-13.43.15
Do you really want to remove active logical volume 
Home-2011.07.20-13.43.15? [y/n]: y
  Logical volume "Home-2011.07.20-13.43.15" successfully removed

^^^
This isn't helpful...as it's not *really* active in any way to the OS...
though it might still be 'activated'...(that's why I'm trying to
remove it...!)...

It was created w/lvcreate, so ... opposite of lvcreate would be
lvremove, no?...  there is no 'lvucreate'.. ;-/

FWIW...Home is even more confused...

Thought it was going to merge with a volume from 2011.09.03-xxxx, but
dmsetup remove on /dev/Home+Space/Home-2011.09.03-xxxx suceeded w/o force
as well as:
/dev/Home+Space/Home-2011.09.03-xxxx-cow

So now, /Home... what's it going to merge w/?  (Garbage likely...)...

That's what I love about the M5 computer, er, LVM2 Merge option:
 "No off switch"...

(last crewman who tried to pull the plug got zapped...didn't know lvm
was so dangerous!...;-) ).

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

end of thread, other threads:[~2011-09-12 17:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-12  0:44 [linux-lvm] more vg problems or oddities...not using dmsetup remove seems to be bad? Linda A. Walsh
2011-09-12  3:04 ` Stuart D. Gathman
2011-09-12  3:14   ` Stuart D. Gathman
2011-09-12  4:05     ` Linda A. Walsh
2011-09-12  4:08     ` Linda A. Walsh
2011-09-12  7:33 ` Ray Morris
2011-09-12 13:57   ` Stuart D. Gathman
2011-09-12 17:27     ` [linux-lvm] How to stop MERGE? (was Re: more vg problems or oddities...not using dmsetup remove seems to be bad?) Linda A. Walsh

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.