linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hugo Mills <hugo-lkml@carfax.org.uk>
To: Freddie Cash <fjwcash@gmail.com>
Cc: Alan Chandler <alan@chandlerfamily.org.uk>, linux-btrfs@vger.kernel.org
Subject: Re: Synching a Backup Server
Date: Sun, 9 Jan 2011 18:30:30 +0000	[thread overview]
Message-ID: <20110109183030.GA29572@carfax.org.uk> (raw)
In-Reply-To: <AANLkTim96P3ZD-WpDonsOHB7aicNBQX-wK6v347r1z8s@mail.gmail.com>

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

On Sun, Jan 09, 2011 at 09:59:46AM -0800, Freddie Cash wrote:
> On Sun, Jan 9, 2011 at 7:32 AM, Alan Chandler
> <alan@chandlerfamily.org.uk> wrote:
> > I think I start to get it now.  Its the fact that subvolumes can be
> > snapshotted etc without mounting them that is the difference.  I guess I am
> > too used to thinking like LVM and I was thinking subvolumes where like an
> > LV.  They are, but not quite the same.
> 
> Let see if I can match up the terminology and layers a bit:
> 
> LVM Physical Volume == Btrfs disk == ZFS disk / vdevs
> LVM Volume Group == Btrfs "filesystem" == ZFS storage pool
> LVM Logical Volume == Btrfs subvolume == ZFS volume
> 'normal' filesysm == Btrfs subvolume (when mounted) == ZFS filesystem
> 
> Does that look about right?

   Kind of. The thing is that the way that btrfs works is massively
different to the way that LVM works (and probably massively different
to the way that ZFS works, but I don't know much about ZFS, so I can't
comment there). I think that trying to think of btrfs in LVM terms is
going to lead you to a large number of incorrect conclusions. It's
just not a good model to use.

> LVM: A physical volume is the lowest layer in LVM and they are
> combined into a volume group which is then split up into logical
> volumes, and formatted with a filesystem.
> 
> Btrfs: A bunch of disks are "formatted" into a btrfs "filesystem"
> which is then split up into sub-volumes (sub-volumes are
> auto-formatted with a btrfs filesystem).

   No, subvolumes are a part of the whole filesystem. In btrfs, there
is only one filesystem. There are 6 main B-trees that store metadata
in btrfs (plus a couple of others). One of those is the "filesystem
tree" (or FS tree), which contains all the metadata associated with
the normal POSIX directory/file namespace (basically all the inode and
xattr data). When you create a subvolume, a new FS tree is created,
but it shares *all* of the other btrfs B-trees.

   There is only one filesystem, but there may be distinct namespaces
within that filesystem that can be mounted as if they were
filesystems. Think of it more like NFSv4, where there's one overall
namespace exported per server, but clients can mount subsections of
it.

> ZFS: A bunch of disks are combined into virtual devices, then combined
> into a ZFS storage pool, which can be split up into either volumes
> formatted with any filesystem, or ZFS filesystems.

   OK, this is _definitely_ not the way that btrfs works. As I said
above, a btrfs subvolume is just a namespace that is mountable in its
own right. It's *not* a block device, and can't be formatted with any
other filesystem.

> Just curious, why all the new terminology in btrfs for things that
> already existed?  And why are old terms overloaded with new meanings?
> I don't think I've seen a write-up about that anywhere (or I don't
> remember it if I have).

   The main awkward piece of btrfs terminology is the use of "RAID" to
describe btrfs's replication strategies. It's not RAID, and thinking
of it in RAID terms is causing lots of confusion. Most of the other
things in btrfs are, I think, named relatively sanely.

> Perhaps it's time to start looking at separating the btrfs pool
> creation tools out of mkfs (or renaming mkfs.btrfs), since you're
> really building a a storage pool, and not a filesystem.  It would
> prevent a lot of confusion with new users.  It's great that there's a
> separate btrfs tool for manipulating btrfs setups, but "mkfs.btrfs" is
> just wrong for creating the btrfs setup.

   I think this is the wrong thing to do. I hope my explanation above
helps.

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
      --- Try everything once,  except incest and folk-dancing. ---      

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

  reply	other threads:[~2011-01-09 18:30 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06 17:35 Synching a Backup Server Carl Cook
2011-01-06 19:16 ` Freddie Cash
2011-01-06 19:34   ` Marcin Kuk
     [not found]   ` <AANLkTik-rhXAHW18id4WMMtdqXkicvzTZ47+2r6YMuY0@mail.gmail.com>
2011-01-06 19:47     ` Freddie Cash
2011-01-06 20:07       ` C Anthony Risinger
2011-01-06 20:13         ` Freddie Cash
2011-01-06 20:21           ` C Anthony Risinger
2011-01-06 21:06             ` Gordan Bobic
2011-01-06 21:39               ` Freddie Cash
2011-01-06 21:44         ` Carl Cook
2011-01-06 21:53           ` Gordan Bobic
2011-01-06 21:58           ` Freddie Cash
2011-01-06 22:26             ` Carl Cook
2011-01-06 22:29               ` Gordan Bobic
2011-01-06 23:07               ` Carl Cook
2011-01-07 16:14                 ` Hubert Kario
2011-01-06 23:15               ` Fajar A. Nugraha
2011-01-06 21:42   ` Carl Cook
2011-01-06 21:52     ` Freddie Cash
2011-01-07 16:20       ` Hubert Kario
2011-01-09 11:46         ` Alan Chandler
2011-01-09 13:54           ` Fajar A. Nugraha
2011-01-09 15:32             ` Alan Chandler
2011-01-09 17:59               ` Freddie Cash
2011-01-09 18:30                 ` Hugo Mills [this message]
2011-01-09 20:57                   ` Alan Chandler
2011-01-09 22:01                     ` Hugo Mills
2011-01-09 23:32                       ` Alan Chandler
2011-01-11 22:25                         ` Hugo Mills
2011-01-10  2:22                       ` Fajar A. Nugraha
2011-01-11 22:41                         ` Hugo Mills
2011-01-21 19:28                   ` Freddie Cash
2011-01-22 13:45                     ` Hugo Mills
2011-01-24 17:45                       ` Freddie Cash
2011-01-22 13:55                     ` Hubert Kario
2011-01-25 17:29                       ` Kaspar Schleiser
2011-01-25 17:43                         ` Hubert Kario
2011-01-25 17:59                           ` Freddie Cash
2011-01-25 18:36                             ` Hubert Kario
2011-01-10 13:14           ` Hubert Kario
2011-01-06 20:12 ` Fajar A. Nugraha
2011-01-06 21:43   ` Carl Cook
2011-01-06 21:43 ` Goffredo Baroncelli

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=20110109183030.GA29572@carfax.org.uk \
    --to=hugo-lkml@carfax.org.uk \
    --cc=alan@chandlerfamily.org.uk \
    --cc=fjwcash@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).