Skip to contentSkip to conversation

COW a file from snapshot

DISCUSSION Dave 6 participants 8 messages Dec 20, 2011 – Dec 22, 2011 Btrfs file system

lore
Share & tools
lore

Dave

author
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

So I've got a daily snapshot of my /home subvolume. Due to a fat finger, I've damaged a rather large file so I'd like to pull if from one of these snapshot backups. I don't want to simply copy the file since it's many gigs and cp
- --reflink=always doesn't work (produces the error Invalid cross-device link). Is there a way to recover that file and benefit from COW?
- --
- -=[dave]=-

Entropy isn't what it used to be.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iF4EAREIAAYFAk7wpKUACgkQXM0u5ajNnCgMUQD/Uf0/HygZ9D8StT9Oc6E3+wM/ MBokh6h1iPN2OslJTxgA/RUzFMM2n0+3ORHwvOraJMBJl1P4JfabT31iuemn/BL2 =2cds
-----END PGP SIGNATURE-----

#1 lore raw

You would need to apply this patch to your kernel:
http://www.mail-archive.com/[email protected]/msg09096.html

Is there any chance this patch gets in linux-next ? I use this feature all the time and it never broke on me.

Quoted 5 lines · Dave

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

So I've got a daily snapshot of my /home subvolume. =C2=A0Due to a fa=

t finger, I've

Quoted 1 line

damaged a rather large file so I'd like to pull if from one of these =

snapshot

Quoted 1 line

backups. =C2=A0I don't want to simply copy the file since it's many g=

igs and cp

Quoted 1 line

- --reflink=3Dalways doesn't work (produces the error Invalid cross-d=

evice link).

Quoted 8 lines

Is there a way to recover that file and benefit from COW?
- --
- -=3D[dave]=3D-

Entropy isn't what it used to be.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

Quoted 6 lines

iF4EAREIAAYFAk7wpKUACgkQXM0u5ajNnCgMUQD/Uf0/HygZ9D8StT9Oc6E3+wM/ MBokh6h1iPN2OslJTxgA/RUzFMM2n0+3ORHwvOraJMBJl1P4JfabT31iuemn/BL2 =3D2cds
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs=

" in

Quoted 2 lines

the body of a message to [email protected]
More majordomo info at =C2=A0http://vger.kernel.org/majordomo-info.ht=

ml
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

Did you get any success with the patch?
Reading the conversation, people seemed to agree that this feature should be included, anyway, snapshot already share data, why not be able to copy them?

Other link with title for mailing list reference. [PATCH 2/2] btrfs: allow cross-subvolume BTRFS_IOC_CLONE
http://permalink.gmane.org/gmane.comp.file-systems.btrfs/9865

Quoted 6 lines · On Tue, Dec 20, 2011 at 12:53 PM, J=C3=A9r=C3=B4me Poulin <jeromepoulin=…

You would need to apply this patch to your kernel:
http://www.mail-archive.com/[email protected]/msg09096.html

Is there any chance this patch gets in linux-next ? I use this feature all the time and it never broke on me.

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 4 lines · On Wed, Dec 21, 2011 at 22:31, J=C3=A9r=C3=B4me Poulin <jeromepoulin@gm=…

Did you get any success with the patch?
Reading the conversation, people seemed to agree that this feature should be included, anyway, snapshot already share data, why not be able to copy them?

I'm using btrfs for about two years and this is the key feature I'm missing all the time. Why is it not part of mainline btrfs already?

Quoted 6 lines

Other link with title for mailing list reference. [PATCH 2/2] btrfs: allow cross-subvolume BTRFS_IOC_CLONE
http://permalink.gmane.org/gmane.comp.file-systems.btrfs/9865

On Tue, Dec 20, 2011 at 12:53 PM, J=C3=A9r=C3=B4me Poulin <jeromepoul=

Quoted 3 lines · [email protected]> wrote:
Quoted 3 lines

You would need to apply this patch to your kernel:
http://www.mail-archive.com/[email protected]/msg09096.htm=

l

Quoted 5 lines
Quoted 3 lines

Is there any chance this patch gets in linux-next ? I use this feature all the time and it never broke on me.

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs=

" in

Quoted 2 lines

the body of a message to [email protected]
More majordomo info at =C2=A0http://vger.kernel.org/majordomo-info.ht=

ml
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
Quoted 2 lines · Roman Kapusta

I'm using btrfs for about two years and this is the key feature I'm missing all the time. Why is it not part of mainline btrfs already?

Because nobody has written the code to do it yet?

I'm sure the developers would welcome patches for this with open arms!

cheers,
Chris

Signature · 4 lines
 Chris Samuel  :  http://www.csamuel.org/  :  Melbourne, VIC

This email may come with a PGP signature as a file. Do not panic.
For more info see: http://en.wikipedia.org/wiki/OpenPGP
#5 lore raw

Chris, I=A0recommend=A0reading the previously linked thread. The suppli= ed
(and reportedly working) patch was nacked because it violates some principles or another of file systems. (although from my limited understanding it only does it in the same way that btrfs snapshots do in the first place)

On Thu, Dec 22, 2011 at 10:35 PM, Chris Samuel <[email protected]> wrot= e:

Quoted 9 lines · Roman Kapusta
Quoted 3 lines

I'm using btrfs for about two years and this is the key feature I'm missing all the time. Why is it not part of mainline btrfs already?

Because nobody has written the code to do it yet?

I'm sure the developers would welcome patches for this with open arms=

!

Quoted 5 lines

cheers,
Chris
--
=A0Chris Samuel =A0: =A0http://www.csamuel.org/ =A0: =A0Melbourne, VI=

C

Quoted 3 lines

This email may come with a PGP signature as a file. Do not panic. For more info see: http://en.wikipedia.org/wiki/OpenPGP

--
Gareth Pye
Level 2 Judge, Melbourne, Australia
Australian MTG Forum:=A0mtgau.com [email protected]=A0-=A0www.rockpaperdynamite.wordpress.com "Dear God, I would like to file a bug report"
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
Quoted 1 line · Gareth Pye

Chris, I recommend reading the previously linked thread.

Mea culpa, I blame reading email out of order after getting out of hospital yesterday. :-(

We now return you to your regularly scheduled mailing list..

Signature · 4 lines
 Chris Samuel  :  http://www.csamuel.org/  :  Melbourne, VIC

This email may come with a PGP signature as a file. Do not panic.
For more info see: http://en.wikipedia.org/wiki/OpenPGP
#7 lore raw
In reply to Chris Samuel

Chris Samuel wrote (ao):

Quoted 7 lines · Roman Kapusta
Quoted 2 lines

I'm using btrfs for about two years and this is the key feature I'm missing all the time. Why is it not part of mainline btrfs already?

Because nobody has written the code to do it yet?

I'm sure the developers would welcome patches for this with open arms!

As posted in this thread by Jerome two days ago:

"You would need to apply this patch to your kernel:
http://www.mail-archive.com/[email protected]/msg09096.html

Is there any chance this patch gets in linux-next ? I use this feature all the time and it never broke on me."

Sander

Signature · 2 lines
Humilis IT Services and Solutions
http://www.humilis.net