Root/Documentation/s390/DASD

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

Archive Download this file



interactive