Skip to content

Instantly share code, notes, and snippets.

@tachang
Created April 10, 2015 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tachang/99c1a020044c00f67d81 to your computer and use it in GitHub Desktop.
Save tachang/99c1a020044c00f67d81 to your computer and use it in GitHub Desktop.
Recreate LVM snapshot
#!/bin/bash
# Stop crashplan temporarily
/etc/init.d/crashplan stop
# Unmount the datasnapshot
umount /mnt/datasnapshot
# Destroy snapshot and recreate it
lvremove -f /dev/example-vg/datasnapshot
lvcreate -L 250G -s -n datasnapshot /dev/riven-vg/data
# Mount it
mount /dev/example-vg/datasnapshot /mnt/datasnapshot
# Start up CrashPlan
/etc/init.d/crashplan start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment