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