From: Michael Tokarev <mjt@tls.msk.ru>
To: Janek Kozicki <janek_listy@wp.pl>
Cc: linux-raid@vger.kernel.org
Subject: Re: Deleting mdadm RAID arrays
Date: Tue, 05 Feb 2008 16:52:18 +0300 [thread overview]
Message-ID: <47A86A12.2090405@msgid.tls.msk.ru> (raw)
In-Reply-To: <20080205132717.238c4312@szpak>
Janek Kozicki wrote:
> Marcin Krol said: (by the date of Tue, 5 Feb 2008 11:42:19 +0100)
>
>> 2. How can I delete that damn array so it doesn't hang my server up in a loop?
>
> dd if=/dev/zero of=/dev/sdb1 bs=1M count=10
This works provided the superblocks are at the beginning of the
component devices. Which is not the case by default (0.90
superblocks, at the end of components), or with 1.0 superblocks.
mdadm --zero-superblock /dev/sdb1
is the way to go here.
> I'm not using mdadm.conf at all. Everything is stored in the
> superblock of the device. So if you don't erase it - info about raid
> array will be still automatically found.
That's wrong, as you need at least something to identify the array
components. UUID is the most reliable and commonly used. You
assemble the arrays as
mdadm --assemble /dev/md1 --uuid=123456789
or something like that anyway. If not, your arrays may not start
properly in case you shuffled disks (e.g replaced a bad one), or
your disks were renumbered after a kernel or other hardware change
and so on. The most convient place to store that info is mdadm.conf.
Here, it looks just like:
DEVICE partitions
ARRAY /dev/md1 UUID=4ee58096:e5bc04ac:b02137be:3792981a
ARRAY /dev/md2 UUID=b4dec03f:24ec8947:1742227c:761aa4cb
By default mdadm offers additional information which helps to
diagnose possible problems, namely:
ARRAY /dev/md5 level=raid5 num-devices=4 UUID=6dc4e503:85540e55:d935dea5:d63df51b
This new info isn't necessary for mdadm to work (but UUID is),
yet it comes handy sometimes.
/mjt
next prev parent reply other threads:[~2008-02-05 13:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 10:42 Deleting mdadm RAID arrays Marcin Krol
2008-02-05 11:43 ` Moshe Yudkowsky
2008-02-06 9:35 ` Marcin Krol
2008-02-05 12:27 ` Janek Kozicki
2008-02-05 13:52 ` Michael Tokarev [this message]
2008-02-05 14:33 ` Moshe Yudkowsky
2008-02-05 15:16 ` Michael Tokarev
2008-02-05 14:47 ` Auto generation of mdadm.conf (was: Deleting mdadm RAID arrays) Janek Kozicki
2008-02-05 15:34 ` Auto generation of mdadm.conf Michael Tokarev
2008-02-05 18:39 ` Janek Kozicki
2008-02-05 20:12 ` Deleting mdadm RAID arrays Neil Brown
2008-02-06 9:55 ` Marcin Krol
2008-02-06 10:11 ` Peter Rabbitson
2008-02-06 10:32 ` Marcin Krol
2008-02-06 10:43 ` Neil Brown
2008-02-06 12:03 ` Marcin Krol
2008-02-07 2:36 ` Neil Brown
2008-02-07 9:56 ` Marcin Krol
2008-02-07 21:35 ` Bill Davidsen
2008-02-08 9:35 ` Marcin Krol
2008-02-08 12:44 ` Bill Davidsen
2008-02-08 12:52 ` Marcin Krol
2008-02-06 19:03 ` Bill Davidsen
2008-02-06 11:22 ` David Greaves
2008-02-06 11:56 ` Marcin Krol
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=47A86A12.2090405@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=janek_listy@wp.pl \
--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 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).