LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-27-2007, 04:10 PM   #1
TheB2B
Member
 
Registered: Feb 2007
Posts: 75

Rep: Reputation: 16
Error - Ext3-fs: Error loading journal


Live in the midwest had recently have had problems with power cutting out, on the most recent power outage I attemtpted to restrat my home server, I'm a nobb, and got the following error

Quote:
EXT3-fs: error loading journal
Mount: error 22 mounting ext3
Mount: error 2 mounting none
Switchroot: Mount failed: 22
umount /initrd/dev failed: 2
Kernal panic - not syncing: attempted to kill init!
How can I get my server back up without reformating the disk?
If that is not an opition how can I save my personal files?
 
Old 02-27-2007, 04:32 PM   #2
Samoth
Member
 
Registered: Apr 2005
Distribution: Exherbo
Posts: 474
Blog Entries: 1

Rep: Reputation: 32
You can boot up a live cd, and try to mount the filesystem(probably won't work).

If that doesn't work then you can *fix* the filesystem(doesn't always work) with
Code:
e2fsck -f /dev/<harddrive name and partition
Be warned though, this isn't guaranteed to fix your problem.
 
Old 02-27-2007, 05:15 PM   #3
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Hint: A UPS is a cheap way to protect against power problems.

Do you have a live CD or, perhaps, your install DVD? Can you boot into rescue mode?

If you can, what's happened is that your journal file was corrupted when your power was lost, and you need to convert your ext3 file system to an ext2 version, run fsck on the ext2 system, and then add the journel file back in to make it an ext3 file system.

What I'd suggest is this:

1) Boot linux rescue from your installation media
2) That should (try to) mount your root file system as /mnt/sysroot (You should see a message suggesting that you chroot if the mount was successful.) If it did mount it successfully, use the umount /dev/mapper/VolGroup00-LogVol00 command to unmount it. Note: The device name used here is the one Fedora uses by default. If you've change it, or if you're not using logical volumes, use the correct device name here and below.
3) Now, see if fsck /dev/mapper/VolGroup00-LogVol00 can fix the problem. If it succeeds, you're "home free."
4) If fsck barfs on the file system, use the command
tune2fs -O ^has_journal /dev/mapper/VolGroup00-LogVol00 to remove the journal file.
5) Run fsck /dev/mapper/VolGroup00-LogVol00 again to fix any problems.
6) Run tune2fs -j /dev/mapper/VolGroup00-LogVol00 to recreate the journal file.

And reboot to see if the gods really love you.

Good luck. Let us know what happens, please.
 
Old 02-27-2007, 06:20 PM   #4
Samoth
Member
 
Registered: Apr 2005
Distribution: Exherbo
Posts: 474
Blog Entries: 1

Rep: Reputation: 32
Yeah, but what happens if he doesn't have Logical Volumes?

I realize that your commands you provided are excellent if he uses logical volumes, but he might not.
 
Old 02-27-2007, 07:02 PM   #5
TheB2B
Member
 
Registered: Feb 2007
Posts: 75

Original Poster
Rep: Reputation: 16
I'm not able to mount the drive in resuce mode, get a message no partions found to mount.

Going to try Samoth method, let you all know how it goes.

Yes I agree power supply would be cheaper then going through this.
 
Old 02-27-2007, 09:18 PM   #6
TheB2B
Member
 
Registered: Feb 2007
Posts: 75

Original Poster
Rep: Reputation: 16
None of the suggested methods worked. Going to put in a new hardrive, re-install Fedora and hook up my existing drives. Hope this will salvage my files.
 
Old 02-28-2007, 08:58 AM   #7
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by TheB2B
I'm not able to mount the drive in resuce mode, get a message no partions found to mount.

Going to try Samoth method, let you all know how it goes.

Yes I agree power supply would be cheaper then going through this.
First, you don't want the drive mounted. The recovery methods should be done on an unmounted drive.

Second, using the method suggested by Samoth on a "raw" drive will most likely kill and hope of recovering you data, if your data was stored in a logical volume, as it is if you used the Fedora defaults.

