Re: fstab weirdness / UPDATING

2001-04-07 Thread Poul-Henning Kamp


Yup, seems like i goofed that patch.  Can you try this for me ?

Index: preen.c
===
RCS file: /home/ncvs/src/sbin/fsck/preen.c,v
retrieving revision 1.22
diff -u -r1.22 preen.c
--- preen.c 2001/03/30 08:01:34 1.22
+++ preen.c 2001/04/07 07:01:47
@@ -178,7 +178,6 @@
continue;
}
 
-
if (WIFEXITED(status))
retcode = WEXITSTATUS(status);
else
@@ -215,6 +214,9 @@
if (TAILQ_EMPTY(d-d_part)) {
TAILQ_REMOVE(diskh, d, d_entries);
ndisks--;
+   } else {
+   if ((ret = startdisk(d, checkit)) != 0)
+   return ret;
}
}
if (flags  CHECK_DEBUG) {


--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: fstab weirdness / UPDATING

2001-04-07 Thread David Wolfskill

Date: Sat, 07 Apr 2001 09:08:41 +0200
From: Poul-Henning Kamp [EMAIL PROTECTED]

Yup, seems like i goofed that patch.  Can you try this for me ?

OK; it works much better with the patch:  it seems to work correctly,
from what I've tested so far.

[Below is a sketch of what I did, so folks will be able to judge how
much trust to place in the above assessment.]

* Booted -CURRENT into single-user mode.  Even though this was a clean
  reboot, I did a (complete) "fsck" before "mount -a", then fired up
  tcsh to use as the shell for the following.

* I applied the patch from within the /urs/src/sbin/fsck directory.  (Yeah,
  I used -C first to make sure patch wouldn't whine too much.)

* Since the patch only affects the logic of a user-level program (vs.
  the kernel, for example), I went ahead  typed "make" while I was
  there.

* cd /sbin  mv fsck{,.save}  mv /usr/obj/usr/src/sbin/fsck/fsck .
  ls -l fsck*
  chmod u-w fsck

* Re-boot -CURRENT, single-user mode.  "fsck -p" now claims to check
  each filesystem.  Good.

* mount -a; things  look good.  Power-cycle the machine.  (This is still
  single-user mode, so the filesystems should merely have been marked
  dirty because they're mounted, but nothing should actually have been
  doing anything to them other than that.)

* Re-boot -CURRENT, single-user mode.  "fsck-p" again does the usual and
  expected fsck behavior -- all filesystems are checked  flagged
  "clean".

I like it.  :-)

Thanks,
david
-- 
David H. Wolfskill  [EMAIL PROTECTED]
As a computing professional, I believe it would be unethical for me to
advise, recommend, or support the use (save possibly for personal
amusement) of any product that is or depends on any Microsoft product.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: fstab weirdness / UPDATING

2001-04-07 Thread Szilveszter Adam

Hello everybody,

I am sorry to report that the fix committed to preen.c by phk recently did
not fix the problem for me entirely. 

I have: ad0 with partitions within s1 a through h (ad0s1a-ad0s1h)
and ad1s1a.

Upon rebooting (after a clean shutdown) with an up-to-date kernel and
userland, all the partitons on ad0 were checked, but the ad1 was not.
Yet, it was mounted r/w afterwards.

I did not yet test in single-user mode though what if I say 'fsck -p'...
 
-- 
Regards:

Szilveszter ADAM
Szeged University
Szeged Hungary

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: fstab weirdness / UPDATING

2001-04-07 Thread Szilveszter Adam

Hello,

On Sat, Apr 07, 2001 at 12:04:07PM -0700, David Wolfskill wrote:
 I suggest "fsck -d -p" -- the debugging output could prove useful.

Here we go:

pass1
pass1, name /dev/ad0s1a
pass2
pass2, name /dev/ad0s1f
pass2, name /dev/ad0s1g
pass2, name /dev/ad0s1h
pass2, name /dev/ad0s1d
pass2, name /dev/ad0s1e
Parallel start
disk /dev/ad0: ad0s1f, ad0s1g, ad0s1h, ad0s1d, ad0s1e
start /tmp nowait fsck_ufs -p /dev/ad0s1f
Parallel wait
done ufs: /dev/ad0s1f (/tmp) 0x0
start /usr nowait fsck_ufs -p /dev/ad0s1g
Parallel wait
done ufs: /dev/ad0s1g (/usr) 0x0
start /usr/local nowait fsck_ufs -p /dev/ad0s1h
Parallel wait
done ufs: /dev/ad0s1h (/usr/local) 0x0
start /var nowait fsck_ufs -p /dev/ad0s1d
Parallel wait
done ufs: /dev/ad0s1d (/var) 0x0
start /var/log nowait fsck_ufs -p /dev/ad0s1e
Parallel wait
done ufs: /dev/ad0s1e (/var/log) 0x0
Parallel end

In other words, nothing unusual, apart from the fact that ad1 is not even
mentioned. If I after this say 'fsck -d -p /dev/ad1s1a', it says:

start /dev/ad1s1a wait fsck_ufs -p /dev/ad1s1a

and then exits, seemingly succesfully. 

Nothin more... if there is anything I can be helpful with, please tell me.

-- 
Regards:

Szilveszter ADAM
Szeged University
Szeged Hungary

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: fstab weirdness / UPDATING

2001-04-07 Thread Poul-Henning Kamp

In message [EMAIL PROTECTED], Szilveszter Adam writ
es:
Hello,

On Sat, Apr 07, 2001 at 12:04:07PM -0700, David Wolfskill wrote:
 I suggest "fsck -d -p" -- the debugging output could prove useful.

Here we go:

Is this with or without the patch I committed earlier today ?

--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: fstab weirdness / UPDATING *solved!*

2001-04-07 Thread Szilveszter Adam

Hello guys,

[Cc-ing the list just for the sake of the archives, so that people could
see what the resolution of the case was.]

Thanks for trying to help me while I was busy sleeping... here I am again.

As suggested, I looked at my fstab, although I do not remember fiddling
with it in a long time. (In fact, the last time was when I installed my
second disk into the system some time at the end of last year.)

And sure as hell, there it was: 
next to /dev/ad1s1a there was *no* dump number and *no* pass no. Not zeros,
but nothing, nada, nichts. This, of course, explains a lot of things...
after putting the correct values in there, fsck worked.

But I have no idea how/why the numbers got deleted... and then why it
worked before?

Thanks all the same, things seem to work out A OK right now.
:-)
-- 
Regards:

