All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ram Ramesh <rramesh2400@gmail.com>
To: Linux Raid <linux-raid@vger.kernel.org>
Subject: Good drive got kicked out - does mdadm assemble across suspend/resume like it does across reboots?
Date: Sun, 12 Oct 2014 12:38:10 -0500	[thread overview]
Message-ID: <543ABC82.5020901@gmail.com> (raw)

I did a minor booboo with my mdadm raid6. I suspended (not shutdown, but 
suspend-to-ram) the machine to install a *new* disk in a hotswap bay for 
a thorough test before usage. This machine also housed a mdadm raid6 
array with 4 disks /dev/sd[cdeg]1 (not /dev/sdf1). When I inserted the 
new disk, I also rearranged the disks in the hotswap cage. I think that 
is a stupid mistake because /dev/sdg1 was also in the cage and now 
became /dev/sdf1 and the new disk got the name /dev/sdg1. I did not 
think much about it, since I thought mdadm would assemble after a resume 
and will find the right disks. I did not bother to check if anything 
happened to /dev/md0.

After checking the new disk (now /dev/sdg1) I added /dev/sdg1 to md0 (as 
spare) without checking /proc/mdstat. I noticed rebuild started to my 
surprise. I was trying to figure out what happened. It looks like resume 
after suspend does not assemble md0 as it does for reboot. So, it looked 
at the new /dev/sdg1 and found to be not part of md0 and degraded the 
array. So when I added it, it thought I am adding a new drive and 
proceeded to rebuild to fix the degraded state. A quick check of 
/dev/sdf1 (which was /dev/sdg1 before my swap) contains everything 
right, but got kicked out of array due to suspend-swap disk-resume issue.

While this is not a disaster, I wonder if my understanding is correct? 
Does this mean mdadm does not scan to assemble as part of resume? More 
importantly, how should I rectify the situation like this? Reboot or 
simply stop md0 and scan in a live system?
Further, how do I use /dev/sdf1 (that was /dev/sdg1 before this 
problem)? zero-superblock and add back to md0?

Sorry, if this was already discussed. If so, just let me know and I will 
search the archive manually as Google did not find it.

Thanks for your help
Ramesh


             reply	other threads:[~2014-10-12 17:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-12 17:38 Ram Ramesh [this message]
2014-12-04 19:10 ` Good drive got kicked out - does mdadm assemble across suspend/resume like it does across reboots? Phillip Susi

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=543ABC82.5020901@gmail.com \
    --to=rramesh2400@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    /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.