[SlugLUG] When Bad Hard Drives Happen to Good Linuxes
cerise at armory.com
cerise at armory.com
Tue Oct 3 15:02:12 PDT 2006
On Tue, Oct 03, 2006 at 02:06:34PM -0700, Sean Kellogg wrote:
> As I understand it there is virtually no difference between ext3 and ext2
> outside of the journaling stuff. Which means the conversion from 3 to 2, and
> back again, is painless. Why, exactly, the resizing tools can't do it
> transparently, I don't know. But I've seen in done many a time without
> incident.
There are some differences (which can be turned off or on) between ext3 and
ext2. Most people don't run them (unfortunately, as they result in decreased
performance) fortunately (since it makes this process a lot easier and allows
one to merely mount an ext3 part as ext2.
The biggest one is converting certain directories into hashed B-trees.
Understandably, It is poor form to mess with a journal on a disk. In
doing so, you potentially sabotage its purpose in being there -- ensuring
consistent changes to the filesystem. In the case of XFS, JFS, and reiser
most of the journal handling is actually in the kernel and reasonably
accessible to userspace code.
ext3 is a horse of a slightly different color. In attempting to share as
much as possible code with ext2, they've put a lot of journal handling into
the userspace utilities. All the code to replay a journal is actually in
the mount command rather than the kernel. Since there's a number of ext2
userspace utilities, the development was a little unsynchronized in places.
They've started using shared libraries, but the damage has been done. No
one really wants to use any of those functions or even act as a frontend
to the functions.
So, the short story, is that they make you do the userspace stuff because
the people who developed the userspace weren't as organized as they might
have been. It's really nothing to fear though. All you need to do to convert
from ext3 to ext2 is tune2fs -O '^has_journal' /dev/partition. You don't
even need to run e2fsck back over the filesystem.
I do recommend looking into directory hashing (tune2fs -O dir_index ; e2fsck -D)
when you switch back to ext3 though.
-Phil/CERisE
More information about the Sluglug
mailing list