* Re: ext3 clings to you like flypaper
2003-02-17 16:48 ` Martin J. Bligh
@ 2003-02-17 17:08 ` Jörn Engel
2003-02-17 17:21 ` Markus Plail
2003-02-17 17:46 ` Martin J. Bligh
2003-02-17 17:17 ` James Bourne
2003-02-18 8:40 ` Henning P. Schmiedehausen
2 siblings, 2 replies; 15+ messages in thread
From: Jörn Engel @ 2003-02-17 17:08 UTC (permalink / raw)
To: Martin J. Bligh; +Cc: David Woodhouse, linux-kernel
On Mon, 17 February 2003 08:48:55 -0800, Martin J. Bligh wrote:
>
> The point remains, if I say I want ext2, I should get ext2, not whatever
> some random developer decides he thinks I should have. Worst of all,
> the system then lies to you and says it's mounted ext2 when it's not.
This is, how things worked for me:
1. Kernel tries to mount rootfs ext3. If this fails, it will continue
trying ext2. No other fs compiled into kernel.
2. If there is a journal, it is ext3.
3. Init scripts read /etc/fstab and read ext2.
4. root is remounted as ext2.
5. System allows me to log it, root is ext2, life is good.
Where is your behaviour different from this list? Where do you say you
want ext2 but don't get it?
Jörn
--
Beware of bugs in the above code; I have only proved it correct, but
not tried it.
-- Donald Knuth
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: ext3 clings to you like flypaper
2003-02-17 17:08 ` Jörn Engel
@ 2003-02-17 17:21 ` Markus Plail
2003-02-17 17:46 ` Martin J. Bligh
1 sibling, 0 replies; 15+ messages in thread
From: Markus Plail @ 2003-02-17 17:21 UTC (permalink / raw)
To: linux-kernel
On Mon, 17 Feb 2003, Jörn Engel wrote:
> This is, how things worked for me:
> 1. Kernel tries to mount rootfs ext3. If this fails, it will continue
> trying ext2. No other fs compiled into kernel.
> 2. If there is a journal, it is ext3.
> 3. Init scripts read /etc/fstab and read ext2.
> 4. root is remounted as ext2.
^^^^ It looks like it is remounted as ext2,
but it's really ext3. mount says ext2, but 'cat /proc/mounts' reveals
it's still ext3. Have been bitten by that once, too.
regards
Markus
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: ext3 clings to you like flypaper
2003-02-17 17:08 ` Jörn Engel
2003-02-17 17:21 ` Markus Plail
@ 2003-02-17 17:46 ` Martin J. Bligh
2003-02-17 18:22 ` Xavier Bestel
2003-02-17 18:31 ` Jörn Engel
1 sibling, 2 replies; 15+ messages in thread
From: Martin J. Bligh @ 2003-02-17 17:46 UTC (permalink / raw)
To: Jörn Engel; +Cc: David Woodhouse, linux-kernel, James Bourne
>> The point remains, if I say I want ext2, I should get ext2, not whatever
>> some random developer decides he thinks I should have. Worst of all,
>> the system then lies to you and says it's mounted ext2 when it's not.
>
> This is, how things worked for me:
> 1. Kernel tries to mount rootfs ext3. If this fails, it will continue
> trying ext2. No other fs compiled into kernel.
> 2. If there is a journal, it is ext3.
> 3. Init scripts read /etc/fstab and read ext2.
> 4. root is remounted as ext2.
> 5. System allows me to log it, root is ext2, life is good.
>
> Where is your behaviour different from this list? Where do you say you
> want ext2 but don't get it?
That's what I'd expect to happen ... as others have pointed out, it may
be a distro issue ... do you have the snippet of the init scrips that
do the remount as ext2 to hand? Maybe debian is just broken ...
Thanks,
M.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: ext3 clings to you like flypaper
2003-02-17 17:46 ` Martin J. Bligh
@ 2003-02-17 18:22 ` Xavier Bestel
2003-02-17 18:31 ` Jörn Engel
1 sibling, 0 replies; 15+ messages in thread
From: Xavier Bestel @ 2003-02-17 18:22 UTC (permalink / raw)
To: Martin J. Bligh
Cc: Jörn Engel, David Woodhouse, Linux Kernel Mailing List,
James Bourne
Le lun 17/02/2003 à 18:46, Martin J. Bligh a écrit :
> >> The point remains, if I say I want ext2, I should get ext2, not whatever
> >> some random developer decides he thinks I should have. Worst of all,
> >> the system then lies to you and says it's mounted ext2 when it's not.
> >
> > This is, how things worked for me:
> > 1. Kernel tries to mount rootfs ext3. If this fails, it will continue
> > trying ext2. No other fs compiled into kernel.
> > 2. If there is a journal, it is ext3.
> > 3. Init scripts read /etc/fstab and read ext2.
> > 4. root is remounted as ext2.
> > 5. System allows me to log it, root is ext2, life is good.
> >
> > Where is your behaviour different from this list? Where do you say you
> > want ext2 but don't get it?
>
> That's what I'd expect to happen ... as others have pointed out, it may
> be a distro issue ... do you have the snippet of the init scrips that
> do the remount as ext2 to hand? Maybe debian is just broken ...
You can't remount to a different filesystem type. You would have to play
games with pivot_root(), mount root once under each fs type and be sure
every fd is closed (even those from /dev/*) before unmounting the first
instance. Basically not manageable.
Xav
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: ext3 clings to you like flypaper
2003-02-17 17:46 ` Martin J. Bligh
2003-02-17 18:22 ` Xavier Bestel
@ 2003-02-17 18:31 ` Jörn Engel
2003-02-17 18:38 ` Jörn Engel
2003-04-12 8:44 ` Ookhoi
1 sibling, 2 replies; 15+ messages in thread
From: Jörn Engel @ 2003-02-17 18:31 UTC (permalink / raw)
To: Martin J. Bligh; +Cc: David Woodhouse, linux-kernel, James Bourne
On Mon, 17 February 2003 09:46:51 -0800, Martin J. Bligh wrote:
>
> >> The point remains, if I say I want ext2, I should get ext2, not whatever
> >> some random developer decides he thinks I should have. Worst of all,
> >> the system then lies to you and says it's mounted ext2 when it's not.
You appear to not have /etc/mtab as a symlink to /proc/mounts. One of
the first things I do on fresh debian installations. The kernel should
know better than some file, especially when / is mounted ro.
> > This is, how things worked for me:
> > 1. Kernel tries to mount rootfs ext3. If this fails, it will continue
> > trying ext2. No other fs compiled into kernel.
> > 2. If there is a journal, it is ext3.
> > 3. Init scripts read /etc/fstab and read ext2.
> > 4. root is remounted as ext2.
> > 5. System allows me to log it, root is ext2, life is good.
> >
> > Where is your behaviour different from this list? Where do you say you
> > want ext2 but don't get it?
>
> That's what I'd expect to happen ... as others have pointed out, it may
> be a distro issue ... do you have the snippet of the init scrips that
> do the remount as ext2 to hand? Maybe debian is just broken ...
My broken memory tells me that Debian is working quite fine. The code
in question should be in /etc/init.d/checkroot.sh in your system.
But my eye does not find the spot, where / is remounted with a
different type. This is strange! I've often been surprised that adding
a journal and putting ext3 support in the kernel without editing
/etc/fstab was not enough.
I should test it again to prove my eye wrong.
Jörn
--
With a PC, I always felt limited by the software available. On Unix,
I am limited only by my knowledge.
-- Peter J. Schoenster
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: ext3 clings to you like flypaper
2003-02-17 18:31 ` Jörn Engel
@ 2003-02-17 18:38 ` Jörn Engel
2003-04-12 8:44 ` Ookhoi
1 sibling, 0 replies; 15+ messages in thread
From: Jörn Engel @ 2003-02-17 18:38 UTC (permalink / raw)
To: Martin J. Bligh; +Cc: David Woodhouse, linux-kernel, James Bourne
On Mon, 17 February 2003 19:31:13 +0100, Jörn Engel wrote:
>
> You appear to not have /etc/mtab as a symlink to /proc/mounts. One of
> the first things I do on fresh debian installations. The kernel should
> know better than some file, especially when / is mounted ro.
>
> My broken memory tells me that Debian is working quite fine. The code
> in question should be in /etc/init.d/checkroot.sh in your system.
My stupid mind should have trusted the eye and made that connection
itself. Thanks for pointing it out.
Jörn
--
A defeated army first battles and then seeks victory.
-- Sun Tzu
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: ext3 clings to you like flypaper
2003-02-17 18:31 ` Jörn Engel
2003-02-17 18:38 ` Jörn Engel
@ 2003-04-12 8:44 ` Ookhoi
1 sibling, 0 replies; 15+ messages in thread
From: Ookhoi @ 2003-04-12 8:44 UTC (permalink / raw)
To: J?rn Engel; +Cc: Martin J. Bligh, David Woodhouse, linux-kernel, James Bourne
J?rn Engel wrote (ao):
> You appear to not have /etc/mtab as a symlink to /proc/mounts. One of
> the first things I do on fresh debian installations. The kernel should
> know better than some file, especially when / is mounted ro.
This breaks quotaon.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: ext3 clings to you like flypaper
2003-02-17 16:48 ` Martin J. Bligh
2003-02-17 17:08 ` Jörn Engel
@ 2003-02-17 17:17 ` James Bourne
2003-02-17 17:34 ` David Woodhouse
2003-02-18 8:40 ` Henning P. Schmiedehausen
2 siblings, 1 reply; 15+ messages in thread
From: James Bourne @ 2003-02-17 17:17 UTC (permalink / raw)
To: Martin J. Bligh; +Cc: David Woodhouse, linux-kernel
On Mon, 17 Feb 2003, Martin J. Bligh wrote:
> > Do you expect the kernel to read your /etc/fstab before mounting the
> > root file system, and then obey it?
>
> No, but it remounts the disk read-write after it mounts it read-only.
> It can switch from ext2 to ext3 at that point.
>
This is a function of your distribution. The
init scripts *should* read /etc/fstab after the kernel mounts /
ro and then remount / rw with whatever other options are specified.
Hope that helps track down the issue.
Regards
James Bourne
--
James Bourne, Supervisor Data Centre Operations
Mount Royal College, Calgary, AB, CA
www.mtroyal.ab.ca
******************************************************************************
This communication is intended for the use of the recipient to which it is
addressed, and may contain confidential, personal, and or privileged
information. Please contact the sender immediately if you are not the
intended recipient of this communication, and do not copy, distribute, or
take action relying on it. Any communication received in error, or
subsequent reply, should be deleted or destroyed.
******************************************************************************
"There are only 10 types of people in this world: those who
understand binary and those who don't."
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: ext3 clings to you like flypaper
2003-02-17 17:17 ` James Bourne
@ 2003-02-17 17:34 ` David Woodhouse
2003-02-17 18:14 ` James Bourne
0 siblings, 1 reply; 15+ messages in thread
From: David Woodhouse @ 2003-02-17 17:34 UTC (permalink / raw)
To: James Bourne; +Cc: Martin J. Bligh, linux-kernel
On Mon, 2003-02-17 at 17:17, James Bourne wrote:
> > No, but it remounts the disk read-write after it mounts it read-only.
> > It can switch from ext2 to ext3 at that point.
>
> This is a function of your distribution. The
> init scripts *should* read /etc/fstab after the kernel mounts /
> ro and then remount / rw with whatever other options are specified.
No. You can't remount between ext2 and ext3 like you can for ro/rw.
You'd have to unmount it completely and remount it.
--
dwmw2
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: ext3 clings to you like flypaper
2003-02-17 17:34 ` David Woodhouse
@ 2003-02-17 18:14 ` James Bourne
0 siblings, 0 replies; 15+ messages in thread
From: James Bourne @ 2003-02-17 18:14 UTC (permalink / raw)
To: David Woodhouse; +Cc: Martin J. Bligh, linux-kernel
On Mon, 17 Feb 2003, David Woodhouse wrote:
> On Mon, 2003-02-17 at 17:17, James Bourne wrote:
> > > No, but it remounts the disk read-write after it mounts it read-only.
> > > It can switch from ext2 to ext3 at that point.
> >
> > This is a function of your distribution. The
> > init scripts *should* read /etc/fstab after the kernel mounts /
> > ro and then remount / rw with whatever other options are specified.
>
> No. You can't remount between ext2 and ext3 like you can for ro/rw.
> You'd have to unmount it completely and remount it.
Right, you can't specify a new FS when remounting.
Looking at the RH rc.sysinit script it doesn't check for
FS type, therefore whatever the kernel believes the FS to be on boot is
what you'll be mounted as when you're running...
Regards
James
--
James Bourne, Supervisor Data Centre Operations
Mount Royal College, Calgary, AB, CA
www.mtroyal.ab.ca
******************************************************************************
This communication is intended for the use of the recipient to which it is
addressed, and may contain confidential, personal, and or privileged
information. Please contact the sender immediately if you are not the
intended recipient of this communication, and do not copy, distribute, or
take action relying on it. Any communication received in error, or
subsequent reply, should be deleted or destroyed.
******************************************************************************
"There are only 10 types of people in this world: those who
understand binary and those who don't."
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: ext3 clings to you like flypaper
2003-02-17 16:48 ` Martin J. Bligh
2003-02-17 17:08 ` Jörn Engel
2003-02-17 17:17 ` James Bourne
@ 2003-02-18 8:40 ` Henning P. Schmiedehausen
2 siblings, 0 replies; 15+ messages in thread
From: Henning P. Schmiedehausen @ 2003-02-18 8:40 UTC (permalink / raw)
To: linux-kernel
"Martin J. Bligh" <mbligh@aracnet.com> writes:
>And in answer to some other questions:
>This machine can't boot off CD, so rescue disks are not an option.
>It's remote anyway, and I shouldn't have to screw around with it to do this.
>I'm not using initrd
>The point remains, if I say I want ext2, I should get ext2, not whatever
>some random developer decides he thinks I should have. Worst of all,
>the system then lies to you and says it's mounted ext2 when it's not.
Don't compile any FS into the kernel. Load ext2 from an initrd. root
fs mounts as ext2 and you're happy.
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
hps@intermeta.de +49 9131 50 654 0 http://www.intermeta.de/
Java, perl, Solaris, Linux, xSP Consulting, Web Services
freelance consultant -- Jakarta Turbine Development -- hero for hire
^ permalink raw reply [flat|nested] 15+ messages in thread