*BSD News Article 25315


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!bunyip.cc.uq.oz.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!news.kei.com!sol.ctr.columbia.edu!howland.reston.ans.net!gatech!pitt!w2xo!durham
From: durham@w2xo.pgh.pa.us (Jim Durham)
Newsgroups: comp.os.386bsd.questions
Subject: replies to fsck problem
Keywords: fsck Freebsd
Message-ID: <13@w2xo.pgh.pa.us>
Date: 24 Dec 93 04:42:53 GMT
Lines: 171

Here is a synopsis of my correspondance concerning fsck
hanging up on Freebsd.... stuff copiously removed for brevity....

From: alm@netcom.com (Andrew Moore)
Message-Id: <199312180457.UAA10350@mail.netcom.com>
To: durham@w2xo.pgh.pa.us
Subject: Re: fsck on FreeBSD
Newsgroups: comp.os.386bsd.questions
In-Reply-To: <12@w2xo.pgh.pa.us>
Organization: Netcom Online Communications Services (408-241-9760 login: guest)

In article <12@w2xo.pgh.pa.us> you write:
>I know someone made a post regarding the hanging of fsck on reboot with
>FreeBSD, but I failed to save the posting. However,
>here is what I have been able to determine experimentally...
>
>First, the fstab file as I have it..
>
>**********************
>
>/dev/wd0a  /         ufs  rw  1 1
>/dev/wd0e  /usr      ufs  rw  1 2
>/dev/wd1c  /usr/local ufs rw  1 3
>
>**********************

I think the c and d partitions for each disk are reserved for the
total freebsd and total disk, respectively.  You might try putting
/usr/local on wd1e.  Please let me know if this helps.  There is also a
new wd driver available (as of today) which you might consider trying.
and mail to nate@freefall.cdrom.com.

From: Jim Durham <durham@w2xo.pgh.pa.us>
To: nate@freefall.cdrom.com
Cc: durham
Subject: New wd driver
Message-Id: <CMM.0.90.0.756229579.durham@w2xo.pgh.pa.us>

Hello,
I was told to contact you about a new wd driver for FreeBSD.

I am having trouble with fsck hanging when I add the 3rd
partition, which is on the second physical drive.

I may have done something wrong, but as there was no disktab entry
for an ST251, I created one with 3 partitions, a, b, and c, and used
c to address the whole drive. I'm told there may be something wrong
with using "c" this way on FreeBSD.

What can you tell me?

Thanks...

Jim Durham

From: spm@staff.cc.purdue.edu (Sean McDermott)
Message-Id: <9312181713.AA27662@staff.cc.purdue.edu>
To: durham@w2xo.pgh.pa.us
Subject: Re: fsck on FreeBSD
Newsgroups: comp.os.386bsd.questions
In-Reply-To: <12@w2xo.pgh.pa.us>
Organization: Purdue University


man fstab.  It shows you how to rearrange the numbers so it doesn't try
to fsck all the drives at one.......

/dev/wd0a	/		ufs	rw	1	1
/dev/wd0h	/usr		ufs	rw	1	2
/dev/wd1a	/usr/local	ufs	rw	1	3	


-- 
spm@staff.cc.purdue.edu
Sean McDermott


From: NetNews Subsystem <news@en.muc.de>
Message-Id: <199312181059.AA22112@en.muc.de>
To: durham@w2xo.pgh.pa.us (Jim Durham)
Subject: Re: fsck on FreeBSD
Newsgroups: comp.os.386bsd.questions
Organization: Engelschall (EN) Privat, Dachau/Munich, Germany
Reply-To: rse@en.muc.de
X-Newsreader: TIN [version 1.2 PL2]
X-Charset: ASCII
X-Char-Esc: 29

On 17 Dec 93 06:04:09 GMT in comp.os.386bsd.questions you wrote:

> /dev/wd0a  /         ufs  rw  1 1
> /dev/wd0e  /usr      ufs  rw  1 2
> /dev/wd1c  /usr/local ufs rw  1 3

I don't know exactly but on one of my machines at work I had the same
problem as you and solved this either by specifing...

/dev/wd0a  /         ufs  rw  1 1
/dev/wd0e  /usr      ufs  rw  1 2
/dev/wd1c  /usr/local ufs rw  2 1

or

/dev/wd0a  /         ufs  rw  1 1
/dev/wd0e  /usr      ufs  rw  1 2
/dev/wd1c  /usr/local ufs rw  2 3

Try it out!

From: abraxas!luthien!wagner (Olaf Wagner)
Message-Id: <199312191101.MAA09653@localhost>
To: durham@w2xo.pgh.pa.us

To: durham@w2xo.pgh.pa.us (Jim Durham)
Subject: Re: fsck on FreeBSD
Newsgroups: comp.os.386bsd.questions
Organization: 'Holistic Computing Services'

Just two notes:
1) fsck -p implies that file systems on different drives are
   checked in parallel.
2) Do not use the b, c and d partitions for file systems!
   b is swap, c the entire unix partition and d the entire disk.
   If the disk is not labeled correctly, fsck might get in trouble.



END OF REPLIES, ETC...


What happened here is that I used the existing entries in /etc/disktab
to create an entry for an ST-251. Unfortunately, the existing entries
were wrong!

Apparently, the WD driver requires that you have the c partition pointing
to the entire disk, and the d partition pointing to that portion of the
disk used by FreeBSD. The d partition can be *the same* as the c partition,
if you are using the whole disk for FreeBSD. Notice , in the example
below, that I also have the traditional "a", "b" and "h"  partitions, but
I don't use them. However, if you wished to use an ST251 for your
boot drive, then the disktab entry has them.

I was able to then use the d partition for a file system and *fsck works!*

Here is my corrected disktab entry:

st251:\
        :dt=ST506:ty=winchester:se#512:nt#6:ns#17:nc#820: \
        :pa#15884:oa#0:ta=4.2BSD:ba#4096:fa#512: \
        :pb#15625:ob#1584:tb=swap:bb#4096:fb#512: \
        :pc#83236:oc#0:bc#4096:fc#512: \
        :pd#83236:od#0:bd#4096:fd#512: \
        :ph#51727:oh#31509:bd#4096:fh#512:

What I did then was run "disklabel -w /dev/rwd1a st251" . This
partitioned the disk correctly. I then newfs'ed the d partition and
fsck began to work as advertised.

As you notice, one reply to my posting indicated that it was no
good to use the d partition. I didn't get this until after I had
put the file system on d and had everything start working, so
I was left with a question in my mind, even though things seemingly
were OK.

If I find that there is some side effect to using d, I intend to
add an "e" partition that also points to the whole disk. So far, everything
is working fine.

Thanks to all who replied...

-Jim Durham