[DRBD-user] LVM snapshot not getting removed after resync
Jake Smith
jsmith at argotec.com
Tue Aug 16 16:52:18 CEST 2011
----- Original Message -----
> From: "Lars Ellenberg" <lars.ellenberg at linbit.com>
> To: drbd-user at lists.linbit.com
> Sent: Tuesday, August 16, 2011 10:03:30 AM
> Subject: Re: [DRBD-user] LVM snapshot not getting removed after resync
>
> On Thu, Aug 11, 2011 at 12:41:05PM -0400, Jake Smith wrote:
> > I did some further testing by running the commands manually
> >
> > I edited "/usr/lib/drbd/unsnapshot-resync-target-lvm.sh" and
> > commented out the exec line that redirects the output then ran
> > this:
> >
> > $ drbdadm before-resync-target minor-1
> >
> > Which yielded the following output:
> >
> > invoked for ldap
> ...
> > Rounding up size to full physical extent 20.00 MiB
> > Logical volume "ldap-before-resync" already exists in volume
> > group "Drbd"
> >
> > Then I ran:
> >
> > $ drbdadm after-resync-target minor-1
> >
> > Which yielded nothing...
> >
> > not even the "invoked for" line.
> >
> > Maybe this is a bug?
>
> Maybe you have multiple "after-resync-target" handler lines?
> One with the "crm-unfence-peer.sh" ?
> Or one in global, and one in the specific resource?
>
> They are not cumulative.
> The last one wins.
>
> You may need to specify them all in one line: "first script; second
> script"
> Or put them into a custom script, and call that.
You're right I have both:
after-resync-target "/usr/lib/drbd/crm-unfence-peer.sh";
after-resync-target "/usr/lib/drbd/unsnapshot-resync-target-lvm.sh"
However they're in the above order in the global handlers section so I think it may be first wins since I haven't had the fencing stay but the snapshot did?
So this fixed it in global:
after-resync-target "/usr/lib/drbd/crm-unfence-peer.sh; /usr/lib/drbd/unsnapshot-resync-target-lvm.sh";
*snip*
Thanks Lars!
Jake
More information about the drbd-user
mailing list