When you get the message you reported, you need to run testdisk on the raw drive to recover the partitions. (testdisk should work for logical volumes .) If testdisk is not available in "rescue" mode (and I don't think it ts) then you should download one of the "Live" rescue disks, or something like the Knoppix live dvd which include it.
 
Old 02-28-2007, 10:06 AM   #8
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by TheB2B
None of the suggested methods worked. Going to put in a new hardrive, re-install Fedora and hook up my existing drives. Hope this will salvage my files.
First, I really hope that you did not actually try the method suggested by Samoth if you had used the Fedora installation defaults. The problem with his suggestion is that a "logical volume" is not any type of ext file system. (Even the partition type is different.) If you let e2fsck write to a logical volume partition, you're almost guaranteed to kill you data. So, you may be completely sunk. (Note: This is why you need to post as much information as possible when asking for help. With file system problems, this is especially important, since methods for one type of file system may be entirely inappropriate for another type. It is for that reason that I qualified my advice by stating that I was assuming that you'd used the default Fedora installation. I just wish that Samoth had mentioned that his advice only applied if you'd chosen to do your partitioning "by hand," and that you were not using any "logical volumes.")

Again, in what follows I'm assuming that you are using the Fedora default installation settings.

OK, once you've got Fedora installed on the new drive, use yum to install testdisk and foremost.

Then run testdisk on you old drive. If that works, check to see if the "repaired" disk is usable by seeing if you can get your BIOS to boot from it. (See the foremost comments below if the repair is not successful.)<edit> Because of the duplicate name problem discussed below, you may need to physically unplug your new drive to see if the old drive may have been "fixed" by testdisk. Warning: When disconnecting a HD, it is not usually sufficient to just unplug the power. You should remove both the power and the drive cable. That's because an unpowered drive with its cable connected can sometimes draw enough power through the cable to burn out the drive controller. Since the controller is often on your mother board, this can result in a computer with no hard drive, or a visit to your local computer store to buy a new computer.</edit>

If that works, you will have another problem: The new drive and the old drive will contain volume groups with identical names. To access both volume groups at the same time you'll need to rename one of them. I'd suggest renaming the volume group on the old drive, and using your new drive as your boot drive. (Note: You will not be able to boot from the drive after the volume group is renamed because the nash boot script stored in the initial RAM disk hard-codes the volume group name that it activates on boot. That can be changed, but it's not a simple process.)

So boot to your new drive and use the vgchange command to rename the volume group on your old drive. (When I was setting up a secondary Fedora on my USB drive, I called its volume group "Fedora," so that's what is in the code below.) Once you've renamed the volume group, access it like this (changing references to /dev/sda to whatever's appropriate for use, and the /usb stuff to whatever you want to call it.:
Code:
$ cat Scripts/MountUsb
#! /bin/bash
# Mount /dev/sda if it exists
if [ -b /dev/sda ]; then
    if ! [ -d /usb ]; then
    echo Creating /usb mount point.
    sudo mkdir /usb
    fi
    sudo /sbin/vgchange -a y Fedora
    sudo mount -t ext3 /dev/Fedora/LogVol00 /usb
    sudo mount -t ext3 /dev/sda3 /usb/boot
else
    echo Drive /dev/sda was not found.
fi
Now, if all that works, you should be able to find you old files and copy them into your new drive.

If it didn't work, you may still be able to find and recover something using the foremost tool. The man pages for foremost are fairly complete, so just do a man foremost for usage instructions.

Again, good luck.

Last edited by PTrenholme; 02-28-2007 at 02:18 PM.
 
Old 02-28-2007, 01:43 PM   #9
Samoth
Member
 
Registered: Apr 2005
Distribution: Exherbo
Posts: 474
Blog Entries: 1

Rep: Reputation: 32
Oops, I have never used Fedora so I had no idea that it uses LVM as a default.

Also, I guess I assumed improperly that OP would know that /dev/hda1 applied to non-lvmed filesystems.

A big Sorry!
 
Old 02-28-2007, 02:23 PM   #10
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by Samoth
Oops, I have never used Fedora so I had no idea that it uses LVM as a default.

Also, I guess I assumed improperly that OP would know that /dev/hda1 applied to non-lvmed filesystems.

A big Sorry!
Yes, I'm a little sensitive to the issue since I blythly ran fsck on a logial volume (a few years ago) and got a poor boat anchor as a result. (Actually, all I had to do was a low-level reformat, and then I had a "new" disk to play with.)
 
Old 03-01-2007, 10:45 PM   #11
TheB2B
Member
 
Registered: Feb 2007
Posts: 75

Original Poster
Rep: Reputation: 16
PTrenholme did has you suggested, booted up with the resuce disk and run the commands listed in your post. As I posted earlier when I boot up with rescue disk it will not mount my current drives.

I have not installed a newer drive, will try to work out this issue first, then install the latest version of Fedora.

Answer to your question as far as I know I loaded Fedora with the default device name. As for as using logical volumes I hate to admit to it but I don't know. I first started out with two drives, first drive was an old 30 meg hard drive with one 30 gig hardrive. When I saw I was running out of space I added an 15 gig drive. The drives all "appear" as one large drive.

When I run the first command, fsck /dev/mapper/VolGroup00-LogVol00, I get the following message.

Quote:
Warning couldn't open /etc/fstab: no such file or directory.
When I ran your second command I got the following:

Quote:
fsck.ext2: No such file or directory while trying to open /dev/mapper/VolGroup00-LogVol00

The supper block could not be read or does not describe a correct ext2 file system. If the device is valid and it really contains an ext2 file systerm (and not a swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193<device>.
I did not run Samoths commands or suggestions after I read your post. I have been off line due to the weather, again.

Supposed next step is to determine what my "device" name is? As posted at the start of this thread, I'm a novice at linux, slave to m$.
 
Old 03-02-2007, 09:26 AM   #12
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
It sure sounds like the mapper failed to find the drive.

What do you see when you (in linux rescue mode) do a dmsetup ls? Since you're using three drives mapped into one, those should be shown and their mappings. Unless the mapping is done by your BIOS. (I'm puzzled by you statement that
Quote:
I first started out with two drives, first drive was an old 30 meg hard drive with one 30 gig hardrive. When I saw I was running out of space I added an 15 gig drive. The drives all "appear" as one large drive.
since -- as far as I know, the only way to achieve that within Linux is by using the dmsetup command.)

Also, what is shown when you do a fdisk -l?

And, what (if any) output do you see when you run the lvm vgscan --ignorelockingfailure command?

----------

Did/can you get a copy of testdisk? (If not, download a rescue CD. For example, this is the first one listed when I "Googled" "rescue cd." It claims you can run it from a USB RAM stick, and I'm going to try it in a while myself. If it works, it will be handy to have around.)

Once you've got testdisk, try running it on you drive to see what it can do to fix things for you.
 
Old 03-02-2007, 12:27 PM   #13
TheB2B
Member
 
Registered: Feb 2007
Posts: 75

Original Poster
Rep: Reputation: 16
Run dmsetup ls and it found or reported nothing.

Run fdisk -l found the following

Quote:
Disk /dev/hda 6448 mb
255 heads, 63 sectors/track, 784 cylinders
units=cylinders of 16015*512=8225280 bytes

Device Boot Start End Blocks ID System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 784 6193057 8e Linux LVM

Disk /dev/hdc: 30.0 Gb
255 heads, 63 sectors/track, 3649 cylinders
units=cylinders of 16015*512=8225280 bytes

Device Boot Start End Blocks ID System
/dev/hdc1 * 1 3649 29310561 8e Linux LVM


Disk /dev/hdc: 30.0 Gb
255 heads, 63 sectors/track, 1823 cylinders
units=cylinders of 16015*512=8225280 bytes

Device Boot Start End Blocks ID System
/dev/hdd1 2 1823 14635215 f W95 Ext (LBA)
/dev/hdd5 2 1823 14635183 7 HPFS/NTFS
Based on the output from the last entry I would assume my addition of a new drive was unsuccessfull?

I then ran lvm vgscan with both the --ignorelockingfailure command and without, I got the same results.

Quote:
Found volume group "VolGroup00" using metadata type lvm2
For a repair disk, I have copy of Ultimate Boot CD from
http://www.ultimatebootcd.com/
From their websight it lists testdisk but under catogory of partition tools, this look correct to you?
 
Old 03-02-2007, 03:18 PM   #14
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Yes, you can call testdisk a partition tool since its primary purpose is to recover lost/deleted partitions. But it also can attempt (some) repairs on LV partitions.

Anyhow, the vgscan did find your LV. So, after booting into rescue mode, try this:
Code:
vgchange -ay --ignorelockingfailure VolGroup00 # Any errors, stop and let's see what they are
ls /dev/mapper/ # This should list control, VolGroup00-LogVol00 and VolGroup00-LogVol01
e2fsck /dev/mapper/VolGroup00-LogVol00
If that all works, you may have it fixed. If not, and the vgchang and ls did work, try the stuff I first suggested to remove the journal file and recreate it.

Also, did you copy the fdisk output by hand? What you listed shows /dev/hdc twice, but lists the /dev/hdd stuff after second one. (Not a problem, just a minor discrepancy.)

Anyhow, that listing shows three separate drives, hda, hdc, and hdd. Not, as you implied above, a single logical drive made up of hda, hdc, and hdd. (Your third drive, hdd, seems strangely partitioned - it seems to have been set up with an "extended" partition, and that one (hdd5) formatted as an NTFS drive. Is it possible that you've confused an "extended partition" -- which is needed to handle more than 4 "primary" partitions on a drive -- with an "additional" partition? Partitions describe the physical layout of data on the disk drive, whilst, for example, LVM deals with the "logical" organization of those physical parts into usable wholes. [Note: the FAT partition, shown as hdd1, is supposed to overlap the "extended" partition -- as it does in your listing. That's how partitions are extended.])

I don't see any new drive in that listing, and it should have been there if it was connected even if it wasn't yet partitioned.

So, again, let's see what happens.
 
Old 03-02-2007, 04:57 PM   #15
TheB2B
Member
 
Registered: Feb 2007
Posts: 75

Original Poster
Rep: Reputation: 16
Yes I copied the information by hand and I should have only listed hdc once. Went back and checked and it should be hda1, hda2, hdc, hdd1 and hdd5. The last two hdd1 & hdd5, this drive come out of a windows machine and no the disk was never 'joined" or formated to be part of my linux machine, my error. Once I get my system back up, will need to do that. This is my "new drive".

When I run vgchange and vgscan in rescue mood from the fedora rescue cd I get a message that the commands not found.
When I run ls /dev/mapper/ all it lists is control it does not list VolGroup00-LogVol00 and/or VolGroup00-LogVol01.
When I run e2fsck /dev/mapper/VolGroup00-LogVol00 returns message no such file or directory.


I ran testdisk but not sure what to do, how far to take it. I have determined that there are two paritions on the frist hard drive and the second parition, hda2, appears with an unknown file type. This is the cause of my problems, correct?

Is there anyway to go after just this parition(?) and bring it back up with the correct file system, ext3? If I reformat just this parition, accept loss of any data on this parition, will this allow my machine to boot up?

Last but not least I am out of my element in dealing with this, going through a rapid learning curve, how would I find a local linux users group?
 
  


Reply



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
EXT3-fs: error loading journal Delphinusnz Fedora 12 07-28-2009 11:59 AM
EXT3-fs error (device md0) in start_transaction: Journal has aborted pilot11 Linux - Software 14 02-27-2007 04:14 AM
Journal I/O error banjo1 Linux - Hardware 1 02-08-2007 09:03 PM
EXT3-fs: error loading journal canyon289 Fedora 2 06-23-2005 03:02 PM
Crash! Error loading journal mrflora Red Hat 0 02-20-2004 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 01:25 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration