LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-06-2012, 02:58 AM   #1
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Rep: Reputation: 0
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
 
Old 02-06-2012, 04:15 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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?
 
Old 02-06-2012, 04:58 AM   #3
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
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.
 
Old 02-06-2012, 05:05 AM   #4
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
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

Code:
jess@NAS:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sdb1[1]
      1953511936 blocks [2/1] [_U]
 
Old 02-06-2012, 05:08 AM   #5
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
it's still showing a mdadm superblock...
Code:
jess@NAS:~$ sudo mdadm -E /dev/sdb
/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
 
Old 02-06-2012, 05:10 AM   #6
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
tried

sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1
 
Old 02-06-2012, 05:19 AM   #7
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
jess@NAS:~$ sudo mdadm -E /dev/sdb
mdadm: No md superblock detected on /dev/sdb.

and yet the array persists...
 
Old 02-06-2012, 05:23 AM   #8
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
I got it!

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
software raid1 array fails to activate on boot daisychick Linux - Newbie 10 01-24-2012 02:52 PM
Increase RAID1 Array atulya2009 Linux - Newbie 1 02-03-2011 08:09 AM
add a new disk to raid1 array retrev Linux - General 1 04-08-2007 01:57 AM
LXer: Replacing A Failed Hard Drive In A Software RAID1 Array LXer Syndicated Linux News 0 01-30-2007 12:33 PM
How to remove software completely ? naihe2010 Linux - Software 5 10-17-2005 12:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration