linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hugo Mills <hugo@carfax.org.uk>
To: deadhorseconsulting <deadhorseconsulting@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Actual effect of mkfs.btrfs -m raid10 </dev/sdX> ... -d raid10 </dev/sdX> ...
Date: Tue, 19 Nov 2013 09:06:02 +0000	[thread overview]
Message-ID: <20131119090602.GV4315@carfax.org.uk> (raw)
In-Reply-To: <CAEWPe=pwpxdYUDk7BzfjR8h-Jq9wtQE+gxxQChjOZzsXJO4vHQ@mail.gmail.com>

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

On Mon, Nov 18, 2013 at 11:12:03PM -0600, deadhorseconsulting wrote:
> In theory (going by the man page and available documentation, not 100%
> clear) does the following command indeed actually work as advertised
> and specify how metadata should be placed and kept only on the
> "devices" specified after the "-m" flag?
> 
> Thus given the following example:
> mkfs.btrfs -L foo -m raid10 <ssd> <ssd> <ssd> <ssd> -d raid10 <rust>
> <rust> <rust> <rust>
> 
> Would btrfs stripe/mirror and only keep metadata on the 4 specified SSD devices?
> Likewise then stripe/mirror and only keep data on the specified 4 spinning rust?

   No. The devices are general purpose. The -d and -m options only
specify the type of redundancy, not the devices to use. There's a
project[1] to look at this kind of more intelligent chunk allocator,
but it's not been updated in a while.

[1] https://btrfs.wiki.kernel.org/index.php/Project_ideas#Device_IO_Priorities

> In trying and creating this type of setup it appears that data is also
> being stored on the devices specified as "metadata devices". This is
> observed through via a "btrfs filesystem show". after committing a
> large amount of data to the filesystem The data devices have balanced
> data as expected with plenty of free space but the SSD device are
> reported as either nearly used or completely used.

   This will happen with RAID-10. The allocator will write stripes as
wide as it can: in this case, the first stripes will run across all 8
devices, until the SSDs are full, and then will write across the
remaining 4 devices.

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
                --- If it ain't broke,  hit it again. ---                

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

  reply	other threads:[~2013-11-19  9:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19  5:12 Actual effect of mkfs.btrfs -m raid10 </dev/sdX> ... -d raid10 </dev/sdX> deadhorseconsulting
2013-11-19  9:06 ` Hugo Mills [this message]
2013-11-19 19:24   ` deadhorseconsulting
2013-11-19 21:04     ` Duncan
2013-11-20  6:41     ` Martin
2013-11-19 23:16   ` Duncan
2013-11-20  6:35     ` Martin
2013-11-20 10:16       ` Chris Murphy
2013-11-20 10:22         ` Russell Coker
2013-11-20  8:09     ` Hugo Mills
2013-11-20 16:43       ` Duncan
2013-11-20 16:52         ` Hugo Mills
2013-11-20 21:13           ` Duncan
2013-11-21 17:14 ` Jeff Mahoney

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=20131119090602.GV4315@carfax.org.uk \
    --to=hugo@carfax.org.uk \
    --cc=deadhorseconsulting@gmail.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).