Messages in this thread | | | Date | Sat, 23 Oct 1999 18:57:54 +0200 | From | Janos Farkas <> | Subject | Re: Hey Stephen, oops... |
| |
On 1999-10-22 at 15:49:50, Shawn Leas wrote: > It seems they might have been having trouble due to my failure in > attempt to journal my /.
Well, only you can know...
> Anyway, I guess I have two questions now... How can I journal my /, > besides duping it (if I can at all)?
It's certainly possible :) Basically, ext3 declares itself to be ext2 with journaling, and ext3 is checked before ext2, so if your fs is an ext2 one, and you supply an appropriate journal=INUM flag to mount, it will be a journaled ext3 fs. For the root fs to be journaled, you must cause the kernel to know about this journal inode before the kernel starts the user tools, that's what the rootflags= kernel command line option is. Another trick that this journaling thing requires the fs to be writable from the first moment, so the usual mount-readonly-first, boot sequence can't work.
So, to journal the root fs, you need to specify the following in the boot options:
rootflags=journal=INUM rw
With lilo, this is achieved by a similar append line:
append = "anyotheroptionsthatwerehere rootflags=journal=INUM rw"
(Obviously, the journal file needs to be created, and its inode number saved as documented.)
It *might* also be necessary to include these options, (and change the fstype to ext3) in the /etc/fstab file, but I'm not quite sure. I had my system borken for a few hours, and sweating while trying to boot from a rescue disk several times since something just didn't want to mount the root partition, but I *think* this two things are all you need.
I'd also recommend to use tune2fs to set the max mount count a few orders of magnitude higher, or you would be faced soon with boot messages that you are advised to run e2fsck, and it's a bit awkward with the current tools. There could also be some problems with the distributions' startup scripts if they insist on running fsck on /, I have a really modified system.
I think there's still something mininally wrong with the journaled root fs, the documented way of resetting the HAS_JOURNAL flags after a clean ext3 unmount don't work; there will always be a NEEDS_RECOVERY flag, which still causes e2fsck to barf; I think this is a bug, but might be caused by my not-so-mild testing :)
And, finally, not be tempted to simply reset into the journaled filesystem, it can't recover a not-clean plain-old ext2 one, only an already journaled ext3 fs. :) Make sure your system works fine with no other changes than to ext3 by cleanly shutting down a few times, then could the harder beating come :)
Janos
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |