Ordinary Harddisks on the AS/400: Difference between revisions

From Try-AS/400
Jump to navigation Jump to search
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The following article is an excerpt from the [https://kb.pocnet.net/wiki/Standard-Festplatten_an_der_AS/400 PoCnet-Wiki], translated to english language.
The following article is an excerpt from the [https://kb.pocnet.net/wiki/Standard-Festplatten_an_der_AS/400 PoCnet-Wiki], translated to english language.


Ordinary SCSI-Disks cannot be used with the AS/400. They even do not show up in DST.
Ordinary SCSI-Disks cannot be used with the AS/400. They don’t even show up in DST<ref>Roughly what’s known on PC platforms as ''BIOS''.</ref>.


== AS/400-Disk in a Linux box ==
== AS/400 disk in a Linux box ==
This is a shortened sample output from a linux box' kernel log:
This is a shortened sample output from a Linux box’ kernel log:
  scsi 5:0:3:0: Direct-Access    IBMAS400 DFHSS4W          5959 PQ: 0 ANSI: 2
  scsi 5:0:3:0: Direct-Access    IBMAS400 DFHSS4W          5959 PQ: 0 ANSI: 2
  scsi5:A:3:0: Tagged Queuing enabled.  Depth 8
  scsi5:A:3:0: Tagged Queuing enabled.  Depth 8
Line 20: Line 20:
  sd 5:0:3:0: [sdb] Unsupported sector size 522.
  sd 5:0:3:0: [sdb] Unsupported sector size 522.


As you can see, these disks utilize 522&thinsp;Bytes per sector instead of 512 as the rest of the world does. There is a command line utility called [http://micha.freeshell.org/scsi/ setblocksize] by Michael Baeuerle. It provides the possibility to reformat disks (which support this) with different sector sizes.
As you can see, these disks utilize 522&thinsp;bytes per sector instead of 512 as the rest of the world does. There is a command line utility called [http://micha.freeshell.org/scsi/ setblocksize] by Michael Baeuerle. It provides the possibility to reformat disks (supporting changeable block sizes) with different sector sizes.


== Ordinary Harddisks on the AS/400 ==
== Ordinary harddisks on the AS/400 ==
Unfortunately, it's not sufficient to just reformat disks to the proper sector size. It may even happen that disks with a vendor id different from ''IBM'' won't show up in DST regardless of the sector size.
Unfortunately, it’s not sufficient to just reformat disks to the proper sector size. It may even happen that disks with a vendor ID different from ''IBM'' won’t show up in DST regardless of the sector size.


Newer research suggests that AS/400 approved disks have a custom IDENTITY response, additional VPD<ref>Vital Product Data.</ref> tables, and two additional, vendor defined SCSI commands: SKIP READ and SKIP WRITE. It is not clear which combination of the differences are mandatory for getting a disk to run on an AS/400.
Newer research suggests that AS/400 approved disks have a custom IDENTITY response, additional VPD<ref>Vital Product Data.</ref> tables, and two additional, vendor defined SCSI commands: SKIP READ and SKIP WRITE. It is not clear which combination of the differences are mandatory for getting a disk to run on an AS/400.


I tried to get an IBM DCHS 9&thinsp;GB 3.5"-Disk to work on a 9401-150. Without success. The disk shows up in DST and when trying to start a surface test, the following error message appears:
I tried to get an IBM DCHS 9&thinsp;GB 3.5" disk to work on a 9401-150, without success. The disk shows up in DST and when trying to start a surface test, the following error message appears:
                           Error Report
                           Error Report
   
   
Line 80: Line 80:


== Background Information ==
== Background Information ==
Disks for AS/400 systems come in two flavours, 520 Bytes and 522 Bytes per Sector. The 520-Bytes-Format is considered outdated by IBM. 520 bytes formatted disks were used with old CISC machines only.<ref>Exception: AS/400 5xx models with disks attached on the internal Multi-Function I/O Processor.</ref>
Disks for AS/400 systems come in two flavours, 520 bytes and 522 bytes per sector. The 520 bytes format is considered outdated by IBM. 520 bytes formatted disks were used with old CISC machines only.<ref>Exception: AS/400 5xx models with disks attached on the internal Multi-Function I/O Processor.</ref>


The 520-Bytes-Format is composed of:
The 520 bytes format is composed of:
* 8 Bytes Header,
* 8 bytes header,
* 512 Bytes Payload.
* 512 bytes payload


The 522-Bytes-Format composed of:
The 522 bytes format composed of:
* 8 Bytes Header,
* 8 bytes header,
* 512 Bytes Payload,
* 512 bytes payload,
* 2 Bytes Trailer.
* 2 bytes trailer


The 522-Bytes-Format is mandatory for:
The 522 bytes format is mandatory for:
* RAID,
* RAID,
* Compression.
* Compression


Metadata for these (and probably more) features are kept in these trailer bytes.
Metadata for these (and probably more) features are kept in these trailer bytes.


The header consists of metadata for the block's payload. Example: Protection (RAID1, RAID5 or similar). Also it contains flags if the block contains valid data, an individual block address (probably needed for the famous single level storage addressing scheme), and more. Metatada is exclusively utilized by the I/O-Processor. The OS itself handles 512 Bytes per Sector Data as known from other Systems.
The header consists of metadata for the block’s payload. Example: Protection (RAID1, RAID5 or similar). Also it contains flags if the block contains valid data, an individual block address (probably needed for the famous single level storage addressing scheme), and more. Metatada is exclusively utilized by the I/O processor. The OS itself handles 512 bytes per sector data as known from other systems.


Header and trailer will be written while formatting a drive with the accompanying AS/400 tool (DST).
Header and trailer will be written while formatting a drive with the accompanying AS/400 tool (DST).


== Alternative Solutions ==
== Alternative Solutions ==
A UK based company offers an adapter board which makes it possible to use standard compact flash media instead of spinning disks. It seems that this solution has never been tested in the field. I got a product sample for testing but it fails to be recognized by the system: This adapter also works with 512 Bytes per sector and as such won't be recognized by the system.
A UK based company offers an adapter board that makes it possible to use standard compact flash media instead of spinning disks. It seems that this solution has never been tested in the field. I got a product sample for testing but it fails to be recognized by the system: This adapter also works with 512 Bytes per sector and as such won’t be recognized by the system.


The adapter also provides emulation of a tape drive. This works like a charm.
The adapter also provides emulation of a tape drive. This works like a charm.


== Fußnoten ==
== See also ==
<references />
* [[Copying disks with Linux]]


== Weblinks ==
== Weblinks ==
Line 116: Line 116:
** [http://www.peripheral-vision.com/products/scsi-to-compact-flash/ SCSICFDISK - SCSI to Compact Flash Disk] from Peripheral Vision
** [http://www.peripheral-vision.com/products/scsi-to-compact-flash/ SCSICFDISK - SCSI to Compact Flash Disk] from Peripheral Vision
* [http://friedkiwi.github.io/scsi2sd/ SCSI2SD/400]
* [http://friedkiwi.github.io/scsi2sd/ SCSI2SD/400]
* [http://qseco.fr/research/demystifying-as400-dasd/ Demystifying AS/400 DASD]
* [http://ps-2.kev009.com/rs6000/manuals/SAN/ESS/2105_Model_ExxFxx/ESS_SCSI_Command_Reference_ExxFxx_SC26-7297-01.PDF IBM SCSI Command Reference,] 2105 Models E10, E20, F10, and F20
* [http://ps-2.kev009.com/rs6000/manuals/SAN/ESS/2105_Model_ExxFxx/ESS_SCSI_Command_Reference_ExxFxx_SC26-7297-01.PDF IBM SCSI Command Reference,] 2105 Models E10, E20, F10, and F20


[[Category: Basic Knowledge]]
== Footnotes ==
<references />
 
[[Category: Hardware Configuration Guide]]

Latest revision as of 15:11, 5 August 2023

The following article is an excerpt from the PoCnet-Wiki, translated to english language.

Ordinary SCSI-Disks cannot be used with the AS/400. They don’t even show up in DST[1].

AS/400 disk in a Linux box

This is a shortened sample output from a Linux box’ kernel log:

scsi 5:0:3:0: Direct-Access     IBMAS400 DFHSS4W          5959 PQ: 0 ANSI: 2
scsi5:A:3:0: Tagged Queuing enabled.  Depth 8
scsi target5:0:3: Beginning Domain Validation
scsi target5:0:3: wide asynchronous
scsi target5:0:3: FAST-10 WIDE SCSI 20.0 MB/s ST (100 ns, offset 8)
sd 5:0:3:0: [sdb] Unsupported sector size 522.
sd 5:0:3:0: [sdb] 0 512-byte logical blocks: (0 B/0 B)
sd 5:0:3:0: [sdb] 522-byte physical blocks
sd 5:0:3:0: [sdb] Write Protect is off
sd 5:0:3:0: [sdb] Mode Sense: b3 00 10 08
sd 5:0:3:0: [sdb] Write cache: disabled, read cache: enabled, supports DPO and FUA
sd 5:0:3:0: [sdb] Unsupported sector size 522.
sd 5:0:3:0: [sdb] Attached SCSI disk
sd 5:0:3:0: [sdb] Unsupported sector size 522.

As you can see, these disks utilize 522 bytes per sector instead of 512 as the rest of the world does. There is a command line utility called setblocksize by Michael Baeuerle. It provides the possibility to reformat disks (supporting changeable block sizes) with different sector sizes.

Ordinary harddisks on the AS/400

Unfortunately, it’s not sufficient to just reformat disks to the proper sector size. It may even happen that disks with a vendor ID different from IBM won’t show up in DST regardless of the sector size.

Newer research suggests that AS/400 approved disks have a custom IDENTITY response, additional VPD[2] tables, and two additional, vendor defined SCSI commands: SKIP READ and SKIP WRITE. It is not clear which combination of the differences are mandatory for getting a disk to run on an AS/400.

I tried to get an IBM DCHS 9 GB 3.5" disk to work on a 9401-150, without success. The disk shows up in DST and when trying to start a surface test, the following error message appears:

                          Error Report

Note: Some action will need to be taken for the errors listed
below.  Please select an error to display the detailed 
information for it.  The detailed information will indicate
what action may need to be taken to correct the error.

Type option, press Enter.
  5=Display Detailed Report

OPT   Error
 _    Disk units without the system support

Entering 5 (for continue), the next message reads:

                Disk Units without the System Support

The following disk units do not have the correct system
support.  The function you requested can not be completed
until the correct system support is applied.  Call for service.

            Serial                  Resource
ASP  Unit   Number      Type  Model Name         Status
[Output of details for the disk in question]

Trying to format the disk within DST yields the following error:

                     Combined Error/Attention Report

Note: Some action may need to be taken for the errors and/or
problems listed below.  Please select an error or problem to
display the detailed information for it.  The detailed
information will indicate what action may need to be taken
to correct the error or the problem.

Type option, press Enter.
  5=Display Detailed Report

OPT   Error
 _    Disk unit I/O failure, check reference code

Entering 5 (for continue), the next message reads:

                                I/O Error

The system encountered an error while it was attempting to
read or write to a disk unit.

Contact your service representative with the following
information:


                                        --Reference Codes--
Serial                    Resource        I/O
Number       Type  Model  Name          Processor    Device

The reference codes are 0. Not helpful.

Background Information

Disks for AS/400 systems come in two flavours, 520 bytes and 522 bytes per sector. The 520 bytes format is considered outdated by IBM. 520 bytes formatted disks were used with old CISC machines only.[3]

The 520 bytes format is composed of:

  • 8 bytes header,
  • 512 bytes payload

The 522 bytes format composed of:

  • 8 bytes header,
  • 512 bytes payload,
  • 2 bytes trailer

The 522 bytes format is mandatory for:

  • RAID,
  • Compression

Metadata for these (and probably more) features are kept in these trailer bytes.

The header consists of metadata for the block’s payload. Example: Protection (RAID1, RAID5 or similar). Also it contains flags if the block contains valid data, an individual block address (probably needed for the famous single level storage addressing scheme), and more. Metatada is exclusively utilized by the I/O processor. The OS itself handles 512 bytes per sector data as known from other systems.

Header and trailer will be written while formatting a drive with the accompanying AS/400 tool (DST).

Alternative Solutions

A UK based company offers an adapter board that makes it possible to use standard compact flash media instead of spinning disks. It seems that this solution has never been tested in the field. I got a product sample for testing but it fails to be recognized by the system: This adapter also works with 512 Bytes per sector and as such won’t be recognized by the system.

The adapter also provides emulation of a tape drive. This works like a charm.

See also

Weblinks

Footnotes

  1. Roughly what’s known on PC platforms as BIOS.
  2. Vital Product Data.
  3. Exception: AS/400 5xx models with disks attached on the internal Multi-Function I/O Processor.