holland-mysqllvm does not remove snapshot volume after crash

Bug #726776 reported by Chris Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
holland-backup
Fix Committed
High
Andrew Garner
1.0
Fix Committed
Critical
Andrew Garner
1.1
Fix Committed
High
Andrew Garner

Bug Description

If a server crashes while a back up is running the snapshot volume is not removed. This is particularly problematic when lvm snapshots are being using in a cluster configured for HA-LVM and the active node is fenced. Because the passive node won't start with two LV's in the VG the cluster fails to start. A work around can be put in place by adding some lines to the init.d script that will remove any snapshot volumes found but it would be nice if holland could remove it.

Andrew Garner (muzazzi)
Changed in holland-backup:
milestone: none → 1.0.8
assignee: nobody → Andrew Garner (muzazzi)
importance: Undecided → High
status: New → Confirmed
Andrew Garner (muzazzi)
summary: - holland-mysqllvm does not remove snapshot volume
+ holland-mysqllvm does not remove snapshot volume after crash
Revision history for this message
Andrew Garner (muzazzi) wrote :

I agree we should remove snapshots more aggressively. There has been a lot of talk of removing old snapshots if holland sees one exists rather than just failing due to a naming conflict (as we are currently). I wrote the code to do this last week and we should see it for 1.0.8 in the coming weeks.

I am not sure we can address this particular use case however, since holland can only remove snapshots when it actually runs or is running and has a chance to do so. If I am understanding correctly, in the case a of a crash it's unlikely holland would ever even have the chance to run before the snapshot becomes a problem. What would you like holland to do in that case?

Revision history for this message
Chris Johnson (christopher-johnson) wrote :

I think your right, this might be better solved by adding a small script to the RHCS configuration that looks for the snapshot volume and removes it if found then tries to start up.

However, this bring up another issue: lvm tagging. For this to work you would have to have the ability to set a tag on the snapshot volume when its created. Something like this:

# lvmcreate -L50GB --addtag @12345db1 -n mysql00_snapshop vgsan00

That will allow you to add an exception to the /etc/lvm/lvm.conf volume_list so it can mount up that LV.

Andrew Garner (muzazzi)
Changed in holland-backup:
status: Confirmed → In Progress
Revision history for this message
Andrew Garner (muzazzi) wrote :

holland lvm really needs to clean up after itself when it is terminated and a stale snapshot remains. This bug has lingered too long, so let's target this for the next v1.0.10 release.

Andrew Garner (muzazzi)
Changed in holland-backup:
milestone: 1.0.8 → 1.0.10
Andrew Garner (muzazzi)
Changed in holland-backup:
milestone: 1.0.10 → 1.0.12
Revision history for this message
Andrew Garner (muzazzi) wrote :

Feature branch here: https://github.com/holland-backup/holland/tree/feature/lp_726776_lvm_snapshot_improvements

Should be included in 1.0.12

Fixed in amsterdam branch as well.

Andrew Garner (muzazzi)
Changed in holland-backup:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.