From: ching <lsching17@gmail.com>
To: cwillu <cwillu@cwillu.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs defrag problem
Date: Wed, 31 Oct 2012 08:14:15 +0800 [thread overview]
Message-ID: <50906D57.904@gmail.com> (raw)
In-Reply-To: <CAE5mzvgEFt7qJOt_zrUwNuons3Ku_PDBLpV0oX7cqy9aU=RjsA@mail.gmail.com>
On 10/30/2012 08:08 PM, cwillu wrote:
> On Tue, Oct 30, 2012 at 5:47 AM, ching <lsching17@gmail.com> wrote:
>> Hi all,
>>
>> I try to defrag my btrfs root partition (run by root privilege)
>>
>> find / -type f -o -type d -print0 | xargs --null --no-run-if-empty btrfs filesystem defragment -t $((32*1024*1024))
>>
>>
>> 1. This kind of error messages is prompted:
>>
>> failed to open /bin/bash
>> open:: Text file busy
>> total 1 failures
>> failed to open /lib64/ld-2.15.so
>> open:: Text file busy
>> total 1 failures
>> failed to open /sbin/agetty
>> open:: Text file busy
>> failed to open /sbin/btrfs
>> open:: Text file busy
>> failed to open /sbin/dhclient
>> open:: Text file busy
>> failed to open /sbin/init
>> open:: Text file busy
>> failed to open /sbin/udevd
>>
>> It seems that locked files cannot be defragged, is it expected behaviour?
> I can't reproduce that behaviour here, although maybe you're running
> an older kernel with some bug that's since been fixed?
I am running Gentoo with Kernel 3.6.3 x64, btrfs-progs git version
my root is mounted with noatime,space_cache,inode_cache,metadata_ratio=15,max_inline=0,ssd_spread
>> 2. Btrfs Wiki mentions that defrag directory will defrag metadata, is symlink/hardlink considered as metadata?
>>
>> P.S. inline data is already disabled by "max_inline=0"
> Well, that's a silly thing to do, causing every small file to take up
> a separate 4kb block rather than its size * 2, and requiring extra
> seeks to read/write them (i.e., if you have a million 10 byte files,
> they'll now take up 4GB instead of 20MB).
this is off-topic to my question.
>> 3. Is any possible to online defrag a btrfs partition without hindered by mount point/polyinstantied directories?
> If you're asking if you can defrag an unmounted btrfs, not at this
> time. It's possible in principle, nobody has cared enough to
> implement it yet.
>
next prev parent reply other threads:[~2012-10-31 0:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 11:47 btrfs defrag problem ching
2012-10-30 12:08 ` cwillu
2012-10-31 0:14 ` ching [this message]
2012-10-31 0:40 ` David Sterba
2012-10-31 21:17 ` ching
2012-11-05 22:57 ` David Sterba
2012-11-05 23:48 ` ching
2012-11-06 13:49 ` Sander
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=50906D57.904@gmail.com \
--to=lsching17@gmail.com \
--cc=cwillu@cwillu.com \
--cc=linux-btrfs@vger.kernel.org \
/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).