Interesting, this confirms what I was observing.
Given the wording in man pages for "-m" and "-d" which states "Specify
how the metadata or data must be spanned across the devices
specified."
I took "devices specified" to literally mean the devices specified
after the according switch.

- DHC


On Tue, Nov 19, 2013 at 3:06 AM, Hugo Mills <h...@carfax.org.uk> wrote:
> On Mon, Nov 18, 2013 at 11:12:03PM -0600, deadhorseconsulting wrote:
>> In theory (going by the man page and available documentation, not 100%
>> clear) does the following command indeed actually work as advertised
>> and specify how metadata should be placed and kept only on the
>> "devices" specified after the "-m" flag?
>>
>> Thus given the following example:
>> mkfs.btrfs -L foo -m raid10 <ssd> <ssd> <ssd> <ssd> -d raid10 <rust>
>> <rust> <rust> <rust>
>>
>> Would btrfs stripe/mirror and only keep metadata on the 4 specified SSD 
>> devices?
>> Likewise then stripe/mirror and only keep data on the specified 4 spinning 
>> rust?
>
>    No. The devices are general purpose. The -d and -m options only
> specify the type of redundancy, not the devices to use. There's a
> project[1] to look at this kind of more intelligent chunk allocator,
> but it's not been updated in a while.
>
> [1] https://btrfs.wiki.kernel.org/index.php/Project_ideas#Device_IO_Priorities
>
>> In trying and creating this type of setup it appears that data is also
>> being stored on the devices specified as "metadata devices". This is
>> observed through via a "btrfs filesystem show". after committing a
>> large amount of data to the filesystem The data devices have balanced
>> data as expected with plenty of free space but the SSD device are
>> reported as either nearly used or completely used.
>
>    This will happen with RAID-10. The allocator will write stripes as
> wide as it can: in this case, the first stripes will run across all 8
> devices, until the SSDs are full, and then will write across the
> remaining 4 devices.
>
>    Hugo.
>
> --
> === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
>   PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
>                 --- If it ain't broke,  hit it again. ---
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to