From: Martin Steigerwald <Martin@lichtvoll.de>
To: linux-btrfs@vger.kernel.org
Cc: "Fajar A. Nugraha" <list@fajar.net>
Subject: Re: Workaround for hardlink count problem?
Date: Tue, 11 Sep 2012 01:09:17 +0200 [thread overview]
Message-ID: <201209110109.17604.Martin@lichtvoll.de> (raw)
In-Reply-To: <CAG1y0scP+O9kTLiF5ZpxRwZTbOFQWctQDquCu4ATSwYyE3SZmQ@mail.gmail.com>
Am Montag, 10. September 2012 schrieb Fajar A. Nugraha:
> On Mon, Sep 10, 2012 at 4:12 PM, Martin Steigerwald
<Martin@lichtvoll.de> wrote:
> > Am Samstag, 8. September 2012 schrieb Marc MERLIN:
> >> I was migrating a backup disk to a new btrfs disk, and the backup
> >> had a lot of hardlinks to collapse identical files to cut down on
> >> inode count and disk space.
> >
> >> Then, I started seeing:
> > […]
> >
> >> Has someone come up with a cool way to work around the too many link
> >> error and only when that happens, turn the hardlink into a file copy
> >> instead? (that is when copying an entire tree with millions of
> >> files).
> >
> > What about:
> >
> > - copy first backup version
> > - btrfs subvol create first next
> > - copy next backup version
> > - btrfs subvol create previous next
>
> Wouldn't "btrfs subvolume snapshot", plus "rsync --inplace" more
> useful here? That is. if the original hardlink is caused by multiple
> versions of backup of the same file.
Sure, I meant subvol snapshot in above example. Thanks for noticing.
But I do not use --inplace as it conflicts with some other rsync options I
like to use:
-ax --acls --xattrs --sparse --hard-links --del --delete-excluded --
exclude-from "debian-exclude"
Yes, it was --sparse:
-S, --sparse
Try to handle sparse files efficiently so they take up
less space on the destination. Conflicts with --inplace
because it’s not possible to overwrite data in a sparse
fashion.
As I have some pretty big sparse files, I went without --inplace:
martin@merkaba:~/Amiga> du -sch M-Archiv.hardfile Messages.hardfile
241M M-Archiv.hardfile
726M Messages.hardfile
966M insgesamt
martin@merkaba:~/Amiga> ls -lh M-Archiv.hardfile Messages.hardfile
-rw-r----- 1 martin martin 1,0G Mär 27 2005 M-Archiv.hardfile
-rw-r----- 1 martin martin 1,0G Sep 10 17:33 Messages.hardfile
martin@merkaba:~/Amiga>
(my old mails when I used Amiga as my main machine, still accessible via
e-uae ;)
Anyway, I think that will be solved by btrfs send/receive.
--
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7
next prev parent reply other threads:[~2012-09-10 23:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-08 16:56 Workaround for hardlink count problem? Marc MERLIN
2012-09-10 9:12 ` Martin Steigerwald
2012-09-10 9:21 ` Fajar A. Nugraha
2012-09-10 23:09 ` Martin Steigerwald [this message]
2012-09-10 23:38 ` Jan Engelhardt
2012-09-11 9:16 ` Martin Steigerwald
2012-09-11 14:20 ` Arne Jansen
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=201209110109.17604.Martin@lichtvoll.de \
--to=martin@lichtvoll.de \
--cc=linux-btrfs@vger.kernel.org \
--cc=list@fajar.net \
/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;
as well as URLs for NNTP newsgroup(s).