Re: newfs fails to build small file systems.

2001-10-17 Thread Harti Brandt

On Wed, 17 Oct 2001, Bruce Evans wrote:

BEOn Tue, 16 Oct 2001, Harti Brandt wrote:
BE
BE since version 1.41 of newfs.c newfs fails to build 2MByte md-based
BE file systems. We use these file systems in our diskless pc's.
BE

[patch snipped]

Thanks, the patch worked. However:

BEThe problem addressed by the patch is that the default geometry of 1
BEtrack with 4096 sectors is extremly bogus for devices that don't even
BEhave 4096 sectors altogether.  Users should override the default
BEgeometry for these devices, but most users don't (the release Makefiles
BEset bad examples...), and newfs emits alarming warnings.  The changes

Well, if one really careful reads the newfs manpage he will find these
defaults (but not their implications). A hint in the EXAMPLES section of
the page would really be useful. Something along the lines of:

To format a file system with lesser than (default sectors/track *
default tracks/cylinder) = 4096 sectors use the -u switch the specify the
number of sectors:

newfs -u 2048 /dev/md0c

for a 1MByte memory disk.

would be really useful.

harti
-- 
harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private
  [EMAIL PROTECTED]


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



newfs fails to build small file systems.

2001-10-16 Thread Harti Brandt


Hi,

since version 1.41 of newfs.c newfs fails to build 2MByte md-based
file systems. We use these file systems in our diskless pc's.

Unfortunately the code in newfs.c and mkfs.c is too wired for me to
understand, but as a couple of printf's show, the code computes the
number of cylinders based on default values for the number of tracks (1)
and the number of sectors per track (4096). This gives a value of one
cylinder and mkfs later on complains about needing at least 2 cylinders
per cylinder group.

Strange enough newfs still handles 1.44MByte floppies.

Somewhat puzzled,
harti
-- 
harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private
  [EMAIL PROTECTED]


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



Re: newfs fails to build small file systems.

2001-10-16 Thread Ceri

On Tue, Oct 16, 2001 at 02:47:50PM +0200, Harti Brandt said:
 
 since version 1.41 of newfs.c newfs fails to build 2MByte md-based
 file systems. We use these file systems in our diskless pc's.

Is this in anyway related to bin/30959 ?

Ceri


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



Re: newfs fails to build small file systems.

2001-10-16 Thread Harti Brandt

On Tue, 16 Oct 2001, Ceri wrote:

COn Tue, Oct 16, 2001 at 02:47:50PM +0200, Harti Brandt said:
C
C since version 1.41 of newfs.c newfs fails to build 2MByte md-based
C file systems. We use these file systems in our diskless pc's.
C
CIs this in anyway related to bin/30959 ?

Looks rather different...

harti
-- 
harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private
  [EMAIL PROTECTED]


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



Re: newfs fails to build small file systems.

2001-10-16 Thread Warner Losh

In message [EMAIL PROTECTED] Harti Brandt writes:
: since version 1.41 of newfs.c newfs fails to build 2MByte md-based
: file systems. We use these file systems in our diskless pc's.

mount_mfs -s 500 -i 250 -b 4096 -m 3 -f 1024 -c 11 -T qp120at dummy /dev

is what we use in -stable.  This creats a 250k file system.  Note:
some people have problems when doing block:frag size not 8:1.

Warner

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



Re: newfs fails to build small file systems.

2001-10-16 Thread Ollivier Robert

According to Harti Brandt:
 number of cylinders based on default values for the number of tracks (1)
 and the number of sectors per track (4096). This gives a value of one
 cylinder and mkfs later on complains about needing at least 2 cylinders
 per cylinder group.

Forcing -c 2 should fix that. Bruce, any idea ?

-- 
Ollivier ROBERT -=- Eurocontrol EEC/ITM -=- [EMAIL PROTECTED]
FreeBSD caerdonn.eurocontrol.fr 5.0-CURRENT #6: Thu Aug 10 17:36:11 CEST 2000

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



Re: newfs fails to build small file systems.

2001-10-16 Thread John Hay

 According to Harti Brandt:
  number of cylinders based on default values for the number of tracks (1)
  and the number of sectors per track (4096). This gives a value of one
  cylinder and mkfs later on complains about needing at least 2 cylinders
  per cylinder group.
 
 Forcing -c 2 should fix that. Bruce, any idea ?

No, it does not. At the end I just copied an old newfs over to my diskless
area.

John
-- 
John Hay -- [EMAIL PROTECTED]

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



Re: newfs fails to build small file systems.

2001-10-16 Thread Bruce Evans

On Tue, 16 Oct 2001, Harti Brandt wrote:

 since version 1.41 of newfs.c newfs fails to build 2MByte md-based
 file systems. We use these file systems in our diskless pc's.

Hrmphh :-).  My patch for changing the default number of cylinders per
group to the maximum had an (apparently broken) change related to this
attached.  This part should not have been committed.  Backing it out
fixes the problem with 2MB disks.

Index: newfs.c
===
RCS file: /home/ncvs/src/sbin/newfs/newfs.c,v
retrieving revision 1.42
diff -u -2 -r1.42 newfs.c
--- newfs.c 4 Oct 2001 12:24:18 -   1.42
+++ newfs.c 17 Oct 2001 04:30:46 -
@@ -167,5 +159,4 @@
 intntracks = NTRACKS;  /* # tracks/cylinder */
 intnsectors = NSECTORS;/* # sectors/track */
-intncyls;  /* # complete cylinders */
 intnphyssectors;   /* # sectors/track including spares */
 intsecpercyl;  /* sectors per cylinder */
@@ -181,5 +172,5 @@
 intfsize = 0;  /* fragment size */
 intbsize = 0;  /* block size */
-intcpg = 0;/* cylinders/cylinder group */
+intcpg = DESCPG;   /* cylinders/cylinder group */
 intcpgflg; /* cylinders/cylinder group flag was given */
 intminfree = MINFREE;  /* free space threshold */
@@ -546,15 +537,4 @@
}
 #endif
-   ncyls = fssize / secpercyl;
-   if (ncyls == 0)
-   ncyls = 1;  /* XXX */
-   if (cpg == 0)
-   cpg = DESCPG  ncyls ? DESCPG : ncyls;
-   else if (cpg  ncyls) {
-   cpg = ncyls;
-   printf(
-   Number of cylinders restricts cylinders per group to %d.\n,
-   cpg);
-   }
mkfs(pp, special, fsi, fso);
 #ifdef tahoe

 Strange enough newfs still handles 1.44MByte floppies.

The (reverse of) the above patch was tested mainly with this size, but
it doesn't work for me now.

The problem addressed by the patch is that the default geometry of 1
track with 4096 sectors is extremly bogus for devices that don't even
have 4096 sectors altogether.  Users should override the default
geometry for these devices, but most users don't (the release Makefiles
set bad examples...), and newfs emits alarming warnings.  The changes
adjust the number of cylinders to 1 and the number of cylinder groups
to 1 if the device size is smaller than 1 cylinder, but other parts
of newfsnsist on 2 cylinders per group although this is physically
impossible.

Bruce


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