From: Christian Robottom Reis <kiko@async.com.br>
To: linux-btrfs@vger.kernel.org
Subject: Re: Replacing RAID-1 devices with larger disks
Date: Sun, 28 Feb 2016 17:34:48 -0300 [thread overview]
Message-ID: <20160228203448.GA31674@anthem.async.com.br> (raw)
In-Reply-To: <20160228201532.GA26692@anthem.async.com.br>
On Sun, Feb 28, 2016 at 05:15:32PM -0300, Christian Robottom Reis wrote:
> I've managed to do the actual swap using a series of btrfs replace
> commands with no special arguments, and the system is now live and
> booting from the 256GB drives. However, I haven't actually noticed any
> difference in btrfs fi show output, and usage looks weird. Has anyone
> seen this before or have a clue as to who?
Yes, now I do, about 10 minutes after writing that mail. After a btrfs
replace, if the device being added is larger than the original device,
you need to issue:
btrfs fi resize <devid>:max <path>
to actually use that disk space. So for something like:
> Label: 'root' uuid: 670d1132-00dc-4511-a2f6-d28ce08b4d3a
> Total devices 2 FS bytes used 9.33GiB
> devid 1 size 13.97GiB used 11.78GiB path /dev/sda1
> devid 2 size 13.97GiB used 11.78GiB path /dev/sdb1
>
> Label: 'var' uuid: 815b3280-e90f-483a-b244-1d2dfe9b6e67
> Total devices 2 FS bytes used 56.14GiB
> devid 1 size 80.00GiB used 80.00GiB path /dev/sda3
> devid 2 size 80.00GiB used 80.00GiB path /dev/sdb3
You need to do:
btrfs fi resize 1:max /
btrfs fi resize 2:max /
btrfs fi resize 1:max /var
btrfs fi resize 2:max /var
And it looks great now:
Label: 'root' uuid: 670d1132-00dc-4511-a2f6-d28ce08b4d3a
Total devices 2 FS bytes used 9.34GiB
devid 1 size 40.00GiB used 10.78GiB path /dev/sda1
devid 2 size 40.00GiB used 10.78GiB path /dev/sdb1
Label: 'var' uuid: 815b3280-e90f-483a-b244-1d2dfe9b6e67
Total devices 2 FS bytes used 56.16GiB
devid 1 size 160.00GiB used 80.00GiB path /dev/sda3
devid 2 size 160.00GiB used 80.00GiB path /dev/sdb3
This would be nice to document in the manpage for replace; it would also
be a good addition to the best google hit for replace RAID-1:
http://unix.stackexchange.com/questions/227560/how-to-replace-a-device-in-btrfs-raid-1-filesystem
but I don't have enough reputation to do it myself.
--
Christian Robottom Reis | [+55 16] 3376 0125 | http://async.com.br/~kiko
| [+55 16] 991 126 430 | http://launchpad.net/~kiko
next prev parent reply other threads:[~2016-02-28 20:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-28 20:15 Replacing RAID-1 devices with larger disks Christian Robottom Reis
2016-02-28 20:34 ` Christian Robottom Reis [this message]
2016-02-28 20:36 ` 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=20160228203448.GA31674@anthem.async.com.br \
--to=kiko@async.com.br \
--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.