Skip to content

Instantly share code, notes, and snippets.

@cole-h

cole-h/messup.md Secret

Last active August 10, 2020 21:31
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 cole-h/2235b625400a4555795afc553408d121 to your computer and use it in GitHub Desktop.
Save cole-h/2235b625400a4555795afc553408d121 to your computer and use it in GitHub Desktop.
  1. I had a VM image at /var/lib/libvirt/images/windows10.raw.
  2. I messed something up in the image, so I tried to restore it from a previous snapshot by copying it: cp -av /var/.zfs/snapshot/snap/lib/libvirt/images/windows10.raw /var/lib/libvirt/images/windows10.raw.
  3. cp -av adds the contents of the snapshotted file, thus growing the VM image to 400+GB before I realize.
  4. I rm /var/lib/libvirt/images/windows10.raw to remove the 400G file and zfs destroy <all snaps of var with that huge file>
  5. I now have 27G free and ZFS doesn't seem to want to give any of the destroyed space back.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment