From owner-freebsd-current Wed Aug 25 9:56:43 1999 Delivered-To: freebsd-current@freebsd.org Received: from gateway.cybernet.com (gateway.cybernet.com [192.245.33.1]) by hub.freebsd.org (Postfix) with ESMTP id 831CE1598C for ; Wed, 25 Aug 1999 09:56:40 -0700 (PDT) (envelope-from mtaylor@cybernet.com) Received: from spiffy.cybernet.com (spiffy.cybernet.com [192.245.33.55]) by gateway.cybernet.com (8.8.8/8.8.8) with ESMTP id MAA28051 for ; Wed, 25 Aug 1999 12:56:17 -0400 (EDT) (envelope-from mtaylor@cybernet.com) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Wed, 25 Aug 1999 13:01:14 -0400 (EDT) Reply-To: mtaylor@cybernet.com Organization: Cybernet Systems From: "Mark J. Taylor" To: current@freebsd.org Subject: newfs of a ccd failing? Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I've had this problem since at least FreeBSD 3.1-RELEASE (it works in 2.2.7/2.2.8). Same problem in 3.2-RELEASE and -current (as of last night). Can someone reproduce this error? I can't believe that you can't newfs a ccd... did I miss something? spiffy# ./ccdtest.sh [snip] newfs /dev/rccd0c Warning: 16 sector(s) in last cylinder unallocated /dev/rccd0c: 204784 sectors in 50 cylinders of 1 tracks, 4096 sectors 100.0MB in 4 cyl groups (16 c/g, 32.00MB/g, 6272 i/g) super-block backups (for fsck -b #) at: 32, 65568, 131104, 196640 newfs: ioctl (WDINFO): No such process newfs: /dev/rccd0c: can't rewrite disk label I believe that there is a problem in/near ufs/ufs/ufs_disksubr.c where it says that it requires an existing disklabel before it writes a new one. If I change the "#if 1" to an "#if 0" in it, then I don't get this failure. Here's my test script: #!/bin/sh # # ccdtest.sh # # Build a 100 MByte linear ccd from a vnode and newfs it. # set -v set -e ccdconfig -u ccd0 2> /dev/null || true vnconfig -u /dev/vn0 2> /dev/null || true (cd /dev && ./MAKEDEV ccd0 vn0) if [ ! -f /var/tmp/vn0 ]; then dd if=/dev/zero of=/var/tmp/vn0 bs=1024 count=102400 fi vnconfig -e -s labels /dev/vn0 /var/tmp/vn0 disklabel -w -r vn0 auto echo "Make 'c' a 4.2BSD type filesystem. [press Enter now]" read dummy disklabel -e vn0 ccdconfig -c ccd0 0 0 /dev/vn0c newfs /dev/rccd0c ccdconfig -u ccd0 || true vnconfig -u /dev/vn0 || true -Mark Taylor NetMAX Developer mtaylor@cybernet.com http://www.netmax.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message