All of lore.kernel.org
 help / color / mirror / Atom feed
From: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
To: linux-raid@vger.kernel.org
Subject: md lock issue, I suppose
Date: Mon, 21 Jun 2010 22:42:08 +0200	[thread overview]
Message-ID: <20100621204208.GA29830@lazy.lzy> (raw)

Hi all,

still playing with my wild bunch of RAID-6.

I'm more or less finished with a script adding
an HDD to the different arrays.

The script, originally, was going thru the different
arrays, collecting the partition size, creating the
partition (on the new disk), adding the partition
to the corresponding RAID volume.

Something like:

for v in raid_devices
  find start end part
  parted /dev/sdX mkpart part start end
  mdadm --add $v /dev/sdXpart
end

This works only for the first partition.

The issue seems to be that, after the "--add", the
device is locked and the partition table *cannot*
be updated (the kernel cannot).
The consequence is that the successive "parted",
while succeeding, report a failure (not a problem),
and the /dev/sdXpart does not appear. This means
it will not be added to the next device.

In other words, the script starts with /dev/sdX.
It creates /dev/sdX1.
It adds /dev/sdX1 to the RAID.
It creates /dev/sdX2...
/dev/sdX2 does not appear, the add fails...
...

Is this intended behaviour? Or a bit aggressive locking?

Any possible solution not involving stopping the RAIDs?

Thanks a lot, if you need more info, please let me know.

bye,

-- 

piergiorgio

             reply	other threads:[~2010-06-21 20:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-21 20:42 Piergiorgio Sartor [this message]
2010-06-21 21:08 ` md lock issue, I suppose Stefan /*St0fF*/ Hübner
2010-06-21 21:25   ` Piergiorgio Sartor
2010-06-21 22:22     ` Neil Brown
2010-06-24 18:07       ` Piergiorgio Sartor
2010-06-25 12:39         ` CoolCold

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=20100621204208.GA29830@lazy.lzy \
    --to=piergiorgio.sartor@nexgo.de \
    --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.