LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-17-2011, 10:11 AM   #1
ghoulsblade
LQ Newbie
 
Registered: Oct 2009
Posts: 6

Rep: Reputation: 0
power outage turned raid ext3 into ext2, how to fix ?


hi all !

after a power outage the raid5 /dev/md2 couldn't be assembled,
mdadm -Af (forced assemble) worked, and i can access all the data when i mount it as ext2, but it used to be ext3 before and i get errors trying to mount it as that.
any idea how to fix it ? or should i just continue to use it as ext2 ?



after it couldn't be assembled directly (sorry, didn't save the original error message)
i found the right drives using
mdadm --misc --examine /dev/sdX
and used
mdadm -Af /dev/md2 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1
(-A assemble, f:forced) and it worked saying
Code:
mdadm: forcing event count in /dev/sde1(0) from 51014 upto 51020

mdadm: forcing event count in /dev/sdf1(1) from 51014 upto 51020

mdadm: forcing event count in /dev/sdg1(2) from 51014 upto 51020

mdadm: forcing event count in /dev/sdh1(3) from 51014 upto 51020

mdadm: forcing event count in /dev/sdi1(4) from 51014 upto 51020
Now when i mount it (i only tried readonly for now) as ext2 it works fine, i can see the files etc,
but it used to be ext3, and when i try to mount it as that i get errors, so something is wrong.

mdadm --misc --examine reportet status clean and correct checksums (i checked before doing forced assemble)

smartctl -H on the physical drives reports they all pass the health-check

# mount -o ro -t ext2 /dev/md2 /media/mytest
works fine, after that umount and
# mount -o ro -t ext3 /dev/md2 /media/mytest
reports :
Code:
mount: wrong fs type, bad option, bad superblock on /dev/md2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

fsck.ext3 /dev/md2 reports :
Code:
terra:~# fsck.ext3 /dev/md2 
e2fsck 1.41.3 (12-Oct-2008)
/dev/md2 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Journal inode is not in use, but contains data.  Clear<y>? 

/dev/md2: e2fsck canceled.

/dev/md2: ********** WARNING: Filesystem still has errors **********
where i cancelled to avoid ruining it.

any idea how to fix the error when mounting as ext3 ?
should i just run fsck.ext3 and tell it to clear journal stuff etc, or would that just remove the ext3 stuff and turn it into ext2 ?
Or is it a bigger mess and i should just use it as ext2 for the time being ?
 
Old 10-17-2011, 10:56 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
What you should do is backup your data, format, and restore. And buy an uninterruptable power supply.
 
Old 10-17-2011, 11:08 AM   #3
ghoulsblade
LQ Newbie
 
Registered: Oct 2009
Posts: 6

Original Poster
Rep: Reputation: 0
yeah i guess that's what i'll do tomorrow,
it just looks worth trying to recover/fsdisk first since it works mounted as ext2.

Quote:
Originally Posted by macemoneta View Post
And buy an uninterruptable power supply.
we have some actually, turns out the one linked to the box with the raid-disks failed XD (a separate box outside the controller),
the computer itself was still running (power was back quickly) =)
 
Old 10-17-2011, 05:45 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,429

Rep: Reputation: 1055Reputation: 1055Reputation: 1055Reputation: 1055Reputation: 1055Reputation: 1055Reputation: 1055Reputation: 1055
The problem is of course that the journal may contain uncommitted updates. So your app(s) think the write has updated the disk, but it ain't there.
Backing up as ext2 merely caries-forward the situation.

... or there may be no problem at all. But I know of no way you can tell - so after an incident like this I scrub everything and do a full restore just to be sure.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Trouble rebuilding RAID-5 array after power outage WindowBreaker Slackware 10 02-02-2010 04:19 AM
Software Raid 1 behaving strangely after power outage Krigslund Linux - Server 6 01-16-2009 02:09 PM
power outage, managed to fix the harddrives with fsck, now qmail doesnt work linux_linux Linux - Newbie 3 03-15-2008 09:54 PM
how to fix when testdisk cant recover ext2/ext3? frenchn00b Linux - Newbie 3 07-19-2007 05:46 PM
RAID 5 after Power outage RabidSquirrel Linux - Hardware 3 08-02-2005 07:46 PM


All times are GMT -5. The time now is 12:29 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration