linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hugo Mills <hugo@carfax.org.uk>
To: James <torpesco@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Single drive volume + second drive -> RAID1?
Date: Mon, 23 Jan 2012 09:25:15 +0000	[thread overview]
Message-ID: <20120123092514.GA5531@carfax.org.uk> (raw)
In-Reply-To: <CAEPoJ-34AmiaRpSCk4Whby4gDM6PSKYRyLHmG1my5_WFODaNrQ@mail.gmail.com>

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

On Mon, Jan 23, 2012 at 12:52:11AM -0800, James wrote:
> On Mon, Jan 23, 2012 at 12:36 AM, James <torpesco@gmail.com> wrote:
> > I bought one drive to replace the failing one. I'd like to end up with
> > RAID1. Back in July I set up a server for my brother and (unless I'm
> > forgetting a different path we ended up taking), I thought what I did
> > was:
> >  1. mkfs.btrfs on a single drive but tell it to use RAID1
> >  2. copy data on
> >  3. once the second drive for the RAID1 was available, add it to the
> > volume and rebalance (or something)

   Why not just create the filesystem as RAID-1 in the first place?

# mkfs.btrfs -d raid1 -m raid1 /dev/sda1 /dev/sdb1

   Then you can restore from your backups. You do have backups, right?
(Remember, this is a filesystem still marked as "experimental").

> I must be mixing memories. Maybe that's what I did to end up with the
> volume that turned out to be RAID0 for the data. On a whim, even
> thought btrfs filesystem df /path showed no indications of RAID after
> adding the second drive, I issued a balance command. I ran 'df' right
> away and now see the results I don't want -- RAID0 data, RAID1
> metadata. Ctrl-C doesn't seem to be aborting the balance.

   Yes, balances are not interruptible right now. The restriper
patches (in 3.3-rc1) will allow you to monitor balance progress and
stop/restart them. They will also allow you to change RAID levels on
the fly, which is what you were asking for in the first place.

   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
    --- There's an infinite number of monkeys outside who want to ---    
               talk to us about this new script for Hamlet               
                           they've worked out!                           

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

  reply	other threads:[~2012-01-23  9:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23  8:36 Single drive volume + second drive -> RAID1? James
2012-01-23  8:52 ` James
2012-01-23  9:25   ` Hugo Mills [this message]
2012-01-23 21:17     ` James
2012-01-26 10:27       ` 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=20120123092514.GA5531@carfax.org.uk \
    --to=hugo@carfax.org.uk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=torpesco@gmail.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).