-   Linux - Newbie (
-   -   how to completely remove software raid1 array (

daisychick 02-06-2012 03:58 AM

how to completely remove software raid1 array
I'm trying to completely delete a software raid 1 array and yet, it keeps coming back. my mdadm.conf has nothing in it anymore and there's no mount point in fstab. I zeroed the superblocks but it keeps showing back up after a reboot. How do I get rid of it? I want to start over with two partitions instead of just one.

1991 sudo mdadm --detail /dev/md0
1992 sudo mdadm --stop /dev/md0
1993 sudo mdadm --zero-superblock /dev/sdb1
1994 sudo mdadm --zero-superblock /dev/sdc1
1995 sudo vi /etc/mdadm/mdadm.conf

acid_kewpie 02-06-2012 05:15 AM

one command a year? That's slow progress... ;-)

are the partitions still defined as raid in fdisk?

AFAIK you shouldn't need a mdadm.conf file at all, as all the metadata is stored in the partitions. Mind you the zero-superblock should cover that too... did you try a "--force" with it to be sure?

daisychick 02-06-2012 05:58 AM

heh. Yeah, I like my RAID old school. And doh. I forgot about the partitions. Let me wipe them and I'll go from there. That should do the trick though.

daisychick 02-06-2012 06:05 AM

ok, explain this one... I wiped the partitions and set them to plain linux instead of raid and the array still comes up as active oO


jess@NAS:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sdb1[1]
      1953511936 blocks [2/1] [_U]

daisychick 02-06-2012 06:08 AM

it's still showing a mdadm superblock...

jess@NAS:~$ sudo mdadm -E /dev/sdb
          Magic : a92b4efc
        Version : 0.90.00
          UUID : 306e2114:444e0ff2:cced5de7:ca715931 (local to host NAS)
  Creation Time : Wed Jan 26 19:37:42 2011
    Raid Level : raid1
  Used Dev Size : 1953511936 (1863.01 GiB 2000.40 GB)
    Array Size : 1953511936 (1863.01 GiB 2000.40 GB)
  Raid Devices : 2
  Total Devices : 1
Preferred Minor : 0

    Update Time : Sun Feb  5 21:47:36 2012
          State : clean
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0
      Checksum : c626adbc - correct
        Events : 4380

      Number  Major  Minor  RaidDevice State
this    1      8      16        1      active sync  /dev/sdb

  0    0      0        0        0      removed
  1    1      8      16        1      active sync  /dev/sdb

daisychick 02-06-2012 06:10 AM


sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1

daisychick 02-06-2012 06:19 AM

jess@NAS:~$ sudo mdadm -E /dev/sdb
mdadm: No md superblock detected on /dev/sdb.

and yet the array persists...

daisychick 02-06-2012 06:23 AM

I got it!

mdadm --misc --zero-superblock --force /dev/sdb

All times are GMT -5. The time now is 05:54 PM.