linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: What is the current status of defragmentation?
Date: Thu, 18 Jul 2013 00:22:16 +0000 (UTC)	[thread overview]
Message-ID: <pan$51ece$57cdeac0$66b0922d$a0484ffc@cox.net> (raw)
In-Reply-To: 51E7182F.9020009@statystyka.net

Adam Ryczkowski posted on Thu, 18 Jul 2013 00:18:23 +0200 as excerpted:

> Today I booted my linux-mint 14 into the latest 3.10.1 kernel to
> defragment the root btrfs filesystem on my ASUS N56VZ laptop with hybrid
> Seagate Momentus XT disk. I did something like
> 
>    find / -exec btrfs filesystem defrag {}

> [description of experience snipped] It clearly showed me, that
> defragmenting the filesystem is not that trivial, as it is for ext4.
> So I have quesions: [snipped]

> Does this command
> 
> find / -type f -o -type d -print0 | xargs --null --no-run-if-empty btrfs
> filesystem defragment -cv
> 
> look like a reasonable idiom for defragmenting the whole filesystem?

Given that you don't mention the btrfs wiki, and to a large extent your 
questions are covered there, I'll assume you're not familiar with it.

The short answer is that yes, a find of that nature, piped to xargs to 
run btrfs filesystem defrag, is the suggested solution.  However, you 
really need to read up on the wiki, and then ask any remaining questions 
you may have.  (I still had some questions myself.)

Bookmarking link:  https://btrfs.wiki.kernel.org/

Defrag is covered there in some detail, including a recommended find-
piped defrag command. =:^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


  parent reply	other threads:[~2013-07-18  0:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 22:18 What is the current status of defragmentation? Adam Ryczkowski
2013-07-18  0:17 ` George Mitchell
     [not found]   ` <51E79542.9030001@statystyka.net>
2013-07-18 13:37     ` George Mitchell
2013-07-18  0:22 ` Duncan [this message]
2013-07-18  2:59 ` Shridhar Daithankar
2013-07-18  7:53   ` Duncan

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='pan$51ece$57cdeac0$66b0922d$a0484ffc@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --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).