Szilveszter ADAM
Szeged University
Szeged Hungary

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: fstab weirdness / UPDATING

2001-04-06 Thread David Wolfskill

OK; I finally got a few consecutive minutes to look over fsck as of
today's -CURRENT.

In replying to different message, I had earlier reported what some others
noted a couple of days ago:  that not all of the filesystems are checked
at boot (only 2 are), and experimentation demonstrated that in "preen"
mode (-p), this is what happens, but it is peculiar to preen mode:  bare
"fsck" (with no arguments) does check all filesystems.

First, for reference, here's the fstab in question (yes, it's fairly
chopped up):

# DeviceMountpoint  FStype  Options DumpPass#
/dev/ad0s3b noneswapsw  0   0
/dev/ad0s1a /S1 ufs rw  2   2
/dev/ad0s1e /S1/usr ufs rw  2   2
/dev/ad0s2a /S2 ufs rw  2   2
/dev/ad0s2e /S2/usr ufs rw  2   2
/dev/ad0s3a /   ufs rw  1   1
/dev/ad0s3e /usrufs rw  2   2
/dev/ad0s3g /varufs rw  2   2
/dev/ad0s3h /common ufs rw  2   2
/dev/acd0c  /cdrom  cd9660  ro,noauto   0   0
proc/proc   procfs  rw  0   0


So I booted -CURRENT into single-user mode (after a clean reboot); here's
a hand-generated transcription:


Enter full pathname of shell or RETURN for /bin/sh:
# fsck -d -p
pass 1
pass 1, name /dev/ad0s3a
start / wait fsck_ufs -p /dev/ad0s3a
pass 2
pass 2, name /dev/ad0s1a
pass 2, name /dev/ad0s1e
pass 2, name /dev/ad0s2a
pass 2, name /dev/ad0s2e
pass 2, name /dev/ad0s3e
pass 2, name /dev/ad0s3g
pass 2, name /dev/ad0s3h
Parallel start
disk /dev/ad0: /dev/ad0s1a /dev/ad0s1e /dev/ad0s2a /dev/ad0s2e /dev/ad0s3e /dev/ad0s3g 
/dev/ad0s3h
start /S1 nowait fsck_ufs -p /dev/ad0s1a
Parallel wait
done ufs: /dev/ad0s1a (/S1) = 0x0
Parallel end
disk /dev/ad0: /dev/ad0s1e /dev/ad0s2a /dev/ad0s2e /dev/ad0s3e /dev/ad0s3g /dev/ad0s3h
#


I hope this is useful.  I should be able to perform additional testing.

Thanks,
david
-- 
David H. Wolfskill  [EMAIL PROTECTED]
As a computing professional, I believe it would be unethical for me to
advise, recommend, or support the use (save possibly for personal
amusement) of any product that is or depends on any Microsoft product.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: fstab weirdness / UPDATING

