Converting ext2 to ext3 while mounted

Posted in Linux

There’s not much to it, but this troubleshooters article goes over the steps used to add a journal to an ext2 file system.

I just have one problem with this artcle: The fear of adding a journal to a mounted file system is unnecessary.

There’s no need to unmount it or to mount read-only before adding the journal. If you operate on a mounted file system, the journal gets created on a regular inode and marked immutable. Upon your next boot, the journal will be moved to the hidden inode.

# tune2fs -j /dev/sda7

tune2fs 3.3.3 (21-Dec-2012)
Creating journal inode: done
This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

# ls -la

total 131232
drwxr-xr-x  3 root root      4096 2009-04-09 12:21 .
drwxr-xr-x 11 root root      4096 2009-04-09 11:27 ..
-rw-------  1 root root 134217728 2009-04-09 12:21 .journal
drwx------  2 root root     16384 2009-04-09 12:21 lost+found

You can’t modify or remove the .journal file either, so don’t even worry about that.

# chmod 777 .journal

chmod: changing permissions of `.journal': Operation not permitted

# rm -f .journal

rm: cannot remove `.journal': Operation not permitted

I see no need for anything more than an ext2 file system for boot since I leave it unmounted after booting anyway. But it’s not a big deal. I only use ext3/ext4 now and ocfs for clustered file systems. My Fedora 10 doesn’t seem to like mounting ext2.

It even saves a little space by not having a journal file. Ok, not much, but its the thought that counts right!? Just in case you’re wondering, on my 15G file system, the journal is 128M.

Posted by admica   @   9 April 2009

Related Posts

Like this post? Share it!

Digg Twitter StumbleUpon Delicious Technorati Facebook RSS

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Name

Email

Website

Previous Post
« VNC server on a headless build machine to avoid warnings
Next Post
Add “Open terminal here” right-click option to Nautilus »
Powered by Wordpress   |   Lunated designed by ZenVerse