[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Is it safe to run "tune2fs -j" on a mounted filesystem?

On Mar 20, 2003  01:41 -0500, Bryan J. Smith wrote:
> I'm curious is if it safe or even wise to run the following command on a
> mounted filesystem, namely root (/)?
>   tune2fs -j /dev/hda1

Yes, this is possible (and safe) to do.  It will create a file /.journal
for the journal (and set the has_journal) flag in the superblock along
with the inode number of the journal.  Of course, since the filesystem
is mounted as ext2, it will not suddenly become "journaled" until it
is unmounted and remounted as ext3.
> What about if someone goes into single user mode and runs this first?
>   mount -o remount,ro /

Won't work, I'm pretty sure.

> And then to enable it, runs this?
>   mount -t ext2 -o remount,rw /

Never.  While ext2 and ext3 share an on-disk format, the kernel code
is very different.  The above will remount the filesystem as ext2,
and it will totally ignore the journal.

Cheers, Andreas
Andreas Dilger

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]