[olug] Software RAID / accidentally raidhotadd to wrong md

lug at robotz.com lug at robotz.com
Wed Mar 31 19:48:10 UTC 2004


I will type it in here....

/etc/raidtab

raiddev			/dev/md3
raid-level		5
nr-raid-disks		3
chuck-size		64k
oersustebt-superblock	1
nr-spare-disks		0

device			/dev/hda3
raid-disk		0
device			/dev/hdb3
raid-disk		1
device			/dev/hdc3
raid-disk		2

raiddev			/dev/md0
raid-level		1
nr-raid-disks		3
chuck-size		64k
oersustebt-superblock	1
nr-spare-disks		0

device			/dev/hda1
raid-disk		0
device			/dev/hdb1
raid-disk		1
device			/dev/hdc1
raid-disk		2

raiddev			/dev/md4
raid-level		5
nr-raid-disks		3
chuck-size		64k
oersustebt-superblock	1
nr-spare-disks		0

device			/dev/hda2
raid-disk		0
device			/dev/hdb2
raid-disk		1
device			/dev/hdc2
raid-disk		2

raiddev			/dev/md2
raid-level		5
nr-raid-disks		3
chuck-size		64k
oersustebt-superblock	1
nr-spare-disks		0

device			/dev/hda5
raid-disk		0
device			/dev/hdb5
raid-disk		1
device			/dev/hdc5
raid-disk		2

raiddev			/dev/md1
raid-level		5
nr-raid-disks		3
chuck-size		64k
oersustebt-superblock	1
nr-spare-disks		0

device			/dev/hda6
raid-disk		0
device			/dev/hdb6
raid-disk		1
device			/dev/hdc6
raid-disk		2




At Wednesday, 31 March 2004, you wrote:

>Wow, paste your raidtab if you don't mind....let me
>take a peek at that then read your stuff below.  That
>will help....
>
>--- lug at robotz.com wrote:
>> Issue summary:  Had problems with 1 of a 3 drive
>> software raid array.
>> Harddrive is not physically bad, but the array
>> failed today on boot.
>> Used “raidhotadd” to get all of the raid5 partitions
>> (md0 – md3) 
>> up and running with the exception of the most
>> important partition 
>> (md4).
>> 
>> I accidentally tried to “raidhotadd” 2 of the 3
>> drives from md4 into 
>> md2.  Now hdb2 and hdc2 think they are part of md2
>> when they actually 
>> should be part of md4.  This is not reflected in
>> /etc/raidtab but 
>> must be stored somewhere I cannot find.
>> (superblock?)
>> 
>> This leaves only 1 drive in md4 and therefore md4
>> will not start 
>> even degraded.  md4 is a RAID 5 partition, which is
>> supposed to include 
>> hda2, hdb2, and hdc2.  Since RAID wont start on md4,
>> I cannot simply 
>> use “raidhotremove” and “raidhotadd” to correct this
>> mistake (assuming 
>> that would correct the mistake).
>> 
>> I used “raidsetfaulty” to deactivate hdb2 to stop
>> interfering with 
>> the start of md2.  (because hdb2 belongs in md4 and
>> raidhotremove 
>> refuses to get hdb2 out of md2 without deactivating
>> the partition)
>> 
>> lsraid reports md0 – md3 correctly.  However, typing
>> “lsraid –A –d 
>> /dev/hdb2” or “lsraid –A –d /dev/hdc2” shows them as
>> a member of 
>> md2 still.  They should be in md4 instead.
>> 
>> My question #1:  Did my mistake hose the data in
>> both hdb2 and hdc2 
>> making it impossible to recover md4 (my most
>> critical partition containing 
>> /home) or is hdb2 and hdc2 merely confused about
>> where they belong 
>> but still within them is my critical data making
>> recovery of md4 
>> possible?
>> 
>> My question #2: If recovery is possible, should I
>> then “mkraid /dev/md4 
>> –f” and hope for the best or is there a safer way to
>> _save_ my data? 
>> Or perhaps there is a way to make hdb2 and hdc2
>> realize again that 
>> they are part of md4.   
>> 
>> Keep in mind that since md4 won’t start I can’t
>> reverse the mistake 
>> with raidhotadd.
>> 
>> If I failed to provide any details please let me
>> know and I will 
>> elaborate further.
>> 
>> Thank you.
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> OLUG mailing list
>> OLUG at olug.org
>> http://lists.olug.org/mailman/listinfo/olug
>
>=====
>Terry
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Finance Tax Center - File online. File on time.
>http://taxes.yahoo.com/filing.html
>_______________________________________________
>OLUG mailing list
>OLUG at olug.org
>http://lists.olug.org/mailman/listinfo/olug
>









More information about the OLUG mailing list