[CentOS] Fsck on mdraid array

Thu Jul 22 08:47:54 UTC 2010
Kay Diederichs <kay.diederichs at uni-konstanz.de>

Jussi Hirvi schrieb:
> Something seems to be wrong with my file systems, and I want to fsck 
> everything. But I cannot.
> The setup consists of 2 hds, carrying 3 raid1 (ext3) file systems (boot, 
> /, swap). OS is up-to-date CentOS 5.
> So I boot from CentOS 5.3 dvd in rescue mode, do not mount the file 
> systems, and try to run
> 	fsck -y /dev/md0
> 	fsck -y /dev/md1
> 	fsck -y /dev/md2

you should check, using "cat /proc/mdstat ", whether the raid devices
were found and started.
If not, you could do it manually, e.g.
mdadm /dev/md0 --assemble /dev/sdaX /dev/sdbY
where the disk (e.g. a and b) and partition (e.g. X and Y) names need to
be filled in.
There's also mdadm --examine /dev/sdaX , and of course fdisk -l /dev/sda

Once the devices appear correctly in /proc/mdstat, you should be able to
fsck them.



> For each try I get an error message: "Superblock could not be found..." 
> "The device does not seem to contain a valid ext2 filesystem..."
> Well, of course not, the filesystem is ext3, not ext2.
> I also tried fsck.ext3, but the error messages stay the same.
> So, how could I fsck these arrays?
> - Jussi