Re: mdadm and fsck
Hi Joey,
Joey L wrote:
Thanks for the scripts and the reply !! now i think i understand raid on
linux a lot better - but do have additional questions :)
Great.
My /dev/md0 the root filesystem came back - Thank God !! and you :)
Info you requested :
root@rider:~# mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Mon Jun 27 08:51:23 2011
Raid Level : raid1
Array Size : 972654456 (927.60 GiB 996.00 GB)
Used Dev Size : 972654456 (927.60 GiB 996.00 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Sat Sep 17 22:53:59 2011
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : debian:0
UUID : f696d568:1f4226e3:42f0a70a:68e284a7
Events : 295206
Number Major Minor RaidDevice State
2 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
-- this looks fine !
Yes.
But my issue is /dev/md1 -- i rebooted the machine - now it does not
come up at all and do not know which drive i think is okay - I see both
in fdisk -l and they are okay.
I get this:
root@rider:~# mdadm --detail /dev/md1
mdadm: cannot open /dev/md1: No such file or directory
Then the RAID isn't detected and assembled, not even degraded.
The fdisk tool should be run for each device, not the partitions, so in
this case just /dev/sdc and /dev/sdd -- not /dev/sdc1 or /dev/sdd1
root@rider:~# fdisk -l /dev/sdc
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d27a0
Device Boot Start End Blocks Id System
/dev/sdc1 1 121601 976760001 fd Linux raid
autodetect
root@rider:~# fdisk -l /dev/sdd
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d4cc8
Device Boot Start End Blocks Id System
/dev/sdd1 1 121601 976760001 fd Linux raid
autodetect
How do I determine which drive is the key drive or the one to add first
to /dev/md1
I would try the following to see if the file system can be mounted
successfully. If one errors and the other works fine and you can see
your files okay, then that should help -- perhaps then, make a backup of
the "good" drive, just in case.
mkdir /mnt/sdc1 /mnt/sdd1
mount -o ro -type ext4 /dev/sdc1 /mnt/sdc1
mount -o ro -type ext4 /dev/sdd1 /mnt/sdd1
Hope that gets you enough to work out what is going on.
--
Kind Regards
AndrewM
Andrew McGlashan
Broadband Solutions now including VoIP
Reply to: