Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 May 1995 07:12:14 -0400 (EDT)
From:      Peter Dufault <dufault@hda.com>
To:        bmk@dtr.com
Cc:        john@starfire.mn.org, questions@FreeBSD.org
Subject:   Re: formatting a scsi disk
Message-ID:  <199505011112.HAA20810@hda.com>
In-Reply-To: <199505011035.DAA13146@dtr.com> from "bmk@dtr.com" at May 1, 95 03:35:34 am

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?199505011112.HAA20810>