From: Hugo Mills <hugo@carfax.org.uk>
To: miaou sami <miaousami@hotmail.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [raidX vs single/dup]
Date: Thu, 26 Sep 2013 13:32:33 +0100 [thread overview]
Message-ID: <20130926123233.GA2865@carfax.org.uk> (raw)
In-Reply-To: <DUB116-W69F1EBEC6C7619457E5D82A6280@phx.gbl>
[-- Attachment #1: Type: text/plain, Size: 1849 bytes --]
On Thu, Sep 26, 2013 at 12:22:49PM +0000, miaou sami wrote:
> Hi btrfs guys,
>
> could someone explain to me the differences in mkfs.btrfs:
>
> - between -d raid0 and -d single
In RAID0, data is striped across all the devices, so the first 64k
of a file will go on device 1, the next 64k will go on device 2, and
so on. With single, files are allocated linearly on one device.
(This is assuming smallish files, a filesystem with lots of space.
Even with single, files can still end up being scattered around over
multiple devices -- but with RAID0, even non-fragmented files are
striped)
> - between -m raid1 and -m dup
In both cases, there are two copies of each metadata block. With
RAID1, it *requires* the two copies to live on different devices. With
DUP, it allows the two copies to live on the same device (e.g. if
there's only one device).
> - between -m raid0 and -m single
As for -draid0 and -dsingle, but for metadata instead of data.
> My understanding is that raidX should be used in case of multi
> devices and single/dup should be used in case of single device to
> allow duplication, but it is not 100% clear to me...
> As btrfs raid concepts are quite different from traditionnal raid,
> shouldn't we use the words "stripped" and "mirrored" instead of
> raid0/raid1? or even "single" and "duplicated"?
> Then there would be no difference between single/raid0 and
> duplicated/raid1...
But there _are_ differences between them, as explained above. :)
I posted a patch a while ago to change the names to something more
logical and expressive, but it didn't get merged.
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
--- Stick them with the pointy end. ---
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2013-09-26 12:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 12:22 [raidX vs single/dup] miaou sami
2013-09-26 12:32 ` Hugo Mills [this message]
2013-09-26 13:40 ` miaou sami
2013-09-26 13:46 ` Hugo Mills
2013-09-26 14:55 ` miaou sami
2013-09-26 14:58 ` Hugo Mills
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=20130926123233.GA2865@carfax.org.uk \
--to=hugo@carfax.org.uk \
--cc=linux-btrfs@vger.kernel.org \
--cc=miaousami@hotmail.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;
as well as URLs for NNTP newsgroup(s).