Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   Fsck on mdraid array (http://www.linux-archive.org/centos/402254-fsck-mdraid-array.html)

Arun Khan 07-21-2010 04:38 PM

Fsck on mdraid array
 
On Wed, Jul 21, 2010 at 9:42 PM, Jussi Hirvi <listmember@greenspot.fi> wrote:
> 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
>
> For each try I get an error message: "Superblock could not be found..."
> "The device does not seem to contain a valid ext2 filesystem..."

ext2 is the base of the journaling ext3 FS.

I would suggest you use TestDisk
<http://www.cgsecurity.org/wiki/TestDisk> and see if you can recover
your filesystem.
The tool is powerful. I have been able to recover disk partitions and
the filesystems within when all other tools reported "no disk
partition" on the HDD.

Good luck.
-- Arun Khan
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Ross Walker 07-21-2010 06:24 PM

Fsck on mdraid array
 
On Jul 21, 2010, at 12:12 PM, Jussi Hirvi <listmember@greenspot.fi> wrote:

> 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
>
> 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?

Are you using lvm on top of the mdraid?

If so you need to fsck the lvs not the mds.

-Ross

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Gordon Messmer 07-22-2010 01:48 AM

Fsck on mdraid array
 
On 07/21/2010 09:12 AM, Jussi Hirvi wrote:
>
> 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
>
> For each try I get an error message: "Superblock could not be found..."
> "The device does not seem to contain a valid ext2 filesystem..."

Perhaps they weren't started automatically? Try running "mdadm -IRs"
and then look at the contents of /proc/mdstat and the output of 'dmesg'
for more information.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Jussi Hirvi 07-22-2010 08:38 AM

Fsck on mdraid array
 
> Are you using lvm on top of the mdraid?
>
> If so you need to fsck the lvs not the mds.

No lvm's.

I can boot the raid system, and
cat /proc/mdstat
shows clean arrays.

The automatic fsck reported problems a while ago, and corrected them.
When I now try to run certain rsync script, I get kernel panic. I
suspect bad blocks, and/or filesystem errors.

I still don't know why fsck from the rescue dvd does not work.

- Jussi

--
Jussi Hirvi * Green Spot
Topeliuksenkatu 15 C * 00250 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hirvi@greenspot.fi * http://www.greenspot.fi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Kay Diederichs 07-22-2010 08:47 AM

Fsck on mdraid array
 
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.

HTH,

Kay

>
> 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
>

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Mogens Kjaer 07-22-2010 08:54 AM

Fsck on mdraid array
 
On 07/22/2010 10:38 AM, Jussi Hirvi wrote:
...
> I still don't know why fsck from the rescue dvd does not work.

You could try to let the rescue dvd mount the partitions.

Then you can umount them and fsck.

I don't think that the rescue disk assembles the RAID partitions
unless they are going to be mounted.

Mogens

--
Mogens Kjaer, mk@lemo.dk
http://www.lemo.dk
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 07:33 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.