ext2 drives under 5.3 not umounting on reboots

2005-04-16 Thread M. Parsons
I have a ext2 linux partition mounted under /linux via the fstab line:
/dev/ad2s1 /linux  ext2fs  rw  1   2
It will automount on bootup, but if I do a reboot or shutdown -h now, it 
doesnt get umounted properly.  In fact, if this /linux is mounted, then 
/, /usr, /var, and /tmp (all seperate ufs slices on another hard drive) 
also get tainted during a reboot.  And on the next startup I get the 
good ole: WARNING: /usr was not properly dismounted, leaving me to fsck 
the drives in single mode (which sucks, as the fbsd machine is a 
headless NAT machine).  Running fsck in single mode does fix everything.

So whats going on here?  reboot aint properly umounting partitions, and 
fsck doesnt seem to be properly running during bootup if it detects 
tainted filesystems.

Any ideas?
Freebsd 5.3 SMP kernel.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ext2 drives under 5.3 not umounting on reboots

2005-04-16 Thread c0ldbyte
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Sat, 16 Apr 2005, M. Parsons wrote:
I have a ext2 linux partition mounted under /linux via the fstab line:
/dev/ad2s1 /linux  ext2fs  rw  1   2
It will automount on bootup, but if I do a reboot or shutdown -h now, it 
doesnt get umounted properly.  In fact, if this /linux is mounted, then /, 
/usr, /var, and /tmp (all seperate ufs slices on another hard drive) also get 
tainted during a reboot.  And on the next startup I get the good ole: 
WARNING: /usr was not properly dismounted, leaving me to fsck the drives in 
single mode (which sucks, as the fbsd machine is a headless NAT machine). 
Running fsck in single mode does fix everything.

So whats going on here?  reboot aint properly umounting partitions, and fsck 
doesnt seem to be properly running during bootup if it detects tainted 
filesystems.

Any ideas?
Freebsd 5.3 SMP kernel.
Try this line:
/dev/ad2s1 /linux  ext2fs  rw  0   0
But remember the ext2 code has been buggy for a while and is not allways
a good choice to try and do writes on it. Might be a better choice to
change rw to ro and to also check that drive/partition for errors with
its original fsck to fix any errors if there is any then it will most
likely mount properly and umount properly.
Best of luck,
--c0ldbyte
- -- 
( When in doubt, use brute force. -- Ken Thompson 1998 )
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (FreeBSD)
Comment: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xF7DF979F
Comment: Fingerprint = D1DC 0AA4 1C4E EAD4 24EB  7E77 B261 50BA F7DF 979F

iD8DBQFCYX6asmFQuvffl58RAilFAJ0RPeJHhvEJezh0qcy8lWj9we1IMwCfS7La
/SULj+UxXMfIdKv+PYf+vQ4=
=JRYg
-END PGP SIGNATURE-
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ext2 drives under 5.3 not umounting on reboots

2005-04-16 Thread M. Parsons
c0ldbyte wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Sat, 16 Apr 2005, M. Parsons wrote:
I have a ext2 linux partition mounted under /linux via the fstab line:
/dev/ad2s1 /linux  ext2fs  rw  1   2
It will automount on bootup, but if I do a reboot or shutdown -h now, 
it doesnt get umounted properly.  In fact, if this /linux is mounted, 
then /, /usr, /var, and /tmp (all seperate ufs slices on another hard 
drive) also get tainted during a reboot.  And on the next startup I 
get the good ole: WARNING: /usr was not properly dismounted, leaving 
me to fsck the drives in single mode (which sucks, as the fbsd 
machine is a headless NAT machine). Running fsck in single mode does 
fix everything.

So whats going on here?  reboot aint properly umounting partitions, 
and fsck doesnt seem to be properly running during bootup if it 
detects tainted filesystems.

Any ideas?
Freebsd 5.3 SMP kernel.

Try this line:
/dev/ad2s1 /linux  ext2fs  rw  0   0
But remember the ext2 code has been buggy for a while and is not allways
a good choice to try and do writes on it. Might be a better choice to
change rw to ro and to also check that drive/partition for errors with
its original fsck to fix any errors if there is any then it will most
likely mount properly and umount properly.
Best of luck,
--c0ldbyte
Well, I just said screw it, backed up the files I needed, then converted 
the whole disk to UFS.  Time to wash my hands clean of linux anywas. :-)

Still sort of worried that reboot wasnt unmounting the linux drive, but 
oh well, no more worries now. :)

Mark
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ext2 drives under 5.3 not umounting on reboots

2005-04-18 Thread Andriy Tkachuk
I've had the same problem on 5.3.
now on my FreeBSD 5.4-RC2 #0: Fri Apr 15 11:28:48 EEST 2005 i386
it seems that problem gone.

On Sunday 17 April 2005 00:07, c0ldbyte wrote:
> On Sat, 16 Apr 2005, M. Parsons wrote:
> 
> > I have a ext2 linux partition mounted under /linux via the fstab line:
> >
> > /dev/ad2s1 /linux  ext2fs  rw  1   2
> >
> > It will automount on bootup, but if I do a reboot or shutdown -h now, it
> > doesnt get umounted properly.  In fact, if this /linux is mounted, then /,
> > /usr, /var, and /tmp (all seperate ufs slices on another hard drive) also 
> > get
> > tainted during a reboot.  And on the next startup I get the good ole:
> > WARNING: /usr was not properly dismounted, leaving me to fsck the drives in
> > single mode (which sucks, as the fbsd machine is a headless NAT machine).
> > Running fsck in single mode does fix everything.
> >
> > So whats going on here?  reboot aint properly umounting partitions, and fsck
> > doesnt seem to be properly running during bootup if it detects tainted
> > filesystems.
> >
> > Any ideas?
> >
> > Freebsd 5.3 SMP kernel.
> 
> Try this line:
> /dev/ad2s1 /linux  ext2fs  rw  0   0
> 
> But remember the ext2 code has been buggy for a while and is not allways
> a good choice to try and do writes on it. Might be a better choice to
> change rw to ro and to also check that drive/partition for errors with
> its original fsck to fix any errors if there is any then it will most
> likely mount properly and umount properly.
> 
> Best of luck,
>   --c0ldbyte
> 
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ext2 drives under 5.3 not umounting on reboots

