Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!swrinde!mips!clp From: clp@mips.com (Carol Preston) Newsgroups: comp.sys.mips Subject: Re: bad block tables lost? Message-ID: <3670@spim.mips.COM> Date: 20 May 91 05:12:27 GMT References: <91May16.033557edt.18604@me.utoronto.ca> Sender: news@mips.COM Organization: Mips Computer Systems Lines: 34 Nntp-Posting-Host: dish.mips.com SCSI and SMD keep track of defects differently. SCSI keeps track of the defect list itself, and SMD basically requires the OS to keep track of the list. For a SCSI disk, the defects that the manufacturer mapped out are kept in the "primary" defect list. This can't change. Those defects that are mapped out subsequently are put in a "secondary" list. There is a specific SCSI command to access the part of the disk where the lists are kept, and the format command doesn't supply this functionality, for better or worse. For SMD disks, RISC/os keeps the list of defects and the manner in which they were mapped, in the volume header (partition 8). If you re-format this partition, and don't write out the volume header before exiting the format program, the list is forever lost and must be reentered. There are also other ways in which this list can be lost. As previously mentioned, one way is if the block to which they are written goes bad (and can't be recovered). An on-line format program has been released since RISC/os 4.52, and with it comes the functionality for saving the defect list to a Unix file. I would suggest that if you are worried about losing this list, you should run /etc/format, and do nothing more than list the defects to a file. (Of course, I would not recommend keeping this file on the same disk.) Additionally '/etc/badspots -l' displays the defect list for a given disk. For SCSI, it lists both the primary and secondary lists, and for SMD, it lists the defects stored in the volume header. Both format and badspots have a man page with further information. Neither of these commands can be run on pre-4.52 kernels as they use newly defined ioctl calls. -- Carol Preston UUCP: {ames,decwrl,prls,pyramid}!mips!clp clp@mips.com DDD: (408)720-1700 x8108 or (408)524-8108 USPS: Mips Computer Systems 950 DeGuigne Ave. Sunnyvale, CA 94088