My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 252: Allowing LVM snapshots
4 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Project Member Reported by ius...@google.com, Jul 19, 2012
David wrote:

> LVM snapshots are pretty useful to rapidly spin up copy on write
> VMs.
> 
> bdev.py needed a slight tweak to allow this, because you can't
> directly activate or deactive lvm snapshots.   This could be
> definitely improved to do things like automatically activate origin
> lvms, check snap%, but my python-fu is weak so this worked for me if
> someone else comes across this:
> 
> --- /tmp/bdev.orig.py 2011-07-21 13:51:44.000000000 -0700
> +++ bdev.py   2011-07-21 13:42:46.000000000 -0700
> @@ -643,7 +643,14 @@
>      """
>      result = utils.RunCmd(["lvchange", "-ay", self.dev_path])
>      if result.failed:
> -      _ThrowError("Can't activate lv %s: %s", self.dev_path,
> result.output)
> +     """Check for snapshot
> +     """
> +     snapshotRegex=re.compile('snapshot')
> +     snapshot=re.search(snapshotRegex,result.output)
> +     if snapshot:
> +             print "Snapshot LVM detected, please ensure origin is activated and
> snap% is adequate"
> +     else:
> +           _ThrowError("Can't activate lv %s: %s", self.dev_path,
> result.output)

This could be a start towards allowing that backups/images are stored/managed by Ganeti itself and allow quick spin-up.
Dec 9, 2013
Project Member #1 ultrot...@gmail.com
(No comment was entered for this change.)
Labels: Type-Enhancement
Sign in to add a comment

Powered by Google Project Hosting