2005-04-18 Thread c0ldbyte
On Mon, 18 Apr 2005, Andriy Tkachuk wrote:
I've had the same problem on 5.3.
now on my FreeBSD 5.4-RC2 #0: Fri Apr 15 11:28:48 EEST 2005 i386
it seems that problem gone.
I would advise once more changing the "Dump" & "Pass#" number fields
to "0" for both as I showed on the line below, you would have found
out that was causing if any most of your problem with your filesystems
being mounted/unmounted properly.
On Sunday 17 April 2005 00:07, c0ldbyte wrote:
On Sat, 16 Apr 2005, M. Parsons wrote:
I have a ext2 linux partition mounted under /linux via the fstab line:
/dev/ad2s1 /linux  ext2fs  rw  1   2
It will automount on bootup, but if I do a reboot or shutdown -h now, it
doesnt get umounted properly.  In fact, if this /linux is mounted, then /,
/usr, /var, and /tmp (all seperate ufs slices on another hard drive) also get
tainted during a reboot.  And on the next startup I get the good ole:
WARNING: /usr was not properly dismounted, leaving me to fsck the drives in
single mode (which sucks, as the fbsd machine is a headless NAT machine).
Running fsck in single mode does fix everything.
So whats going on here?  reboot aint properly umounting partitions, and fsck
doesnt seem to be properly running during bootup if it detects tainted
filesystems.
Any ideas?
Freebsd 5.3 SMP kernel.
Try this line:
/dev/ad2s1 /linux  ext2fs  rw  0   0
But remember the ext2 code has been buggy for a while and is not allways
a good choice to try and do writes on it. Might be a better choice to
change rw to ro and to also check that drive/partition for errors with
its original fsck to fix any errors if there is any then it will most
likely mount properly and umount properly.
Best of luck,
--c0ldbyte

--
( When in doubt, use brute force. -- Ken Thompson 1998 )
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ext2 drives under 5.3 not umounting on reboots

2005-04-18 Thread ALeine
[EMAIL PROTECTED] wrote: 

> I've had the same problem on 5.3.
> now on my FreeBSD 5.4-RC2 #0: Fri Apr 15 11:28:48 EEST 2005 i386
> it seems that problem gone.
> 
> On Sunday 17 April 2005 00:07, c0ldbyte wrote:
> > On Sat, 16 Apr 2005, M. Parsons wrote:
> > 
> > > I have a ext2 linux partition mounted under /linux via the
> > > fstab line:
> > >
> > > /dev/ad2s1 /linux  ext2fs  rw  1 2
> > >
> > > It will automount on bootup, but if I do a reboot or shutdown
> > > -h now, it doesnt get umounted properly.  In fact, if this /linux
> > > is mounted, then /, /usr, /var, and /tmp (all seperate ufs slices
> > > on another hard drive) also get tainted during a reboot.

A couple of weeks ago I saw what I believe to be the same problem, but
on 4.10-STABLE. My attempt to umount an ext2 volume resulted in failure
with the "unknown mount type" error message. I then resorted to using
umount -t ext2fs /linux and the volume was unmounted properly,
so as a workaround you could specify umount -t ext2fs explicitly
in rc.shutdown or similar.

I checked the sources in an attempt to find the cause and here is what
I found out:

In src/sbin/umount.c:

RELENG_5:
In umountall():
   /* Ignore unknown file system types. */
   if (getvfsbyname(fs->fs_vfstype, &vfc) == -1)
   continue;
   if (checkvfsname(fs->fs_vfstype, typelist))
   continue;
   ...
   rval = umountall(typelist);
   rval = checkname(cp, typelist) || rval;
   free(cp);
   return (rval);
} while ((fs = getfsent()) != NULL);
return (0);
}

In checkname():
if (sfs == NULL) {
warnx("%s: unknown file system", name);
return (1);
}
if (checkvfsname(sfs->f_fstypename, typelist))
return (1);
return (umountfs(sfs));
}

RELENG4:
In umountall():
/* If an unknown file system type, complain. */
if (getvfsbyname(fs->fs_vfstype, &vfc) == -1) {
warnx("%s: unknown mount type", fs->fs_vfstype);
continue;
}
if (checkvfsname(fs->fs_vfstype, typelist))
continue;
...
rval = umountall(typelist);
rval = umountfs(cp, typelist) || rval;
free(cp);
return (rval);
} while ((fs = getfsent()) != NULL);
return (0);
}

As you can see, the RELENG_5 code was changed to call a separate
function named checkname() instead of checking and reporting name
problems directly, but in that process a new check is introduced
in a way that makes it possible for umount(8) to fail without
reporting the reason for failure.

Neither getvfsbyname(3) in src/lib/libc/gen/getvfsbyname.c nor
checkvfsname() in src/sbin/mount/vfslist.c have changed in
significant ways that would indicate they could be at fault,
however there might be a problem with keeping track of filesystem
modules, specifically, fs_vfstype (struct fstab) on RELENG_{4,5}
and/or f_fstypename (struct statfs) on RELENG_5. Any clues?

ALeine
___
WebMail FREE http://mail.austrosearch.net 
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"