LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-19-2009, 12:19 AM   #1
BinWondrin
Member
 
Registered: Jun 2008
Distribution: Fedora, RHEL, Ubuntu
Posts: 33

Rep: Reputation: 15
Cannot re-create software raid


I am tearing my hair out!
  1. I rebuilt a system that had a raid-1 software raid setup.
  2. I had lvm2 on top of the software raid-1 on the old system.
  3. For the rebuilt system I decided to go without lvm on the raid-1 disk.
I seem to have remnants of the old superblocks on one of the drives. I tried to zerodisk the hard drives. I re-partitioned them and whatnot.

Here is some of the relevant info:
Code:
[root@acoustix ~]# mdadm --detail md0
mdadm: cannot open md0: No such file or directory
and ...
Code:
[root@acoustix ~]# fdisk -l

Disk /dev/sda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0000a6f0

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          25      200781   83  Linux
/dev/sda2              26       48641   390508020   8e  Linux LVM

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000376ac

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      121601   976760001   fd  Linux raid autodetect

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0003478f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      121601   976760001   fd  Linux raid autodetect
and...
Code:
[root@acoustix ~]# mdadm --examine /dev/sdb1
/dev/sdb1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : ee0b6cb3:85affa5d:0a205f1d:b371822a
  Creation Time : Sun Jan 18 20:52:02 2009
     Raid Level : raid1
  Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
     Array Size : 976759936 (931.51 GiB 1000.20 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0

    Update Time : Sun Jan 18 20:55:09 2009
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : aa070f11 - correct
         Events : 5


      Number   Major   Minor   RaidDevice State
this     0       8       17        0      active sync   /dev/sdb1

   0     0       8       17        0      active sync   /dev/sdb1
   1     1       8       33        1      active sync   /dev/sdc1


Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0003478f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      121601   976760001   fd  Linux raid autodetect
and ...

Code:
[root@acoustix ~]# mdadm --examine /dev/sdc1
mdadm: No md superblock detected on /dev/sdc1.
and finally:

Code:
[root@acoustix ~]# mdadm --zero-superblock /dev/sdb1
mdadm: Couldn't open /dev/sdb1 for write - not zeroing
Do I have to wipe /dev/sdb completely to be able to reuse it?
How should I wipe it? dd /dev/zero? This is a 1 terabyte drive. Could take a while.

Any help is appreciated. Sorry for the longish post.

BinWondrin
:-)

Last edited by BinWondrin; 01-19-2009 at 12:22 AM.
 
Old 01-19-2009, 12:43 AM   #2
centos82
Member
 
Registered: Sep 2008
Distribution: CentOS
Posts: 75

Rep: Reputation: 16
Run "fdisk /dev/sdb"

If you want /dev/sdb1 to be a partition for an ext2/3 filesystem:
At prompt type: t
At prompt type: 1
At prompt type: 83

If you want /dev/sdb1 to be a prtition usable with LVM:
At prompt type: t
At prompt type: 1
At prompt type: 8e


To finalize the changes at the prompt type "w" and hit enter.

Last edited by centos82; 01-19-2009 at 12:51 AM.
 
Old 01-19-2009, 12:15 PM   #3
BinWondrin
Member
 
Registered: Jun 2008
Distribution: Fedora, RHEL, Ubuntu
Posts: 33

Original Poster
Rep: Reputation: 15
Sorry CentOS82,
I guess I didn't explain myself properly. I used fdisk on the 2 drives several times switching it back and forth between type 82 and fd but to no avail. I still couldn't add both devices to the software raid-1 array.


BinWondrin
 
Old 01-19-2009, 12:23 PM   #4
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 475

Rep: Reputation: 73
BinWondrin,

What does 'cat /proc/mdstat' currently report?
 
Old 01-19-2009, 04:00 PM   #5
BinWondrin
Member
 
Registered: Jun 2008
Distribution: Fedora, RHEL, Ubuntu
Posts: 33

Original Poster
Rep: Reputation: 15
[root@acoustix ~]# cat /proc/mdstat
Personalities :
md_d0 : inactive sdb1[0](S)
976759936 blocks

unused devices: <none>
 
  


Reply

Tags
mdadm, raid


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
Error when create second Software Raid devices? hocheetiong Linux - Newbie 1 01-13-2008 02:40 PM
how do you create software raid on rh8 using lvm xender69 Red Hat 6 12-03-2007 04:19 PM
How to create software raid on existing /? Micro420 Linux - General 2 11-29-2007 02:19 AM
Create RAID 5 software array wesleywest Red Hat 3 02-09-2005 02:41 AM
Create software RAID partitions first, then create filesystem partitions on top of th stefanlasiewski Linux - Software 1 04-28-2004 04:12 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration