Since a while the Linux DASD driver has been enhanced to access full ECKD tracks. Basically the following steps are needed:
- Take the device offline from other System z operating systems
- get the device online in zLinux
- switch the device in raw ECKD mode:
echo 1 > /sys/bus/ccw/devices/<device ID>/raw_track_access
- use a program that reads and writes whole tracks (64k) with direct IO like a dd with the respective flags to read or write
More details can be found in the chapter about the DASD driver (search for “raw_track_access”) in the “Device Drivers, Features, and Commands” book for the respective distributions, e.g.
- Device Drivers, Features, and Commands on SUSE Linux Enterprise Server 11 SP3 – SC34-2595-03
- Device Drivers, Features, and Commands on Red Hat Enterprise Linux 6.4 – SC34-2597-04
- Device Drivers, Features, and Commands (kernel 3.11) – SC33-8411-22
This book is really recommended as a reference.