All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Vasiliy Tolstov <v.tolstov@selfip.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: mdadm raid1 regression
Date: Mon, 6 Jan 2014 09:11:24 +1100	[thread overview]
Message-ID: <20140106091124.32dc1057@notabene.brown> (raw)
In-Reply-To: <CACaajQtt1t-tdCrW6eCgx0_0WxTNR1buV6H2iEj_gWzrV3JZfA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2981 bytes --]

On Fri, 27 Dec 2013 10:48:03 +0400 Vasiliy Tolstov <v.tolstov@selfip.ru>
wrote:

> 2013/4/22 NeilBrown <neilb@suse.de>:
> > I'll try to make sure that works correctly for the next release.
> > Thanks for the report.
> 
> 
> Sorry, Neil. for bumping up old thread. I'm again have problems with
> data-offset param for mdadm.
> I'm using version from git master (guthub). If i try to create raid1 like
> /sbin/mdadm --create --data-offset=2048 --metadata=1.2 --verbose
> --force --run --bitmap=internal --assume-clean --name=md21_901
> md21_901 --level=raid1 --raid-devices=2 /dev/mapper/sas00-21_901
> /dev/mapper/sas01-21_901
> I have
>           Magic : a92b4efc
>         Version : 1.2
>     Feature Map : 0x1
>      Array UUID : 64e0028e:301aa3ce:cdf1a54f:a9e28f27
>            Name : xen25:md21_901  (local to host xen25)
>   Creation Time : Fri Dec 27 10:43:06 2013
>      Raid Level : raid1
>    Raid Devices : 2
> 
>  Avail Dev Size : 10489856 (5.00 GiB 5.37 GB)
>      Array Size : 5244928 (5.00 GiB 5.37 GB)
>     Data Offset : 4096 sectors
>    Super Offset : 8 sectors
>    Unused Space : before=4008 sectors, after=0 sectors
>           State : clean
>     Device UUID : 38771de6:cb5f0dbc:9f32f85f:164e1e89
> 
> Internal Bitmap : 8 sectors from superblock
>     Update Time : Fri Dec 27 10:43:22 2013
>   Bad Block Log : 512 entries available at offset 72 sectors
>        Checksum : 7f07eb77 - correct
>          Events : 2
> 
> 
> But when i try to create raid1 like
> /sbin/mdadm --create --data-offset=1024 --metadata=1.2 --verbose
> --force --run --bitmap=internal --assume-clean --name=md21_901
> md21_901 --level=raid1 --raid-devices=2 /dev/mapper/sas00-21_901
> /dev/mapper/sas01-21_901
> I getting
>           Magic : a92b4efc
>         Version : 1.2
>     Feature Map : 0x1
>      Array UUID : ef22dca1:1424ea9e:1b4dce89:27c61a91
>            Name : xen25:md21_901  (local to host xen25)
>   Creation Time : Fri Dec 27 10:44:21 2013
>      Raid Level : raid1
>    Raid Devices : 2
> 
>  Avail Dev Size : 10491904 (5.00 GiB 5.37 GB)
>      Array Size : 5245952 (5.00 GiB 5.37 GB)
>     Data Offset : 2048 sectors
>    Super Offset : 8 sectors
>    Unused Space : before=1960 sectors, after=0 sectors
>           State : clean
>     Device UUID : afae5e27:6c706246:4c3e3cb0:e5c726ac
> 
> Internal Bitmap : 8 sectors from superblock
>     Update Time : Fri Dec 27 10:44:26 2013
>   Bad Block Log : 512 entries available at offset 72 sectors
>        Checksum : 45be4cd1 - correct
>          Events : 2
> 
> 
> Why data offset specified in command line grows twice in resulting md
> array component?
> 

The value given to --data-offset is assumed to be kilobytes unless it has a
suffix: 'M' for megabytes, 's' for sectors.

The value reported by 'mdadm -D' is (as it says) in sectors.
1024 kilobytes  is 2048 sectors.
If you want to specify sectors, add an 's' suffix.

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2014-01-05 22:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-18 10:38 mdadm raid1 regression Vasiliy Tolstov
2013-04-19 20:52 ` Greg KH
2013-04-21 22:35 ` NeilBrown
2013-04-22  6:28   ` Vasiliy Tolstov
2013-04-22  9:38     ` Sebastian Riemer
2013-04-22  9:56       ` Vasiliy Tolstov
2013-12-27  6:48   ` Vasiliy Tolstov
2014-01-05 22:11     ` NeilBrown [this message]
2014-01-22 11:56       ` Vasiliy Tolstov

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=20140106091124.32dc1057@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=v.tolstov@selfip.ru \
    /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.