LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-04-2006, 01:46 PM   #1
ilhbutshm
Member
 
Registered: Jul 2003
Location: Europe
Distribution: Slackware 10.2
Posts: 104

Rep: Reputation: 15
Remove a raid device to build a new one


Hi!

I'm trying to build a raid 1 device (md0) from /dev/sda1 and /dev/sdb1.

I've already created my raidtab file, but when I try to 'mkraid /dev/md0', I get an error. I checked the current state of raid devices with 'lsraid -p' and this is what I got:
Code:
[dev   9,   0] /dev/md0         7DEF03BE.C9EE48B1.83CDA9EC.A771EE7C offline
[dev   8,   1] /dev/sda1        7DEF03BE.C9EE48B1.83CDA9EC.A771EE7C good
[dev   ?,   ?] (unknown)        00000000.00000000.00000000.00000000 missing
How can I delete / remove / destroy these devices, so I can create them again? I suppose I can leave the /dev/sda1 device alone since it says its good, but I'd like to get rid of md0 and ?? device...
 
Old 09-04-2006, 06:01 PM   #2
ilhbutshm
Member
 
Registered: Jul 2003
Location: Europe
Distribution: Slackware 10.2
Posts: 104

Original Poster
Rep: Reputation: 15
Sys reinstall

Hi

I deleted data on both disks (deleted and rewrote the partition tablesin fdisk), reinstalled LILO and Slackware 10.2.
The problem persists, here is some info:

fdisk /dev/sda
Code:
Disk /dev/sda: 200.0 GB, 200048565760 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         262     2104483+  82  Linux swap
/dev/sda2   *         263        1046     6297480   83  Linux
/dev/sda3            1047       24321   186956437+  83  Linux
fdisk /dev/sdb
Code:
Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         262     2104483+  82  Linux swap
/dev/sdb2             263        1046     6297480   fd  Linux raid autodetect
/dev/sdb3            1047       24321   186956437+  fd  Linux raid autodetect
lsraid -d /dev/sda1
Code:
[dev   9,   0] /dev/md0         80DA9999.519D2C8F.2E2C6CAF.A70C8899 offline
[dev   8,   1] /dev/sda1        80DA9999.519D2C8F.2E2C6CAF.A70C8899 good
[dev   ?,   ?] (unknown)        00000000.00000000.00000000.00000000 missing
I don't really know how this md0 array survived the system reinstall, but I'm guessing I have to get rid of it before I start setting up a new raid1 array.

Am I right, or am I barking at the wrong tree here?

I'd appreciate any useful info on this since I'm a newb
 
Old 09-05-2006, 05:00 AM   #3
ilhbutshm
Member
 
Registered: Jul 2003
Location: Europe
Distribution: Slackware 10.2
Posts: 104

Original Poster
Rep: Reputation: 15
I got some progress now. I found out that the reason raid array 'survived' sys reinstall is that the raid metadata is written to the end of the partition, and I resized the partitions the exact same way as before...

So, to destroy a md0 array I used:
Code:
mdadm --zero-superblock /dev/sda1
But I bumped into a new problem. Not that the md0 array is gone (lsraid -p shows nothing), I try to create a new array with my /etc/raidtab and running:
Code:
mkraid -R /dev/md0
But the second disk always fails. If the first disk in the array should be /dev/sda1, then I get /dev/sdb1 Failed. And versa, if the first disk in the array should be /dev/sdb1, then I get /dev/sda1 Failed.

What to do?

edit: the partition tables are the same as the above, this is my /etc/raidtab:
Code:
raiddev			/dev/md0
raid-level		1
nr-raid-disks		2
nr-spare-disks		0
persistent-superblock	1
device			/dev/sdb1
raid-disk		0
device			/dev/sda1
failed-disk		1
chunk-size		32

raiddev			/dev/md1
raid-level		1
nr-raid-disks		2
nr-spare-disks		0
persistent-superblock	1
device			/dev/sdb2
raid-disk		0
device			/dev/sda2
failed-disk		1
chunk-size		32

raiddev			/dev/md2
raid-level		1
nr-raid-disks		2
nr-spare-disks		0
persistent-superblock	1
device			/dev/sdb3
raid-disk		0
device			/dev/sda3
failed-disk		1
chunk-size		32

Last edited by ilhbutshm; 09-05-2006 at 05:01 AM.
 
  


Reply



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
How to build software RAID-1 running Tristix Sushy Linux - Software 1 06-14-2006 03:53 PM
For RAID should I use Quick INIT or Build and Verify? abefroman Linux - Hardware 2 09-23-2005 05:55 PM
how do i build soft raid 0 in harddrive level without partion... my-unix-dream Linux - Newbie 1 04-30-2005 06:48 PM
How to use Ataptec 2110 raid in custom build coomteng Linux - Hardware 0 09-21-2004 07:46 PM
remove RAID russell_farnell Linux - General 4 09-16-2004 02:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:11 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