Re: Actual effect of mkfs.btrfs -m raid10 </dev/sdX> ... -d raid10 </dev/sdX> ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



deadhorseconsulting posted on Tue, 19 Nov 2013 13:24:01 -0600 as
excerpted:

> 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.

It's all in how you read the documentation.  After years of doing so...

While I can see how you might get that from reading the -m and -d option 
text descriptions, the synopsis indicates differently (excerpt quotes 
reformatted for posting):

SYNOPSIS

mkfs.btrfs  [ -A alloc-start ] [ -b byte-count ] [ -d data-profile ]
[ -f ] [ -n node‐size ] [ -l leafsize ] [ -L label ] [ -m metadata 
profile ] [ -M mixed data+metadata ] [ -s sectorsize ] [ -r rootdir ]
[ -K ] [ -O feature1,feature2,... ] [ -h ] [ -V ] device [ device ... ]


Here, you can see that the -d and -m options take only a single 
parameter, the profile, and that the device list goes at the end and is 
thus a general device list, not specifically linked to the -d and -m 
options.

Similarly, the option lines themselves:

-d, --data type

-m, --metadata profile

... not...

-d, --data type [ device [ device ... ]]

-m, --metdata profile [ device [ device ...]]


Those are from the manpage.  Similarly, the usage line from the output of 
mkfs.btrfs --help (--help being an unrecognized option it says, but it 
does what it needs to do...):

usage: mkfs.btrfs [options] dev [ dev ... ]

options:

-d --data data profile, raid0, raid1, raid5, raid6, raid10, dup or single

-m --metadata metadata profile, values like data profile


All options come first, no indication of per-option device list, then the 
general purpose devices list.


So I'd argue that the documentation's reasonably clear as-is, no per-
option device list, general purpose device list at the end, thus no 
ability to specify data-specific and metadata-specific device lists.

(Of course it can happen that the code gets out of sync with the 
documentation, but that wasn't the argument here.)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux