All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Chandler <alan@chandlerfamily.org.uk>
To: linux-btrfs@vger.kernel.org
Subject: Re: Synching a Backup Server
Date: Sun, 09 Jan 2011 20:57:12 +0000	[thread overview]
Message-ID: <4D2A2128.2060508@chandlerfamily.org.uk> (raw)
In-Reply-To: <20110109183030.GA29572@carfax.org.uk>



On 09/01/11 18:30, Hugo Mills wrote:
>
>     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.
>
>    
I think this explanation is still missing the key piece that has 
confused me despite trying very hard to understand it by reading the 
wiki.  You talk about "Distinct Namespaces", but what I learnt from 
further up the thread is that this "namespace" is also inside the the 
"namespace" that makes up the whole filesystem.  I mount the whole 
filesystem, and all my subvolumes are automatically there (at least that 
is what I find in practice).  Its this duality of namespace that is the 
difficult concept.  I am still not sure of there is a default subvolume, 
and the other subvolumes are defined within its namespace, or whether 
there is an overall filesystem namespace and subvolumes defined within 
it and if you mount the default subvolume you would then loose the 
overall filesystem namespace and hence no longer see the subvolumes.  I 
find the wiki also confusing because it talks about subvolumes having to 
be at the first level of the filesystem, but again further up this 
thread there is an example which is used for real of it not being at the 
first level, but at one level down inside a directory.

What it means is that I don't have a mental picture of how this all 
works, and all use cases could then be worked out by following this 
mental picture.  I think it would be helpful if the Wiki contained some 
of the use cases that we have been talking about in this thread - but 
with more detailed information - like the actual commands used to mount 
the filesystems like this, and information as to in what circumstances 
you would perform each action.


>     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.
>    

I don't find this AS confusing, although there is still information 
missing which I asked in another post that wasn't answered.  I still 
can't understand if its possible to initialise a filesystem in degraded 
mode. If you create the filesystem so that -m RAID1 and -d RAID1 but 
only have one device - it implies that it writes two copies of both 
metadata and data to that one device.  However if you successfully 
create the filesystem on two devices and then fail one and mount it -o 
degraded it appears to suggest it will only write the one copy.

I was considering how to migrate from an existing mdmadm Raid1 /lvm 
arrangement

I suppose I could fail one device of the mdm pair and initialise the 
btrfs filesystem with this one device as the first half of a raid1 
mirror and the other as a usb stick, then remove the usb stick and mount 
the filesystem -o degraded.  Copy data to it from the still working half 
available lv and then dispose of mdmadm device completely and add in the 
freed up device using btrfs device add


-- 

Alan Chandler
http://www.chandlerfamily.org.uk


  reply	other threads:[~2011-01-09 20:57 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
2011-01-09 20:57                   ` Alan Chandler [this message]
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=4D2A2128.2060508@chandlerfamily.org.uk \
    --to=alan@chandlerfamily.org.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.