From owner-freebsd-questions Mon May 1 04:14:14 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id EAA21418 for questions-outgoing; Mon, 1 May 1995 04:14:14 -0700 Received: from hda.com (hda.com [199.232.40.182]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id EAA21412 for ; Mon, 1 May 1995 04:14:10 -0700 Received: (dufault@localhost) by hda.com (8.6.9/8.3) id HAA20810; Mon, 1 May 1995 07:12:14 -0400 From: Peter Dufault Message-Id: <199505011112.HAA20810@hda.com> Subject: Re: formatting a scsi disk To: bmk@dtr.com Date: Mon, 1 May 1995 07:12:14 -0400 (EDT) Cc: john@starfire.mn.org, questions@FreeBSD.org In-Reply-To: <199505011035.DAA13146@dtr.com> from "bmk@dtr.com" at May 1, 95 03:35:34 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 1642 Sender: questions-owner@FreeBSD.org Precedence: bulk bmk@dtr.com writes: > > > > > You can do a basic format of /dev/rsd0d with: > > > > scsi -f /dev/rsd0d -c "4 0 0 0 0 0" > > Can't get it to work here, any clues? > > root (11) % scsi -f /dev/rsd2d -v -c "4 0 0 0 0 0" > Need the command format string. > Usage: > > scsi -f device -d debug_level # To set debug level > scsi -f device -p [-b bus] [-l lun] # To probe all devices > scsi -f device -r [-b bus] [-t targ] [-l lun] # To reprobe a device > scsi -f device [-v] -c cmd_fmt [arg0 ... argn] \ # To send a command... > -o count out_fmt [arg0 ... argn] # EITHER (for data out) > -i count in_fmt # OR (for data in) > > "out_fmt" can be "-" to read output data from stdin; > "in_fmt" can be "-" to write input data to stdout; > > If debugging is not compiled in the kernel, "-d" will have no effect Yes: "partially fixed in -current". It turns out that commands with no data have never worked via "scsi" (yikes). That is fixed in -current, and I'm on to two new problems: 1. We need to be able to specify the timeout (the default is 2 seconds, which is not going to work well for formatting your disks) 2. We need to account for disks that can't be opened by the disk driver before formatting. The first problem is easy, the second might be. Thanks to Joerg fork keeping a disk around that he is willing to format and has been helping me sort this out. -- Peter Dufault Real Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267