Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Hugo Mills <hugo@carfax.org.uk>
To: Shyam Prasad N <nspmangalore@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Ded
Date: Wed, 3 May 2017 11:45:10 +0000	[thread overview]
Message-ID: <20170503114510.GA9701@carfax.org.uk> (raw)
In-Reply-To: <CANT5p=prE-Vm7mGLhQNDwWiJ3k8bRbj-M-rtwk-k6j+_Ad1pBQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2277 bytes --]

On Wed, May 03, 2017 at 05:11:04PM +0530, Shyam Prasad N wrote:
> Hi,
> 
> This email is actually several questions clubbed as one...
> 
> I have a btrfs filesystem mounted at /btrfs_vol/
> Every N minutes, I run bedup for deduplication of data in /btrfs_vol
> Inside /btrfs_vol, I have several subvolumes (consider this as home
> directories of several users)
> I have set individual qgroup limits for each of these subvolumes.
> Additionally, I'm using btrfs-send/receive to backup each subvolume to
> an identical btrfs filesystem on a remote server.
> 
> I hope I've explained the setup clearly. Now, here are my questions:
> 1. I understand that bedup does deduplication on whole-file basis. I
> also read that duperemove works at extent level.
> How do the two compare in terms of performance?
> How stable is duperemove? I read a few posts suggesting bugs related
> to extent-same.
> duperemove seems ideal for my workload. However, have stayed away from
> it, fearing instability.
> 
> 2. Is it possible to have nested subvolumes (like in my tree
> structure), and run btrfs-send and expect the data whole filesystem
> (including all subvolumes) to be sent?

   No, because send requires read-only snapshots, and the snapshot
operation isn't recursive. So you can't send everything in one go.

> My problem is that, since I send btrfs subvolumes, if there is any
> dedplicated data between these subvolumes, it needs to send 2 copies
> of the same data to the remote host.
> You might ask why not have just a single subvolume and backup the whole thing.
> But there are many cool features, like quotas and btrfs send/receive
> based backup for selected user home directories, which works only at
> the subvolume level.

   The solution to this problem is to use send -c repeatedly, sending
the subvolumes one at a time, with one -c option for every subvolume
that already exists on the receiving machine. So you'll do something
like this:

send snap1
send -c snap1 snap2
send -c snap1 -c snap2 snap3
send -c snap1 -c snap2 -c snap3 snap4
etc...

   Hugo.

-- 
Hugo Mills             | Gomez, darling, don't torture yourself.
hugo@... carfax.org.uk | That's my job.
http://carfax.org.uk/  |
PGP: E2AB1DE4          |                                       Morticia Addams

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2017-05-03 11:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03 11:41 Ded Shyam Prasad N
2017-05-03 11:45 ` Hugo Mills [this message]
2017-05-03 13:07 ` Ded Peter Grandi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170503114510.GA9701@carfax.org.uk \
    --to=hugo@carfax.org.uk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nspmangalore@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox