Re: Why does md3 persist after deleting and recreating the partitions?

Previous thread: Re: Why won't mdadm start several RAIDs that appear to be fine? (more info) by Jim Schatzman on Thursday, December 30, 2010 - 4:32 pm. (1 message)

Next thread: Absymal performance of O_DIRECT write on parity raid by Spelic on Thursday, December 30, 2010 - 9:35 pm. (2 messages)
From: Mark Knecht
Date: Thursday, December 30, 2010 - 5:10 pm

Hi,
   What am I forgetting to do? I had a RAID1 using sd{a,b,c}3. I
stopped md3, removed the md3 line in /etc/mdadm.conf, deleted the
partitions using fdisk, and then created 5 new partitions using
sd{a,b,c,d,e}3 to get ready to do a 5 disk RAID6. The new partitions
are the same size as the old ones and located at the same sector
addresses.

   After rebooting, but before creating the new RAID6, I still see md3:

mark@c2stable ~ $ cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md6 : active raid1 sdb6[1] sdc6[2] sda6[0]
      247416933 blocks super 1.1 [3/3] [UUU]

md3 : active raid1 sdc3[2] sdb3[1] sda3[0]
      52436096 blocks [3/3] [UUU]

md5 : active raid1 sdc5[2] sdb5[1] sda5[0]
      52436032 blocks [3/3] [UUU]

unused devices: <none>
mark@c2stable ~ $


   What am I doing wrong or forgetting? I would like md3 to be totally
gone before I create a new md3 in it's place.

Thanks,
Mark
--

From: Mathias Burén
Date: Thursday, December 30, 2010 - 5:12 pm

Erase the superblocks? Recreating partitions doesn't (usually) affect
the data on the HDDs.

// M
--

From: Mark Knecht
Date: Thursday, December 30, 2010 - 5:14 pm

Is erasing the superblocks a mdadm operation? I've not heard of that one before.

Thanks,
Mark
--

From: Mathias Burén
Date: Thursday, December 30, 2010 - 5:16 pm

Yes, see mdadm --misc. Like:

mdadm --zero-superblock <device>

// M
--

From: Mark Knecht
Date: Thursday, December 30, 2010 - 5:17 pm

Yes, just found that.

Can I still use /dev/md3 safely even though it's no longer in
mdadm.conf? I suspect I can?

Cheers,
Mark
--

From: Neil Brown
Date: Thursday, December 30, 2010 - 6:07 pm

That sentence doesn't make much sense to me, so I suspect some misunderstand
is going on.  So to be explicit:

  Use
    mdadm --zero-superblock /dev/sdc3 /dev/sdb3 /dev/sda3

 to remove  from those devices any record that they are part of any md array.

Does that clarify thing sufficienty?

NeilBrown

--

From: Mark Knecht
Date: Thursday, December 30, 2010 - 6:33 pm

Yes, making sure to do

mdadm -S /dev/md3

first.

/dev/md3 seems to be gone at this point. On to doing the new RAID6.
(See other thread - no one has responded to that one yet.)

Thanks again,
Mark
--

Previous thread: Re: Why won't mdadm start several RAIDs that appear to be fine? (more info) by Jim Schatzman on Thursday, December 30, 2010 - 4:32 pm. (1 message)

Next thread: Absymal performance of O_DIRECT write on parity raid by Spelic on Thursday, December 30, 2010 - 9:35 pm. (2 messages)