From owner-freebsd-current Wed Feb 26 4:48:41 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 418C337B401 for ; Wed, 26 Feb 2003 04:48:37 -0800 (PST) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id E47C843F75 for ; Wed, 26 Feb 2003 04:48:23 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (root@localhost) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Sunbay) with SMTP id h1QCmG9v093677 for ; Wed, 26 Feb 2003 14:48:16 +0200 (EET) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Sunbay) with ESMTP id h1QCmFHR093664 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 26 Feb 2003 14:48:15 +0200 (EET) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Submit) id h1QCmAsx093657; Wed, 26 Feb 2003 14:48:10 +0200 (EET) Date: Wed, 26 Feb 2003 14:48:10 +0200 From: Ruslan Ermilov To: John Hay Cc: Poul-Henning Kamp , Kirk McKusick , current@freebsd.org Subject: MINCYLGRPS (was: 4-stable releases on -current?) Message-ID: <20030226124810.GB88741@sunbay.com> References: <20030224094711.GA289@zibbi.icomtek.csir.co.za> <20030224102649.GA31100@sunbay.com> <20030224163505.GA12550@zibbi.icomtek.csir.co.za> <20030224172230.GA89139@sunbay.com> <20030224173812.GA14630@zibbi.icomtek.csir.co.za> <20030224174437.GA94899@sunbay.com> <20030224201528.GA10344@sunbay.com> <20030225180219.GA58778@zibbi.icomtek.csir.co.za> <20030225195202.GA72331@sunbay.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p2kqVDKq5asng8Dg" Content-Disposition: inline In-Reply-To: <20030225195202.GA72331@sunbay.com> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --p2kqVDKq5asng8Dg Content-Type: multipart/mixed; boundary="xXmbgvnjoT4axfJE" Content-Disposition: inline --xXmbgvnjoT4axfJE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 25, 2003 at 09:52:02PM +0200, Ruslan Ermilov wrote: > On Tue, Feb 25, 2003 at 08:02:19PM +0200, John Hay wrote: [...] > > Ok, with the patches below I can get to where it tries to build the > > fixit floppy in release.10. It breaks because the floppy is too small. > > I must still check to make sure it is true. > >=20 > We'll know this in less than 1:30 -- I've just launched the > snapshot build for 4.x/i386 on my fast -stable box. >=20 > While I was writing it, it's already finished (successfully). >=20 > ftp://ftp.sunbay.net/pub/FreeBSD/snapshots/i386/4.x-20030225-STABLE/ >=20 OK, I've tracked it down to the differences in newfs(8) between 4.x and 5.x. In 4.x, newfs'ing a 1.44MB floppy results in a single cylinder group, but in 5.x there's a thing called MINCYLGRPS, which results in fewer free space on a floppy: : # uname -r : 4.7-STABLE : # ./x : Warning: Block size restricts cylinders per group to 6. : Warning: 1216 sector(s) in last cylinder unallocated : /dev/vn0c: 2880 sectors in 1 cylinders of 1 tracks, 4096 sectors : 1.4MB in 1 cyl groups (6 c/g, 12.00MB/g, 384 i/g) : super-block backups (for fsck -b #) at: : 32 : Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mount= ed on : /dev/vn0 1363 0 1363 0% 1 381 0% =20 : # uname -r : 5.0-CURRENT : # ./x : /dev/md0c: 1.4MB (2880 sectors) block size 4096, fragment size 512 : using 4 cylinder groups of 0.36MB, 91 blks, 128 inodes. : super-block backups (for fsck -b #) at: : 32, 760, 1488, 2216 : Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounte= d on : /dev/md0 1311 0 1311 0% 1 509 0% =20 With this patch to newfs(8), : Index: mkfs.c : =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D : RCS file: /home/ncvs/src/sbin/newfs/mkfs.c,v : retrieving revision 1.74 : diff -u -p -r1.74 mkfs.c : --- mkfs.c 22 Feb 2003 23:26:11 -0000 1.74 : +++ mkfs.c 26 Feb 2003 11:20:57 -0000 : @@ -317,7 +317,7 @@ mkfs(struct partition *pp, char *fsys) : for ( ; sblock.fs_fpg < maxblkspercg; sblock.fs_fpg +=3D sblock.fs_frag= ) { : sblock.fs_ipg =3D roundup(howmany(sblock.fs_fpg, fragsperinode), : INOPB(&sblock)); : - if (sblock.fs_size / sblock.fs_fpg < MINCYLGRPS) : + if (sblock.fs_size / sblock.fs_fpg < (Oflag =3D=3D 2 ? MINCYLGRPS : 1)) : break; : if (CGSIZE(&sblock) < (unsigned long)sblock.fs_bsize) : continue; I still don't get the same picture as on 4.x, but it's now at least sufficient to make release.10 happy. : # ./x : /dev/md0c: 1.4MB (2880 sectors) block size 4096, fragment size 512 : using 1 cylinder groups of 1.41MB, 361 blks, 416 inodes. : super-block backups (for fsck -b #) at: : 32 : Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounte= d on : /dev/md0 1359 0 1359 0% 1 413 0% =20 John, I'm sending you the complete patchset in another email. Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --xXmbgvnjoT4axfJE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=x FSIMG=fixit.flp FSSIZE=1440 FSLABEL=fd1440 FSINODE=4000 dd of=${FSIMG} if=/dev/zero count=${FSSIZE} bs=1k 2>/dev/null case `uname -r` in 4.*) DEVICE=vn0 vnconfig -s labels -c /dev/${DEVICE} ${FSIMG} ;; 5.*) DEVICE=`mdconfig -a -t vnode -f ${FSIMG}` ;; esac disklabel -w -B ${DEVICE} ${FSLABEL} newfs -i ${FSINODE} -o space -m 0 /dev/${DEVICE}c #disklabel ${DEVICE} df -i /dev/${DEVICE} case `uname -r` in 4.*) vnconfig -u ${DEVICE} ;; 5.*) mdconfig -d -u ${DEVICE} ;; esac --xXmbgvnjoT4axfJE-- --p2kqVDKq5asng8Dg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+XLeKUkv4P6juNwoRAo8dAJ9zOFcq/lEm26xlgYRqB9fjJZKTJACfdFkL fLd6GUXkhLS5O/eMstADg/o= =NTQ5 -----END PGP SIGNATURE----- --p2kqVDKq5asng8Dg-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message