linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Recovering a file from a snapshot without duplicating its blocks (--reflink across devs?)
@ 2012-06-05  3:01 Marc MERLIN
  2012-06-05  3:42 ` Chris Samuel
  0 siblings, 1 reply; 3+ messages in thread
From: Marc MERLIN @ 2012-06-05  3:01 UTC (permalink / raw)
  To: linux-btrfs

I hit a problem on my laptop, I had about 40GB free, and I screwed up a
36GB virtualbox image.
No biggie, I have netapp style snapshots, so I deleted my messed up VM
image, and figured I only had to copy the last image from my hourly
snapshot.

First I though, I sure would be nice if I could take btrfs to reference
the same blocks from the snapshot to my current image.
But, --reflink failed across devices nodes, so I was forced to
copy/duplicate the blocks (36GB).

Then, by getting down to less than 10GB free, I got into the dark
corners of the btrfs code where writes would just hang, or take 10H to
copy an extra 1GB, while copiously hanging the system.

In the end, I never was able to recover the system without copying the
snapshot VM image to 3rd party storage, deleting the snapshot, then
getting enough blocks of free space, and finally being able to copy my
36GB image back on my /home partition.

This was very slow and painful and required power cycle my laptop more
than once while it was very close to being fully hung (in real life, it
was just unusable and stuck on disk IO but not fully hung).
Was there a better way?

I had 3.2.16 at the time and now have 3.4.0.

Thanks,
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Recovering a file from a snapshot without duplicating its blocks (--reflink across devs?)
  2012-06-05  3:01 Recovering a file from a snapshot without duplicating its blocks (--reflink across devs?) Marc MERLIN
@ 2012-06-05  3:42 ` Chris Samuel
  2012-06-05 11:54   ` Marc MERLIN
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Samuel @ 2012-06-05  3:42 UTC (permalink / raw)
  To: Marc MERLIN; +Cc: linux-btrfs

On 05/06/12 13:01, Marc MERLIN wrote:

> First I though, I sure would be nice if I could take btrfs to reference
> the same blocks from the snapshot to my current image.
> But, --reflink failed across devices nodes, so I was forced to
> copy/duplicate the blocks (36GB).

Patches for this were posted over a year ago, but it was NAK'd by
Christoph Hellwig.  I don't know if it's got any further since then. :-(

Patch description:

 http://www.spinics.net/lists/linux-btrfs/msg09226.html

NAK:

 http://www.spinics.net/lists/linux-btrfs/msg09229.html

-- 
 Chris Samuel  :  http://www.csamuel.org/  :  Melbourne, VIC

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Recovering a file from a snapshot without duplicating its blocks (--reflink across devs?)
  2012-06-05  3:42 ` Chris Samuel
@ 2012-06-05 11:54   ` Marc MERLIN
  0 siblings, 0 replies; 3+ messages in thread
From: Marc MERLIN @ 2012-06-05 11:54 UTC (permalink / raw)
  To: Chris Samuel; +Cc: linux-btrfs

On Tue, Jun 05, 2012 at 01:42:50PM +1000, Chris Samuel wrote:
> On 05/06/12 13:01, Marc MERLIN wrote:
> 
> > First I though, I sure would be nice if I could take btrfs to reference
> > the same blocks from the snapshot to my current image.
> > But, --reflink failed across devices nodes, so I was forced to
> > copy/duplicate the blocks (36GB).
> 
> Patches for this were posted over a year ago, but it was NAK'd by
> Christoph Hellwig.  I don't know if it's got any further since then. :-(
> 
> Patch description:
> 
>  http://www.spinics.net/lists/linux-btrfs/msg09226.html
> 
> NAK:
> 
>  http://www.spinics.net/lists/linux-btrfs/msg09229.html

Thanks for that.

So, I'm not sure how common my use case is, but obviously for cases were
recovering a huge file is important, like disk images, being able to
re-link blocks without copying would be fantastic.

So here's my vote for that.

Thanks,
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-05 12:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-05  3:01 Recovering a file from a snapshot without duplicating its blocks (--reflink across devs?) Marc MERLIN
2012-06-05  3:42 ` Chris Samuel
2012-06-05 11:54   ` Marc MERLIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).