ZDSFS(1)
π NAME π
ZDSFS(1) β zdsfs β File system for z/OS data set access β straight out of the General Commands Manual, bestie. π
Okay so this is the manual page for zdsfs, the file system for z/OS data set access. Itβs giving βlet me translate mainframe data sets into something your Linux tools can actually readβ energy, and honestly? Iconic. β¨
β¨ SYNOPSIS β¨
mounting:
zdsfs <devices> <mountpoint> [<options>]
unmounting:
fusermount -u <mountpoint>
πΈ DESCRIPTION πΈ
Use the zdsfs command for read access to z/OS data sets stored on one or more DASDs. π₯
The zdsfs file system translates the record-based z/OS data sets to UNIX file system semantics. After mounting the devices, you can use common Linux tools to access the files on the disk. Physical sequential data sets are represented as files. Partitioned data sets are represented as directories, with each member being represented as a file in that directory. π«Ά
π§ RESTRICTIONS π§
Okay bestie, this is the part where we keep it real. Read-only means read-only. No cap. π
- Only read access is supported.
- Data sets on tape devices are not supported.
- If the z/OSMF REST services are not used for a coordinated-read access, access to the device by Linux is not subject to RACF or any other z/OS auditing mechanism. Ensure the security of the data on the device by using the well-known Linux methods. By default,
zdsfsgrants access to the files in the fuse file system only to the user who started the tool. Configure file access behavior by using theallow_other,default_permissions,umask,uid, andgidoptions. π - When using the z/OSMF REST services for coordinated read access, every file open establishes a connection to the z/OSMF REST server. This checks that the accessing z/OS user ID has the appropriate access rights for the data set. Using this mechanism, an exclusive ENQ is obtained that marks the data set as in-use to z/OS. An ENQ is a z/OS method to control a serially reusable resource. While the ENQ is held, no z/OS application can modify the data set. If the ENQ cannot be obtained, the access attempt from Linux fails. π
- Only physical sequential (PS) and partitioned data sets (PDS) are supported. Supported record formats are: V, F, U, B, S, A, and M. π
- The file system is limited to basic operations:
readdir,stat,open,read, andseek. Because the actual size of the data in each track is not always known,zdsfsdoes not supportmmap. Seek operations read the whole data set to the given offset. The performance of seek operations to previous offsets can be improved by buffering seek offsets, see option-o seekbuffers'. π - A further consequence of the unknown exact data size is that
zdsfscannot provide exact file sizes. As a heuristic, the given file sizes are the maximum possible data sizes, based on the number and size of the extents that belong to each data set. When the actual end of the data is reached during read, the usual end of file (EOF) is returned. To ensure that the EOF is passed to the user correctly, the option-o direct_io'is set byzdsfsimplicitly. π§ - Incomplete multi-volume data sets are not detected if only the first volume (device) of the data set is present. π
π OPTIONS π
β¨ general options: β¨
<devices>β One or more DASD device nodes, where node specifications are separated by blanks. The device nodes can be specified explicitly with the command or with the-loption and a file.<mountpoint>β The mount point for the specified DASD.-o <opt>,[<opt>...]β Fuse or mount command options. For fuse options see βApplicable FUSE optionsβ below, for mount options seemount(8).-hor--helpβ Print usage information, then exit.-vor--versionβ Print version information, then exit.
π zdsfs options: π
-l <device_list>β The specified file<device_list>contains a list of device nodes, separated by white space (space, tab or new line). All device nodes in this file are mounted as if specified directly via the command line.-o rdwβ Keep record descriptor words in the byte stream. By default, data set files contain only the user data.
Record boundaries might be important for applications to correctly interpret the user data. For data sets with variable records, the record descriptor words are required to find the record boundaries. With fixed blocks, record boundaries can be computed from the fixed record sizes.
See z/OS DFSMS Using Data Sets for more information about record descriptor words.
-o ignore_incompleteβ Continue processing even if parts of a multi-volume data set are missing. By default,zdsfsends with an error unless all data sets are complete.
Incomplete data sets can be tolerated, for example, if all data of interest is on another data set that is complete. Incomplete data sets are not represented in the file system. Instead, for each incomplete data set, a warning message is written to the standard error stream.
-o tracks=<n>β Size of the track buffer in tracks. The default for<n>is 128.
The data that is read from the DASD must be stored in a buffer, because the minimum size for a read operation in raw access mode is one track, and the user data must be extracted from the track images. Reading more than one track at a time improves the overall performance, but requires larger buffers.
The memory needed by zdsfs for buffering a single track is 64KB for the raw track data and 56KB for the extracted user data. Each time a file is opened a total of (<n> * 120KB) is allocated for the track buffer.
-o seekbuffer=<s>β Upper limit in bytes for the seek history buffer size. The default forsis 1048576.
Because the block and record sizes in a data set may vary, the only way to find a data byte at a particular offset (seek) is to read and interpret the whole data set from the beginning, until the offset is reached.
To improve the performance of seek operations in areas that have already been read, zdsfs can buffer offsets in regular intervals. These intervals are multiples of <n> tracks, as specified with the tracks option.
For small data sets and large values of <n>, only a few seek offsets need to be buffered. In this case, the amount of memory that is actually allocated can be much smaller than the upper limit <s>.
If <s> is set to 0, no seek history buffer is allocated. In this case seek is still supported, but a seek operation might result in a read from the beginning of the data set.
-o check_host_countβ Stop processing if the device is used by another operating system instance.-c <config_file>β Provide a configuration file forzdsfs. The default is/etc/zdsfs.conf.-o restapiβ Use z/OSMF REST services for coordinated read-access to data sets. The user credentials are read from the.netrcfile in the userβs home directory, or from the location theNETRCenvironment variable points to.-o restserver=<server_URL>β Specify up to three server URLs to z/OSMF REST services. If more than one server is specified, the first that responds is used. If a server does not respond any longer during operation all specified server are probed again.-x <dataset_file>β Use a config file with code-page conversion options for specific data sets.-o codepage_convertβ Enable code-page conversion for all data sets. Unless specified otherwise, the source code-page is EBCDIC CP1047 and the target code-page is UTF-8.
You can change the default for the source code-page with the -o codepage_from option and for the target code-page with the -o codepage_to option. To specify source and target code-pages for individual data sets use a data set config file.
-o codepage_from=<n>β Override EBCDIC CP1047 as the default code-page for the source. Must be combined with-o codepage_to=<n>. Overrides settings in a data set config file. Issueiconv -lfor a list of valid specifications for<n>.-o codepage_to=<n>β Override UTF-8 as the default code-page for the target. Must be combined with-o codepage_from=<n>. Overrides settings in a data set configu file. Issueiconv -lfor a list of valid specifications for<n>.
π¦ Applicable FUSE options (version 2.8): π¦
This is a selected subset of all FUSE options. Use the zdsfs --help option to print a full list. π
-dor-o debugβ Enable debug output (implies-f)-fβ Foreground operation-o allow_otherβ Allow access by other users-o allow_rootβ Allow access by root-o default_permissionsβ Enable permission checking by kernel-o max_read=<n>β Set maximum size of read requests-o kernel_cacheβ Cache files in kernel-o [no]auto_cacheβ Enable caching based on modification times-o umask=<m>β Set file permissions (octal)-o uid=<m>β Set file owner-o gid=<n>β Set file group-o max_readahead=<n>β Set maximum readahead-o async_readβ Perform reads asynchronously (default)-o sync_readβ Perform reads synchronously
π DATA SET CHARACTERISTICS π
Certain data set characteristics might be required for the correct interpretation of the data. The collected metadata of all data sets can be found in a file metadata.txt in the top directory of the mounted file system. ποΈ
This file contains one line per data set, with the syntax that is used by z/OS.
dsn=<data set name>,recfm=<fmt>,lrecl=<size>,dsorg=<org>
dsn: The data set name. For physical sequential data sets, this is the same as the file name in the mount directory. For partitioned data sets (PDS), this is the same as the directory name in the mount directory. For PDS members, the member name is placed after the PDS name, in parentheses.recfm: The record format.lrecl: The logical record length.dsorg: The data set organization. For partitioned data sets the organization isPO, but for partitioned data set members it isPS.
In addition to the metadata.txt file, you can use the following extended attributes to read the data set characteristics of a file or directory: π
user.recfm: The record format.user.lrecl: The logical record length.user.dsorg: The data set organization of a file.
π zdsfs config file π
okay so the default path is /etc/zdsfs.conf, and if you wanna put it somewhere else you use the -c <config_file> option β slay. This config file can contain these options:
restapi = 0/1β tells zdsfs whether the z/OSMF REST services should be used. If you enable it, you must specify a valid REST server, plus a.netrcfile with a valid z/OS user ID and password. no cap.restserver = URLβ sets the address of the z/OSMF REST server used for coordinating read-access. For failover scenarios, provide up to three different server addresses. These will be tried in the specified order when one of the servers cannot be reached during mount or operation. very main-character resilience of it.keepalive = timeout (in seconds)β optionally changes the keepalive timer for ENQs. By default the keepalive refreshes the access after540seconds (9minutes). The9minutes are chosen to prevent a timeout by z/OS after10minutes. protective queen behavior tbh.
π¦ data-set config file <dataset_file> π¦
This one provides code-page conversion settings for individual data sets. The default config file is /etc/zdsfs-dataset.conf. Use the -x <dataset_file> option to specify a different file. Each config-file entry must contain the following options:
DATASET.TITLEβ specifies the data-set title or a pattern of titles to which the entry applies. The title can have a trailing asterisk to match all titles that begin with the leading characters. cute little wildcard moment.conv = 0/1/<codepage_from>,<codepage_to>β controls code-page conversion:0disables code-page conversion.1performs conversion with the default conversion table.- An explicit specification of source and target code-page overrides the default conversion tables. The code-page specifications must be separated by a comma. Issue
iconv -lfor a list of valid code-page specifications.
rdw = 0 / 1β controls the record descriptor word:0omits the record descriptor word from the data stream.1keeps the record descriptor word from the data stream.
π¨ real talk: code-page conversion can render data unreadable if the record descriptor word is kept. protect your data, bestie.
πΈ EXAMPLES πΈ
Wanna mount the z/OS disk with the name dasde? enter:
# zdsfs /dev/dasde /mnt
To mount the z/OS disk with space for 4 tracks and keeping the record descriptor words in the byte stream, enter:
# zdsfs -o rdw -o tracks=4 /dev/dasde /mnt
To unmount the z/OS disk mounted on /mnt, enter:
# fusermount -u /mnt
To list all extended attributes of file FOOBAR.TEST.TXT assuming the z/OS disk was mounted on /mnt:
# getfattr -d /mnt/FOOBAR.TEST.TXT
To mount the z/OS disk using the z/OSMF REST services for coordinated read access:
# ./zdsfs -o restapi -o restserver=zos1.server.tld/zosmf /dev/dasde /mnt/
To mount the z/OS disk and enable code-page conversion for all data sets using a custom source and target code page:
# ./zdsfs -o codepage_from=CP037 -o codepage_to=ISO-8859-1 /dev/dasde /mnt/
β¨ SEE ALSO β¨
getfattr(1), fuse(8), z/OS DFSMS Using Data Sets, and Linux on System z: Device Drivers, Features and Commands. iykyk π
π thatβs the whole vibe β brought to you by s390-tools, dated 2013. stay iconic out there, bestie! πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: s390-tools-zdsfs 2.44.1-160000.1.1 Β· GPL-2.0-or-later AND NonFree
- Copyright 2013, 2017 s390-tools is free software; you can redistribute it and/or modify
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms