diff options
author | NeilBrown <neilb@suse.de> | 2012-10-04 08:34:21 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-10-04 08:34:21 +0200 |
commit | 72ca9bcff34d705fde5670a76cee7b85c0033c94 (patch) | |
tree | c28be0cf6410e2908e247f9b5b597cc04ac6e09d /mdadm.c | |
parent | Grow/raid10: support reducing the devices in a RAID10. (diff) | |
download | mdadm-72ca9bcff34d705fde5670a76cee7b85c0033c94.tar.xz mdadm-72ca9bcff34d705fde5670a76cee7b85c0033c94.zip |
Allow data-offset to be specified per-device for create
mdadm --create /dev/md0 .... /dev/sda1:1024 /dev/sdb1:2048 ...
The size is in K unless a suffix: K M G is given.
The suffix 's' means sectors.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r-- | mdadm.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -465,7 +465,11 @@ int main(int argc, char *argv[]) "Second value is %s.\n", optarg); exit(2); } - data_offset = parse_size(optarg); + if (mode == CREATE && + strcmp(optarg, "variable") == 0) + data_offset = VARIABLE_OFFSET; + else + data_offset = parse_size(optarg); if (data_offset == INVALID_SECTORS) { fprintf(stderr, Name ": invalid data-offset: %s\n", optarg); |