From: Andreas Dilger <adilger@turbolabs.com>
To: Santiago Garcia Mantinan <manty@manty.net>
Cc: Andrew Morton <akpm@zip.com.au>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: ext3-2.4-0.9.10
Date: Mon, 24 Sep 2001 11:47:08 -0600 [thread overview]
Message-ID: <20010924114707.Z14526@turbolinux.com> (raw)
In-Reply-To: <3BAECC4F.EF25393@zip.com.au> <20010924141638.A2275@man.beta.es>
In-Reply-To: <20010924141638.A2275@man.beta.es>
On Sep 24, 2001 14:16 +0200, Santiago Garcia Mantinan wrote:
> After testing this new patch on 2.4.10 I have detected a problem when trying
> to convert mounted partitions to ext3.
>
> The problem is that on umounting the partition, with 2.4.10 kernel, the
> has_journal feature mark is removed, so the device is not detected as having
> journal on next mount.
>
> Creating journals (converting to ext3) on partitions that are not mounted
> works ok.
>
> Following is a practical demonstration of this in case I didn't explain
> myself well...
>
> pul:/# grep var /etc/fstab
> /dev/hda7 /var auto rw 0 2
> pul:/# mount|grep var
> /dev/hda7 on /var type ext2 (rw)
> pul:~# tune2fs -l /dev/hda7|grep -i journal
> pul:~# ls -l /var/.journal
> ls: /var/.journal: No such file or directory
> pul:~# tune2fs -j /dev/hda7
> tune2fs 1.24a (02-Sep-2001)
> Creating journal inode: done
> This filesystem will be automatically checked every 20 mounts or
> 180 days, whichever comes first. Use tune2fs -c or -i to override.
> pul:~# tune2fs -l /dev/hda7|grep -i journal
> Filesystem features: has_journal filetype sparse_super
> Journal UUID: <none>
> Journal inode: 12
> Journal device: 0x0000
> pul:~# ls -l /var/.journal
> -rw------- 1 root root 8388608 sep 24 13:39 /var/.journal
> pul:/# umount /var
> pul:/# tune2fs -l /dev/hda7|grep -i journal
> pul:/# mount /var
> pul:/# mount|grep var
> /dev/hda7 on /var type ext2 (rw)
> pul:/# ls -l /var/.journal
> -rw------- 1 root root 8388608 Sep 24 13:39 /var/.journal
This is because the block devices have moved to page cache, but the
internal filesystem code is still using the buffer cache - this means
that changes from user space are not seen in the kernel, and are lost
the next time that the superblock is written by the kernel.
When the block-devices-in-pagecache issue came up last, I had advocated
waiting for 2.5 to do this so that we can move ext2/ext3 into pagecache
as well (the superblock at least). This could be done by changing the
bread/getblk stuff to be backed by pagecache as well, but nobody has
has time to do this yet.
For now, you need to do the tune2fs on an unmounted filesystem. Since
this does not immediately "convert" the mounted filesystem to ext3
right away (you need to remount it as ext3 to get journaling to start),
then you need to unmount the fs at some time anyways. It _does_ pose a
bit of a problem for converting the root fs, however - you will need to
boot from a rescue disk to run tune2fs on the unmounted filesystem, but
it is a one-time effort for the root fs, and it also ensures that you
have a rescue disk you can use in case of problems ;-).
The presence or absence of the ".journal" file does not indicate whether
or not the filesystem is journaled. It is "tune2fs -l" which matters.
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
next prev parent reply other threads:[~2001-09-24 17:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-24 6:01 ext3-2.4-0.9.10 Andrew Morton
2001-09-24 12:16 ` ext3-2.4-0.9.10 Santiago Garcia Mantinan
2001-09-24 17:47 ` Andreas Dilger [this message]
2001-09-24 17:14 ` ext3-2.4-0.9.10 Robert Love
2001-09-24 17:16 ` ext3-2.4-0.9.10 Tom Rini
2001-09-24 17:19 ` ext3-2.4-0.9.10 Andrew Morton
2001-09-24 17:29 ` ext3-2.4-0.9.10 Tom Rini
2001-09-24 17:21 ` ext3-2.4-0.9.10 Stephen C. Tweedie
-- strict thread matches above, loose matches on Subject: below --
2001-09-24 21:35 ext3-2.4-0.9.10 J Troy Piper
2001-09-24 21:54 ` ext3-2.4-0.9.10 Andrew Morton
2001-09-24 22:39 ` ext3-2.4-0.9.10 Andreas Dilger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010924114707.Z14526@turbolinux.com \
--to=adilger@turbolabs.com \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=manty@manty.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox