From rick Mon Apr 7 20:37:50 2003
Date: Mon, 7 Apr 2003 20:37:50 -0700
To: linux-questions-only@ssc.com
Subject: Re: [TAG] An Indication of "crash" from the "last"
Command
User-Agent: Mutt/1.5.3i
Quoting Chris Gianakopoulos (cgianakop@1stconnect.com):
> I proceeded to repair the filesystem with e2fsck,
followed by fsck (because
> the output from e2fsck instructed me to do so to fix
inconsistancies).
You know, it's dead-simple to convert the machine's
filesystems to ext3.
Just boot a maintenance Linux disk (CD or floppy), then do:
# tune2fs -j /dev/hda1
...and so on for each ext2 filesystem, to create the ext3
journals.
Then, mount your hard drive's root filesystem:
# mount -t ext2 /dev/hda1 /mnt
# cd /mnt/etc
# vi fstab
...and change ext2 references to ext3. Reboot, and the system
will now
be a lot more damage-resistant.
You can actually add the journal on a running system with the
filesystem
mounted at the time, but that tends to leave a visible .journal
file in
its root directory.
--
Cheers, "There is hardly anything in the world that some man
cannot make a
Rick Moen little worse and sell a little cheaper, and the people
who consider
rick@linuxmafia.com
price only are this man's lawful prey." - J. Ruskin (attr.)
From rick Mon Apr 7 21:51:03 2003
Date: Mon, 7 Apr 2003 21:51:03 -0700
To: linux-questions-only@ssc.com
Subject: Re: [TAG] An Indication of "crash" from the "last"
Command
Quoting Chris Gianakopoulos (cgianakop@1stconnect.com):
> I do not have a "-j" option according to the man page
associated with my
> SuSE 6.4 distribution. Hmmm. I suspect that a newer
distribution will take
> care of that.
There's more than one way to skin that cat.
You could compile a newer version of the e2fsprogs from
source:
ftp://download.sourceforge.net/pub/sourceforge/e2fsprogs/
http://e2fsprogs.sourceforge.net/
That would give you the updated mkfs.ext3, fsck.ext3, tune2fs,
etc.
You'd also have to install a kernel with the ext3 driver.
One of the neat things about ext3 that makes it safe to try is
that you
can easily just remove the journal from the aforementioned
maintenance
media:
# tune2fs -O ^has_journal /dev/hda1
...or just plain mount it with "-t ext2", if there aren't any
unflushed
journal transactions. In other words, ext3 is physically just
ext2 with
a journal file on top of it.
There are some safeguards to prevent you corrupting a
filesystem with an
unplayed (pending) journal transactions by mounting it "-t
ext2".
Creator Stephen Tweedie details those in a talk he gave at Ottawa
Linux
Showcase, here:
http://olstrans.sourceforge.net/release/OLS2000-ext3/OLS2000-ext3.html
--
Cheers, "There's a sucker born every minute. eBay is the delivery
room."
Rick Moen -- David Crowe
rick@linuxmafia.com