Thanks for the scripts and the reply !! now i think i understand raid on linux a lot better - but do have additional questions :) 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 ! 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 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/sdc1 Disk /dev/sdc1: 1000.2 GB, 1000202241024 bytes 255 heads, 63 sectors/track, 121600 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: 0x00000000 Device Boot Start End Blocks Id System 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 root@rider:~# fdisk -l /dev/sdd1 Disk /dev/sdd1: 1000.2 GB, 1000202241024 bytes 255 heads, 63 sectors/track, 121600 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: 0x00000000 Disk /dev/sdd1 doesn't contain a valid partition table How do I determine which drive is the key drive or the one to add first to /dev/md1 thanks mjh On Sat, Sep 17, 2011 at 12:23 PM, Andrew McGlashan < andrew.mcglas...@affinityvision.com.au> wrote: > Hi, > > > Joey L wrote: > >> I have a broken raid1 drive set - i was able to fix 1 but the other raid >> still has issues. >> > > You fixed the file system with fsck. One drive [of md0] is considered > fine, the other is becoming fine during the rebuild. > > > i have gone through the tutorials online to bring it back online but still >> unable to bring it back. >> >> Do i have to run fsck on the individual member drives ??? >> > > No. > > > my /proc/mdstat looks like: >> Personalities : [raid1] >> md1 : active raid1 sdc1[0] sdd1[1](S) >> 976758841 blocks super 1.2 [2/1] [U_] >> > > Not sure, but it _may_ be that md1 will rebuild itself using the "*S*pare" > when md0 is fully rebuilt. > > > md0 : active raid1 sda1[2] sdb1[1] >> 972654456 blocks super 1.2 [2/1] [_U] >> [==========>..........] recovery = 50.7% (493690944/972654456) >> finish=416.5min speed=19162K/sec >> > > .. > > my questions is : >> 1. how can i bring it back online. >> > > If one RAID1 member is fine, then the file system should be accessible. It > will just operate in degraded mode in the meantime. > > > 2. what is the (S) mean ? >> > > This is a hot spare, not sure why it isn't rebuilding now.... whilst md0 > is rebuilding. > > > 3. how do i run fsck or other utility on ext4 filesystem ? >> > > You only run fsck to fix a file system, not to fix a RAID set. If the file > system won't mount, then you could try fsck on the md0 or md1 device as > required _before_ you mount it > > > 4. do i run it on the raid1 device /dev/md0 or on the individual devices >> /dev/sda and /devsdb >> > > You would run fsck on the md0 device in your case, but that is your root > file system -- is it mounted now? If it is, then no fsck.... > > Your md1 seems to have been your swap partition, swap doesn't have any file > system on it to fsck. But it is now /mnt/raid ???? > > It might be useful for to supply output from blkid if you need more help. > And also output from the following: > mdadm --detail /dev/md0 > mdadm --detail /dev/md1 > > That [mdadm --detail .... ] will give more details than /proc/mdstat > > > -- > Kind Regards > AndrewM > > Andrew McGlashan > >