All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
To: Devon Beets <devon@sigmalabsinc.com>,
	"Tkaczyk, Mariusz" <mariusz.tkaczyk@linux.intel.com>,
	"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>
Cc: Glenn Wikle <gwikle@sigmalabsinc.com>
Subject: Re: Cannot add replacement hard drive to mdadm RAID5 array
Date: Fri, 23 Apr 2021 09:26:22 +0200	[thread overview]
Message-ID: <8dcf97d2-0980-e8bd-5607-be118b0fea47@intel.com> (raw)
In-Reply-To: <CY4PR1301MB2152C29CB86A1512996B422ECA469@CY4PR1301MB2152.namprd13.prod.outlook.com>

On 22.04.2021 19:56, Devon Beets wrote:
> I ran with sudo since my user is not root in this case:
> 
> printf "%llu\n" -1 > sudo /sys/block/md126/md/resync_start
> -bash: printf: /sys/block/md126/md/resync_start: invalid number
> 
> So, we assumed that you simply wanted us to edit the resync_start file value to the number 18446744073709551615. I did it by hand using a text editor. After doing so, the value of the file changed to none.

That's right, sorry I forgot about sudo. It's a bit tricky to use it with
redirections. Something like this should work:

sudo sh -c 'printf "%llu\n" -1 > /sys/block/md126/md/resync_start'

> After that, I proceeded to reconstruct the array. But I changed the order of the commands. Not sure if that mattered.
> 
> sudo mdadm -S /dev/md125
> mdadm: stopped /dev/md125
> 
> sudo mdadm -a /dev/md127 /dev/sdb
> mdadm: added /dev/sdb
> 
> sudo mdadm -R --force /dev/md126
> mdadm: Started /dev/md/Data with 3 devices (0 new)
> 
> Even though it only reported 3 devices (0 new) during the last command's output, it successfully added the new /dev/sdb drive as a spare, started the array resync, and is recovering now as reported by cat /proc/mdstat.
> 
> Thank you so much for the assistance!

No problem, I'm glad you got it working.

Regards,
Artur

      reply	other threads:[~2021-04-23  7:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12 22:55 Cannot add replacement hard drive to mdadm RAID5 array Devon Beets
2021-03-15 14:38 ` Artur Paszkiewicz
2021-03-16  8:15   ` Tkaczyk, Mariusz
2021-04-06 20:05     ` Devon Beets
2021-04-07 10:25       ` Artur Paszkiewicz
2021-04-22 17:56         ` Devon Beets
2021-04-23  7:26           ` Artur Paszkiewicz [this message]

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=8dcf97d2-0980-e8bd-5607-be118b0fea47@intel.com \
    --to=artur.paszkiewicz@intel.com \
    --cc=devon@sigmalabsinc.com \
    --cc=gwikle@sigmalabsinc.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=mariusz.tkaczyk@linux.intel.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 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.