From: Ram Ramesh <rramesh2400@gmail.com>
To: NeilBrown <neilb@suse.com>, Linux Raid <linux-raid@vger.kernel.org>
Subject: Re: Why can't I re-add my drive after partition shrink?
Date: Wed, 19 Jul 2017 19:39:14 -0500	[thread overview]
Message-ID: <05a2d9b7-3b6a-2b49-53ad-3436061558fc@gmail.com> (raw)
In-Reply-To: <87fudsxbmz.fsf@notabene.neil.brown.name>
On 07/19/2017 06:14 PM, NeilBrown wrote:
> On Wed, Jul 19 2017, Ram Ramesh wrote:
>
>> Here is my attempt to repeat the steps in my last attempt to remove,
>> repartition, re-add. Last time I did it on /dev/sdb. Now I am going to
>> do it on /dev/sdc. Note that I have not been successful as you see at
>> the end. I am going to keep the array degraded so that I can still get
>> old info from /dev/sdc1, if you need anything else. I will keep it this
>> way till tomorrow and then add the device for md to rebuild. Please ask
>> anything else before that or send me a note to keep the array degraded
>> so that you can examine /dev/sdc1 more.
> Thanks.  I *love* getting all the details.  You cannot send too many
> details!
>
> This:
>> <good device still in md0>
>>> zym [rramesh] 265 > sudo  mdadm --examine /dev/sdb1
>>> /dev/sdb1:
> ..
>>>   Avail Dev Size : 6442188800 (3071.88 GiB 3298.40 GB)
> and this:
>
>> <device just removed and repartitioned>
>>> zym [rramesh] 267 > sudo mdadm --examine /dev/sdc1
>>> /dev/sdc1:
> ...
>>>   Avail Dev Size : 11720780943 (5588.90 GiB 6001.04 GB)
> Shows the key difference.  "Avail Dev Size", aka sb->data_size, is
> wrong.  We can fix it.
>
>> <Cannot re-add!!!!>
>>> zym [rramesh] 270 > sudo mdadm /dev/md0 --re-add /dev/sdc1
>>> mdadm: --re-add for /dev/sdc1 to /dev/md0 is not possible
> Please try
>     sudo mdadm /dev/md0 --re-add /dev/sdc1 --update=devicesize
>
> Thanks,
> NeilBrown
Neil,
Thanks a ton. That does it. It got re-added without any issue. It is 
rebuilding because the array was used to record two TV programs when it 
was in degraded state. But the re-add is accepted.
> zym [rramesh] 274 > sudo mdadm /dev/md0 --re-add /dev/sdc1 
> --update=devicesize
> Size was 11720780943
> Size is 6442188800
> mdadm: re-added /dev/sdc1
> zym [rramesh] 275 > cat /proc/mdstat
> Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] 
> [raid4] [raid10]
> md0 : active raid6 sdc1[10] sdb1[6] sdg1[11] sdd1[12] sdf1[8] sde1[9]
>       12348030976 blocks super 1.2 level 6, 64k chunk, algorithm 2 
> [6/5] [UU_UUU]
>       [========>............]  recovery = 42.6% 
> (1316769920/3087007744) finish=292.2min speed=100952K/sec
>       bitmap: 2/23 pages [8KB], 65536KB chunk
>
> unused devices: <none>
Wol,
    If you read this, this may worth a mention on wiki page.
Ramesh
next prev parent reply	other threads:[~2017-07-20  0:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13 23:17 Why can't I re-add my drive after partition shrink? Ram Ramesh
2017-07-13 23:37 ` Anthony Youngman
2017-07-14  1:35 ` NeilBrown
2017-07-15  0:17   ` Ram Ramesh
2017-07-16 22:37     ` NeilBrown
2017-07-17  5:15       ` Ram Ramesh
2017-07-19 20:55         ` Ram Ramesh
2017-07-19 23:14           ` NeilBrown
2017-07-20  0:39             ` Ram Ramesh [this message]
2017-07-20 10:23               ` Wols Lists
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=05a2d9b7-3b6a-2b49-53ad-3436061558fc@gmail.com \
    --to=rramesh2400@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).