Re: Single drive volume + second drive -> RAID1?
From: Hugo Mills <hidden>
Date: 2012-01-23 09:25:15
On Mon, Jan 23, 2012 at 12:52:11AM -0800, James wrote:
On Mon, Jan 23, 2012 at 12:36 AM, James [off-list ref] wrote:quoted
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!
Attachments
- signature.asc [application/pgp-signature] 190 bytes