Re: mkfs devices ordering relevant with devices of different sizes?
From: Josef Bacik <hidden>
Date: 2012-07-27 12:05:32
On Thu, Jul 26, 2012 at 03:09:59PM -0600, David Sterba wrote:
On Wed, Jul 25, 2012 at 03:26:20PM +0200, Cyril B. wrote:quoted
When creating a filesystem with devices of different sizes, the resulting filesystem total size depends on the device order specified to mkfs. When the smaller device is specified first, the second (larger) device is seen as the same size as the first. This doesn't occur when the order is reversed. It's confusing. Is this expected? I'm using the latest btrfs-progs and Linux 3.5.Confusing it is, caused by this commit Author: Josef Bacik [off-list ref] AuthorDate: Wed Mar 28 14:20:52 2012 -0400 Commit: Chris Mason [off-list ref] CommitDate: Tue Jul 3 16:27:46 2012 -0400 btrfs-progs: enforce block count on all devices in mkfs I had a test that creates a 7gig raid1 device but it was ending up wonky because the second device that gets added is the full size of the disk instead of the limited size. So enforce the limited size on all disks passed in at mkfs time, otherwise our threshold calculations end up wonky when doing chunk allocations. Thanks,
Ooops, that's definitely not what I intended, I will fix that up right away, sorry about that. Thanks, Josef