Date: Fri, 8 Sep 1995 14:58:42 -0500 From: "Daniel M. Eischen" <deischen@iworks.InterWorks.org> To: kuku@gilberto.physik.rwth-aachen.de, questions@freebsd.org Subject: Re: in situ scsi formatting Message-ID: <9509081958.AA19961@iworks.InterWorks.org>
next in thread | raw e-mail | index | archive | help
>Is there a way to low level format a SCSI drive under FreeBSD?
>I have one drive that has a media error and I don't want to run
>SCSICNTL.EXE from a DOS diskette.
>
>It would be nice to dismount the drive, send it the appropriate
>scsi commands (scsi) and partition and disklabel it afterwards.
>Has anyone done so?
Can't you use the scsi(8) command to format the drive?
bash$ man scsi
SCSI(8) UNIX System Manager's Manual SCSI(8)
NAME
scsi - program to assist with scsi devices.
SYNOPSIS
Usage:
scsi -f device -d debug_level # To set debug level
scsi -f device [-v] -z seconds # To freeze bus
scsi -f device -m page [-P pc] [-e] # To read mode pages
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] [-s seconds] -c cmd_fmt [arg0 ... argn] # A command...
-o count out_fmt [arg0 ... argn] # EITHER (for data out)
-i count in_fmt # OR (for data in)
[...]
BUGS
This command wasn't ready for inclusion in 2.0R and so is missing in that
release.
Some devices respond to an inquiry for all LUNS. This will cause them to
come on line to 8 times during reprobe to different logical units.
The "-i" option to do an inquiry went away in 2.1. The new facilities
provided by "-c" supercede that.
Check your permissions carefully. "scsi -f /dev/rsd0c -c "4 0 0 0 0 0"
permits anyone who can open /dev/rsd0c to format the disk drive. This
must be changed to at least require write access to the drive.
HISTORY
The scsi command appeared in 386BSD 0.1.2.4/FreeBSD to support the new
reprobe and user SCSI commands.
4th Berkeley Distribution October 11, 1993 3
I've tried to do this in the process of trying to fix a broken Quantum
and it seemed like it was working (the drive was hosed and prevented
the command from completing).
Dan Eischen
deischen@iworks.InterWorks.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9509081958.AA19961>
