mdadm -A erased the superblock ?
Hi,
It appears that a 'mdadm -A' command erased the superblocks on my disks.
Could you please take a look and let me know if I did something wrong ?
(I was adding 2 disks that were in a raid 1 set to a new machine running fedora 8.) Briefly, I issued an 'mdadm --examine /dev/sdd1' command to check the disks in my raid 1 array.
(repeat similar command for /dev/sde1)
Then I issued 'mdadm -A -v -u '400f8c5f:045827ea:f72fe561:698ccea2' /dev/md0' which errored out because it was looking at /dev/sdd instead of /dev/sdd1
Subsequent mdadm --examine commands show no superblock.
In detail below:
[root@brahma ~]# mdadm --examine /dev/sdd1/dev/sdd1:
Magic : a92b4efc
Version : 00.90.00
UUID : 400f8c5f:045827ea:f72fe561:698ccea2
Creation Time : Wed Sep 26 06:15:31 2007
Raid Level : raid1
Used Dev Size : 117242240 (111.81 GiB 120.06 GB)
Array Size : 117242240 (111.81 GiB 120.06 GB) Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Update Time : Fri Feb 29 21:38:49 2008
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Checksum : e40e8b91 - correct
Events : 0.4
Number Major Minor RaidDevice State
this 0 8 33 0 active sync /dev/sdc1
0 0 8 33 0 active sync /dev/sdc1 1 1 8 49 1 active sync /dev/sdd1
[root@brahma ~]# mdadm -A -v -u '400f8c5f:045827ea:f72fe561:698ccea2' /dev/md0
mdadm: looking for devices for /dev/md0
mdadm: cannot open device /dev/dm-2: Device or resource busy
mdadm: /dev/dm-2 has wrong uuid.
mdadm: no recogniseable superblock on /dev/dm-1
mdadm: /dev/dm-1 has wrong uuid.
mdadm: cannot open device /dev/dm-0: Device or resource busy
mdadm: /dev/dm-0 has wrong uuid.
mdadm: no RAID superblock on /dev/sde
mdadm: /dev/sde has wrong uuid.
mdadm: no RAID superblock on /dev/sdd
mdadm: /dev/sdd has wrong uuid.
mdadm: cannot open device /dev/sdc1: Device or resource busy
mdadm: /dev/sdc1 has wrong uuid.
mdadm: cannot open device /dev/sdc: Device or resource busy
mdadm: /dev/sdc has wrong uuid.
mdadm: cannot open device /dev/sdb1: Device or resource busy
mdadm: /dev/sdb1 has wrong uuid.
mdadm: cannot open device /dev/sdb: Device or resource busy
mdadm: /dev/sdb has wrong uuid.
mdadm: cannot open device /dev/sda3: Device or resource busy
mdadm: /dev/sda3 has wrong uuid.
mdadm: cannot open device /dev/sda2: Device or resource busy
mdadm: /dev/sda2 has wrong uuid.
mdadm: cannot open device /dev/sda1: Device or resource busy
mdadm: /dev/sda1 has wrong uuid.
mdadm: cannot open device /dev/sda: Device or resource busy
mdadm: /dev/sda has wrong uuid.
mdadm: 8:65 is identified as a member of /dev/md0, slot 1.
mdadm: 8:49 is identified as a member of /dev/md0, slot 0.
mdadm: failed to add 8:65 to /dev/md0: Invalid argument
mdadm: failed to add 8:49 to /dev/md0: Invalid argument
mdadm: /dev/md0 assembled from 0 drives - not enough to start the array.
[root@brahma ~]# mdadm --examine /dev/sdd1
mdadm: No md superblock detected on /dev/sdd1.
This is with version mdadm - v2.6.2 - 21st May 2007 on fedora 8. Please let me know if the information provided is not sufficient. regards,
-pradeep.
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
Quoted 12 lines · Pradeep
Hi,
It appears that a 'mdadm -A' command erased the superblocks on my
disks.
Could you please take a look and let me know if I did something wrong ?(I was adding 2 disks that were in a raid 1 set to a new machine running fedora 8.)
Briefly, I issued an 'mdadm --examine/dev/sdd1' command to check the disks in my raid 1
array.
(repeat similar command for/dev/sde1)
Quoted 4 lines
Then I issued 'mdadm -A -v -u '400f8c5f:045827ea:f72fe561:698ccea2'
/dev/md0'
which errored out because it was looking at/dev/sddinstead of/dev/sdd1
This isn't why it errored out. It looked at sdd and found nothing there. It also looked at various other devices and found nothing usable there. That is perfectly normal.
What is strange is that it found sdd1 and sde1 in /proc/partitions, but couldn't find names for them in /dev, so it reports them as 8:65 and 8:49
However when you ran the "--examine", it did find /dev/sdd1 in /dev with the correct major/minor numbers. So something must have happened between those two commands.
Also, I cannot think why it is reporting "Invalid argument" and failing to add the devices to the array.
Where there any kernel message (view with 'dmesg') at this time?
NeilBrown
Quoted 2 lines
Where there any kernel message (view with 'dmesg') at this time?
Mar 21 00:27:45 brahma kernel: md: invalid raid superblock magic on sdd Mar 21 00:27:45 brahma kernel: md: sdd does not have a valid v0.90 superblock, not importing! Mar 21 00:27:45 brahma kernel: md: md_import_device returned -22
What is much more interesting, is that I rebooted the machine, and 'mdadm --examine'
started working again (producing output).
I then retried the 'mdadm -A' command and that went through as well.
I did not run any other command that could have written anything to the hard disk.
This is an x86_64 machine - Linux brahma.skynet.xc 2.6.23.15-137.fc8 #1 SMP Sun Feb 10 17:03:13 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
I cannot recall if the raid set was originally created on a 32 or a 64 bit O.S.
Is there any other diagnostic I can try ?
regards,
-pradeep.
Quoted 30 lines · --- NeilBrown
Quoted 12 lines · Pradeep
Hi,
It appears that a 'mdadm -A' command erased the superblocks on my
disks.
Could you please take a look and let me know if I did something wrong ?(I was adding 2 disks that were in a raid 1 set to a new machine running fedora 8.)
Briefly, I issued an 'mdadm --examine/dev/sdd1' command to check the disks in my raid 1
array.
(repeat similar command for/dev/sde1)Quoted 4 lines
Then I issued 'mdadm -A -v -u '400f8c5f:045827ea:f72fe561:698ccea2'
/dev/md0'
which errored out because it was looking at/dev/sddinstead of/dev/sdd1This isn't why it errored out. It looked at sdd and found nothing there. It also looked at various other devices and found nothing usable there. That is perfectly normal.
What is strange is that it found sdd1 and sde1 in
/proc/partitions, but couldn't find names for them in /dev, so it reports them as 8:65 and 8:49However when you ran the "--examine", it did find
/dev/sdd1in /dev with the correct major/minor numbers. So something must have happened between those two commands.
Quoted 9 lines
Also, I cannot think why it is reporting "Invalid argument" and failing to add the devices to the array.
Where there any kernel message (view with 'dmesg') at this time?NeilBrown
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Quoted 8 lines · On Saturday March 22, [email protected] wrote:
Quoted 2 lines
Where there any kernel message (view with 'dmesg') at this time?
Mar 21 00:27:45 brahma kernel: md: invalid raid superblock magic on sdd Mar 21 00:27:45 brahma kernel: md: sdd does not have a valid v0.90 superblock, not importing! Mar 21 00:27:45 brahma kernel: md: md_import_device returned -22
So mdadm did try to assemble the array out of /dev/sdd. I wonder why.
When it did that, it would have told the kernel to forget about all the partitions on /dev/sdd so they didn't confuse things. This is why /dev/sdd1 etc seem to disappear.
Quoted 5 lines
What is much more interesting, is that I rebooted the machine, and 'mdadm --examine'
started working again (producing output).
I then retried the 'mdadm -A' command and that went through as well.
What do you mean exactly. Did it assemble the array correctly?
Quoted 1 line
I cannot recall if the raid set was originally created on a 32 or a 64 bit
O.S.
It shouldn't make any difference.
Quoted 2 lines
Is there any other diagnostic I can try ?
Not sure... If the array is working now, I don't think there is a need to explore further.
If it isn't, maybe
strace -o /tmp/strace mdadm -v -A ......
immediately after a reboot might help (Attach "/tmp/strace").
NeilBrown