DASD 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. DASD device driver
  2. S/390's disk devices (DASDs) are managed by Linux via the DASD device
  3. driver. It is valid for all types of DASDs and represents them to
  4. Linux as block devices, namely "dd". Currently the DASD driver uses a
  5. single major number (254) and 4 minor numbers per volume (1 for the
  6. physical volume and 3 for partitions). With respect to partitions see
  7. below. Thus you may have up to 64 DASD devices in your system.
  8. The kernel parameter 'dasd=from-to,...' may be issued arbitrary times
  9. in the kernel's parameter line or not at all. The 'from' and 'to'
  10. parameters are to be given in hexadecimal notation without a leading
  11. 0x.
  12. If you supply kernel parameters the different instances are processed
  13. in order of appearance and a minor number is reserved for any device
  14. covered by the supplied range up to 64 volumes. Additional DASDs are
  15. ignored. If you do not supply the 'dasd=' kernel parameter at all, the
  16. DASD driver registers all supported DASDs of your system to a minor
  17. number in ascending order of the subchannel number.
  18. The driver currently supports ECKD-devices and there are stubs for
  19. support of the FBA and CKD architectures. For the FBA architecture
  20. only some smart data structures are missing to make the support
  21. complete.
  22. We performed our testing on 3380 and 3390 type disks of different
  23. sizes, under VM and on the bare hardware (LPAR), using internal disks
  24. of the multiprise as well as a RAMAC virtual array. Disks exported by
  25. an Enterprise Storage Server (Seascape) should work fine as well.
  26. We currently implement one partition per volume, which is the whole
  27. volume, skipping the first blocks up to the volume label. These are
  28. reserved for IPL records and IBM's volume label to assure
  29. accessibility of the DASD from other OSs. In a later stage we will
  30. provide support of partitions, maybe VTOC oriented or using a kind of
  31. partition table in the label record.
  32. USAGE
  33. -Low-level format (?CKD only)
  34. For using an ECKD-DASD as a Linux harddisk you have to low-level
  35. format the tracks by issuing the BLKDASDFORMAT-ioctl on that
  36. device. This will erase any data on that volume including IBM volume
  37. labels, VTOCs etc. The ioctl may take a 'struct format_data *' or
  38. 'NULL' as an argument.
  39. typedef struct {
  40. int start_unit;
  41. int stop_unit;
  42. int blksize;
  43. } format_data_t;
  44. When a NULL argument is passed to the BLKDASDFORMAT ioctl the whole
  45. disk is formatted to a blocksize of 1024 bytes. Otherwise start_unit
  46. and stop_unit are the first and last track to be formatted. If
  47. stop_unit is -1 it implies that the DASD is formatted from start_unit
  48. up to the last track. blksize can be any power of two between 512 and
  49. 4096. We recommend no blksize lower than 1024 because the ext2fs uses
  50. 1kB blocks anyway and you gain approx. 50% of capacity increasing your
  51. blksize from 512 byte to 1kB.
  52. -Make a filesystem
  53. Then you can mk??fs the filesystem of your choice on that volume or
  54. partition. For reasons of sanity you should build your filesystem on
  55. the partition /dev/dd?1 instead of the whole volume. You only lose 3kB
  56. but may be sure that you can reuse your data after introduction of a
  57. real partition table.
  58. BUGS:
  59. - Performance sometimes is rather low because we don't fully exploit clustering
  60. TODO-List:
  61. - Add IBM'S Disk layout to genhd
  62. - Enhance driver to use more than one major number
  63. - Enable usage as a module
  64. - Support Cache fast write and DASD fast write (ECKD)