Date: Wed, 26 May 1999 20:06:06 -0600 (MDT) From: "Kenneth D. Merry" <ken@plutotech.com> To: dkelly@HiWAAY.net (David Kelly) Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: proper mode page values? Message-ID: <199905270206.UAA16406@panzer.plutotech.com> In-Reply-To: <199905270117.UAA48835@nospam.hiwaay.net> from David Kelly at "May 26, 1999 08:17:01 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
David Kelly wrote... > My formerly wonderful IBM DCAS 34330 narrow drive is acting up on my > little FreeBSD system (a 486/133). Several months ago I had to use the > Adaptec 2940 built in utility to scan the drive for bad blocks. It > found several. Followed up with a clean installation of FreeBSD 3.1. > > Now I'm getting "indefinite wait" messages from swap_pager, much like > Dag-Erling Smorgrav reported on 19 Feb 1999, something like this: > > swap_pager: indefinite wait buffer: device: 0x30401, blkno: 264, size: 4096 > > The problem blocks are always 264, 272, and 496. You should also be getting some SCSI error message printed on the console. > And to make things maximally fun, it only happens when reading variable > block sized QIC-1000 tapes with an Archive Anaconda. Fixed block size > on a QIC-150 runs nicely. The variable QIC-1000 starts and stops and > starts and stops with every block. > > sa1 at ahc0 bus 0 target 6 lun 0 > sa1: <ARCHIVE ANCDA 2750 28077 -003> Removable Sequential Access SCSI-2 device > sa1: 5.000MB/s transfers (5.000MHz, offset 15) That's rather odd. It may be that the Anaconda is staying on the bus too long or something. I dunno. > Tried using camcontrol to view my bad block lists. Doesn't work on that > IBM drive, nor the IBM drive on this machine: > > nospam: [1031] camcontrol defects -n da -u 0 -G > camcontrol: no defect list format specified > nospam: [1032] camcontrol defects -n da -u 0 -f block -G > error reading defect list: Input/output error > nospam: [1033] camcontrol defects -n da -u 0 -f bfi -G > error reading defect list: Input/output error > nospam: [1034] camcontrol defects -n da -u 0 -f phys -G > error reading defect list: Input/output error > nospam: [1035] camcontrol defects -n da -u 0 -f phys -P > error reading defect list: Input/output error > nospam: [1036] camcontrol defects -n da -u 0 -f bfi -P > error reading defect list: Input/output error > nospam: [1037] camcontrol defects -n da -u 0 -f block -P > error reading defect list: Input/output error You need to use the -v switch on the command line to see why the command is failing. > So then I go looking at mode pages to see what is set and to see if by > any chance the drive was told not to substitute replacements for > weakening blocks: > > nospam: [1038] camcontrol modepage -n da -u 0 -m 1 -P 2 > AWRE (Auto Write Reallocation Enbld): 0 > ARRE (Auto Read Reallocation Enbld): 0 Those are the defaults. > nospam: [1039] camcontrol modepage -n da -u 0 -m 1 -P 3 > AWRE (Auto Write Reallocation Enbld): 1 > ARRE (Auto Read Reallocation Enbld): 1 And these are the saved parameters. > The DCAS defaults are itentical to the stored values shown above on my: > > da0 at ncr0 bus 0 target 0 lun 0 > da0: <IBM OEM DCHS09W 2222> Fixed Direct Access SCSI-2 device > da0: 20.000MB/s transfers (10.000MHz, offset 15, 16bit), Tagged Queueing Enabled > da0: 8689MB (17796077 512 byte sectors: 255H 63S/T 1107C) > > The DCAS is on a version 1.16 Adaptec 2940, but on a different computer: > > ahc0: <Adaptec 2940 SCSI adapter> rev 0x00 int a irq 15 on pci0.9.0 > ahc0: aic7870 Single Channel A, SCSI Id=7, 16/255 SCBs > > So much for the background info. To the meat of the matter: > > How can I get bad block lists from IBM SCSI drives? Am I doing it wrong > or does it simply not work yet? It should work, use the -v switch argument to camcontrol to figure out why it's failing. > How to scan a SCSI drive and reallocate bad blocks? There's no utility, other than perhaps your controller's builtin utility, to automatically do that. There are a couple of things you can do from FreeBSD, though, that will allow you to either remap bad blocks automatically or manually: 1. Enable read and write reallocation, and then do a dd to overwrite the entire disk. That will force any bad blocks to get remapped. 2. Enable read and write reallocation, and then do a dd to read the entire disk to /dev/null or something like that. Each time you get something in your dmesg about a bad block, note the block number (in the info: section of the sense printout) and then use camcontrol to write something out to that disk block. I used the latter method to recover a disk with a bad block a month or so ago. At some point I may put a bad block scanning and remapping utility into camcontrol, but there are some other things I want to do first. > Are my modepage parameters sane? Was looking at page 0x01 because I was > worried about error handling. But here's the popular 0x08 too: > > nospam: [1043] camcontrol modepage -n da -u 0 -m 8 -P 3 > IC: 0 > ABPF: 0 > CAP: 0 > DISC: 0 > SIZE: 0 > WCE: 0 > MF: 0 > RCD: 0 > Demand Retention Priority: 1 > Write Retention Priority: 1 > Disable Pre-fetch Transfer Length: 65535 > Minimum Pre-fetch: 0 > Maximum Pre-fetch: 65535 > Maximum Pre-fetch Ceiling: 65535 Looks okay to me. The only one you might want to play with is the WCE bit, which enables write caching. That won't have any effect Ken -- Kenneth Merry ken@plutotech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905270206.UAA16406>