After a (hardware) crash yesterday, I was unable to boot up due to unrecoverable ide errors (according to the printk()s) when accessing the root filesystem's journal for recovery. Unable to recover, I tried deleting the has_journal option, but that was disallowed given that the needs_recovery flag was set. I saw no way to unset that flag. Unable to access the backups (they were on a fw drive), I was able to dump the unrecovered filesystem, mke2fs and restore. (And then had to dl a new rescue floppy so that I could boot with the recovered fs as root in order to get lilo(8) or grub(8) to run. But that is a different issue.) So I'm back to a un-journaled root for the moment (at least it is small). Was dump/mkfs/restore the only option in such a case, or is there a way to mount the fs w/o recovering the journal? Simply ignoring the journal, as the dump/mkfs/restore did, is better than an unbootable box. Or was the solution I ended up with the only way out? -JimC
On Aug 20, 2002 16:55 -0400, James H. Cloos Jr. wrote:> After a (hardware) crash yesterday, I was unable to boot up due to > unrecoverable ide errors (according to the printk()s) when accessing > the root filesystem's journal for recovery. > > Unable to recover, I tried deleting the has_journal option, but that was > disallowed given that the needs_recovery flag was set. I saw no way > to unset that flag.Well, you could use "echo ^needs_recovery | debugfs -w /dev/foo" to remove this flag, and then use tune2fs to remove the journal. You could just use e2fsck -f on the dumped filesystem image. It _should_ also detect that the journal data is corrupt, but you might not want to take that chance.> Unable to access the backups (they were on a fw drive), I was able to > dump the unrecovered filesystem, mke2fs and restore.When you say "dump" do you mean dump as in backup, or dump as in "dd"?> So I'm back to a un-journaled root for the moment (at least it is small). > > Was dump/mkfs/restore the only option in such a case, or is there a > way to mount the fs w/o recovering the journal? Simply ignoring the > journal, as the dump/mkfs/restore did, is better than an unbootable box.Well, no, there is no way to mount the filesystem with that flag set, although it is possible (as shown above) to remove it in emergency. Cheers, Andreas -- Andreas Dilger http://www-mddsp.enel.ucalgary.ca/People/adilger/ http://sourceforge.net/projects/ext2resize/
>>>>> "Andreas" == Andreas Dilger <adilger@clusterfs.com> writes:>> Unable to access the backups (they were on a fw drive), I was able >> to dump the unrecovered filesystem, mke2fs and restore.Andreas> When you say "dump" do you mean dump as in backup, or dump as Andreas> in "dd"? dump(8) and restore(8), as in backup. -JimC
>>>>> "Andreas" == Andreas Dilger <adilger@clusterfs.com> writes:>> Unable to recover, I tried deleting the has_journal option, but >> that was disallowed given that the needs_recovery flag was set. I >> saw no way to unset that flag.Andreas> Well, you could use "echo ^needs_recovery | debugfs -w Andreas> /dev/foo" to remove this flag, and then use tune2fs to remove Andreas> the journal. I forgot about debugfs. Does removing the needs_recovery and then the has_journal flags then leave a fs essentially identical to a dump(8)/mke2fs(8)/restore(8) sequence? (In this particular case, there would not have been any changes to the fs, other than access_time updates, in the journal.) -JimC
On Tue, Aug 20, 2002 at 04:55:21PM -0400, James H. Cloos Jr. wrote:> After a (hardware) crash yesterday, I was unable to boot up due to > unrecoverable ide errors (according to the printk()s) when accessing > the root filesystem's journal for recovery.Were you trying to recover the filesystme using e2fsck? What version of e2fsck were you using? And what messages did e2fsck print out? - Ted
On Aug 20, 2002 19:50 -0400, James H. Cloos Jr. wrote:> >>>>> "Andreas" == Andreas Dilger <adilger@clusterfs.com> writes: > Andreas> Well, you could use "echo ^needs_recovery | debugfs -w > Andreas> /dev/foo" to remove this flag, and then use tune2fs to remove > Andreas> the journal. > > I forgot about debugfs. > > Does removing the needs_recovery and then the has_journal flags then > leave a fs essentially identical to a dump(8)/mke2fs(8)/restore(8) > sequence? (In this particular case, there would not have been any > changes to the fs, other than access_time updates, in the journal.)Pretty much, yes. Restore may have layed out your files differently, and in particular may have overwritten the "bad spots" on your disk. Note that newer disks are "magical" with their block recovery, in that they only ever give read errors. If you try to write to a bad block, it will be automatically remapped, so overwriting the bad sectors with data will have fixed the bad sectors and "badblocks" will likely not show any problems. Cheers, Andreas -- Andreas Dilger http://www-mddsp.enel.ucalgary.ca/People/adilger/ http://sourceforge.net/projects/ext2resize/