2001-04-05 Thread Szilveszter Adam

Hello,

On Wed, Apr 04, 2001 at 10:49:22PM -0700, Alfred Perlstein wrote:
  I've had that problem on one box also -- when the boot occurs, my /var
  partition is not fsck'd.  It's the second pass-two file system, which
  means that it *should* be checked :-).  I suspect a nit in the recent fsck
  cleanup, so I'm CC'ing phk, whose mailbox is obviously too empty.
 
 I think I'm seeing the same thins...
 
 At boot I see a kernel printf "warning: /var was not properly
 dismounted" then /var mounts.  If I unmount it and fsck it it's
 dirty.

I saw something similar too, but did not get around to posting yet because
I wanted to understand what's going on. On boot, I see only two of my
partitions being reported as clean, and not the others. After this, all of
them are mounted allright. (They happen to be ad0s1a and ad0s1f don't know
why...) I don't know if it causes filesystem corruption, because it is my
policy to always 'boot -s' upon unclean shutdown and fsck all partitions
manually. (In fact I just did it again because X has a tendency to freeze
the machine off and on for unknown reasons... maybe related?) If this is an
fsck problem, then I figured there was no big problem if your previous
shutdown was clean... am I right? Or maybe there is a problem with shutdown
too that fsck simply doesn't notice? Brrr...:-)
   
-- 
Regards:

Szilveszter ADAM
Szeged University
Szeged Hungary

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



fstab weirdness / UPDATING

2001-04-04 Thread Wesley Morgan

My understanding is that there have been some changes regarding fstab,
fsck, etc. recently. On boot, I find that only first two filesystems are
listed as "clean", and on a recent un-clean shutdown only the first two
were properly fsck'd (although the system was allowed to boot and mount
read-write the unclean filesystems).

I can only assume that some change to the boot procedure was made, since I
made no changes. Are we going to see an UPDATING entry regarding this? I
can't seem to find any explicit instructions in the mailing lists either.
It worries me a bit when unclean filesystems are being mounted rw.


WNM

-- 
   _ __ ___   ___ ___ ___
  Wesley N Morgan   _ __ ___ | _ ) __|   \
  [EMAIL PROTECTED] _ __ | _ \._ \ |) |
  FreeBSD: The Power To Serve  _ |___/___/___/
  6bone: 3ffe:1ce3:7::b4ff:fe53:c297
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: fstab weirdness / UPDATING

2001-04-04 Thread Robert Watson


I've had that problem on one box also -- when the boot occurs, my /var
partition is not fsck'd.  It's the second pass-two file system, which
means that it *should* be checked :-).  I suspect a nit in the recent fsck
cleanup, so I'm CC'ing phk, whose mailbox is obviously too empty.

Robert N M Watson FreeBSD Core Team, TrustedBSD Project
[EMAIL PROTECTED]  NAI Labs, Safeport Network Services

On Wed, 4 Apr 2001, Wesley Morgan wrote:

 My understanding is that there have been some changes regarding fstab,
 fsck, etc. recently. On boot, I find that only first two filesystems are
 listed as "clean", and on a recent un-clean shutdown only the first two
 were properly fsck'd (although the system was allowed to boot and mount
 read-write the unclean filesystems).
 
 I can only assume that some change to the boot procedure was made, since I
 made no changes. Are we going to see an UPDATING entry regarding this? I
 can't seem to find any explicit instructions in the mailing lists either.
 It worries me a bit when unclean filesystems are being mounted rw.
 
 
 WNM
 
 -- 
_ __ ___   ___ ___ ___
   Wesley N Morgan   _ __ ___ | _ ) __|   \
   [EMAIL PROTECTED] _ __ | _ \._ \ |) |
   FreeBSD: The Power To Serve  _ |___/___/___/
   6bone: 3ffe:1ce3:7::b4ff:fe53:c297
 Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!
 
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with "unsubscribe freebsd-current" in the body of the message
 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: fstab weirdness / UPDATING

2001-04-04 Thread Alfred Perlstein

* Robert Watson [EMAIL PROTECTED] [010404 22:04] wrote:
 
 I've had that problem on one box also -- when the boot occurs, my /var
 partition is not fsck'd.  It's the second pass-two file system, which
 means that it *should* be checked :-).  I suspect a nit in the recent fsck
 cleanup, so I'm CC'ing phk, whose mailbox is obviously too empty.

I think I'm seeing the same thins...

At boot I see a kernel printf "warning: /var was not properly
dismounted" then /var mounts.  If I unmount it and fsck it it's
dirty.

-- 
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
Represent yourself, show up at BABUG http://www.babug.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message