CMSFS-FUSE(1)

NAME
cmsfs-fuse - File system for z/VM CMS disks

SYNOPSIS

  mounting:

cmsfs-fuse DEVICE MOUNTPOINT [OPTIONS]

  unmounting:

fusermount -u MOUNTPOINT

DESCRIPTION
Use the cmsfs-fuse command to provide read and write access to files stored on a z/VM CMS disk. The cmsfs-fuse file system translates the record-based EDF file system on the CMS disk to UNIX semantics. After mounting the CMS disk, you can use common Linux tools to access the files on the disk. You can enable automatic conversions of text files from EBCDIC to ASCII. Attention: You can inadvertently damage files and lose data when directly writing to files within the cmsfs-fuse file system. To avoid problems when writing, multiple restrictions must be observed, especially with regard to linefeeds (see section RESTRICTIONS). If you are unsure about how to safely write to a file on the cmsfs-fuse file system, copy the file to a location outside the cmsfs-fuse file system, edit the file, and then copy it back to its original location.

OPTIONS

  general options:

-o opt,[opt...]
    Fuse or mount command options. For fuse options see below, for mount options see mount(8).

-h or --help
    Print usage information, then exit.

-v or --version
    Print version information, then exit.

  cmsfs-fuse options:

-a or --ascii
    Interpret all files on the CMS disk as text files and convert them from EBCDIC to ASCII.

--from
    The codepage of the files on the CMS disk. If this option is not specified the default codepage CP1047 is used. For a list of all available codepages see iconv --list.

--to
    The codepage to which CMS files should be converted to. If this option is not specified the default codepage ISO-8859-1 is used. For a list of all available codepages see iconv --list.

-t or --filetype
    Interpret files on the CMS disk as text files based on the file type and convert them from EBCDIC to ASCII. The file types that are treated as text files are taken from a configuration file (see section CONFIGURATION FILES).

  Applicable FUSE options (version 2.8):

-d or -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=N
    Set file owner

-o gid=N
    Set file group

-o max_write=N
    Set maximum size of write requests

-o max_readahead=N
    Set maximum readahead

-o async_read
    Perform reads asynchronously (default)

-o sync_read
    Perform reads synchronously

-o big_writes
    Enable write operations with more than 4 KB

EXTENDED ATTRIBUTES
Use the following extended attributes to handle the CMS characteristics of a file: user.record_format: The format of a file. Allowed values are F for fixed record length files and V for variable record length files. This attribute can be set only if the file is empty. user.record_lrecl: The record length of a file. This attribute can be set only for a fixed record length file and if the file is empty. A valid record length is an integer in the range 1-65535. user.file_mode: The file mode of a file which is interpreted by CMS. The file mode consists of a mode letter from A-Z and mode number from 0-6. New files are created by default as variable files with file mode A1.

RESTRICTIONS
rename and creat: Uppercase file names are enforced. truncate: Only shrinking of a file is supported. For fixed length record files, the new file size must be a multiple of the record length. unlink: Creating a file with the name of a previously unlinked file which is still in use is not supported and will fail with -ENOENT. write: Writes are supported only at the end of the file. A write on a fixed length record file always writes a multiple of the record length. If additional bytes are added, the bytes are filled with zero in binary mode or with spaces in ASCII mode. Sparse files are not supported. If the cp tool is used to write files to a CMS disk the option "--sparse=never" must be specified. If ASCII translation is enabled for a file a linefeed character determines the end of a record. The following restrictions must be observed for writing files in ASCII mode: For fixed record length files a linefeed must occur exactly after a record of the length specified in the fixed record length. For variable record length files a linefeed must occur after the maximum record length is reached or earlier. If a record of a variable record length file consists only of a linefeed character cmsfs-fuse adds a space to this record since empty records are not supported by the CMS file system.

CONFIGURATION FILES
cmsfs-fuse uses a configuration file for automatic translation based on the file type. Upon startup, cmsfs-fuse evaluates the file .cmsfs-fuse/filetypes.conf in the user's home directory. If the file does not exist cmsfs-fuse evaluates the file /etc/cmsfs-fuse/filetypes.conf. The filetypes.conf file contains the CMS file types that are automatically translated to ASCII if cmsfs-fuse is started with the -t option. The syntax of the configuration file is one file type per line. Lines that start with a # followed by a space are treated as comments and are ignored. The file type is 8 characters long and must consist of valid CMS file name characters only. The default file types in the configuration file were taken from the z/VM TCPIP.DATA file (z/VM version 5.4.0).

EXAMPLES
To mount the CMS disk with the name dasde enter:
  # cmsfs-fuse /dev/dasde /mnt

To mount the CMS disk with the name dasde and enable automatic translation of known text files enter:
  # cmsfs-fuse -t /dev/dasde /mnt To mount the CMS disk with the name dasde and enable automatic translation of all files to UTF-8 enter:
  # cmsfs-fuse --to=UTF-8 -a /dev/dasde /mnt To unmount the CMS disk mounted on /mnt enter:
  # fusermount -u /mnt To show the record format of file PROFILE.EXEC assuming the CMS disk was mounted on /mnt:
  # getfattr -n user.record_format /mnt/PROFILE.EXEC The following example assumes that an empty, fixed record format file, PROFILE.EXEC, can be accessed on a CMS disk that has been mounted on /mnt. To set the record length of PROFILE.EXEC to 80 bytes:
  # setfattr -n user.record_lrecl -v 80 /mnt/PROFILE.EXEC

SEE ALSO
attr (5), getfattr (1), setfattr(1), iconv(1) and Linux on System z: Device Drivers, Features and Commands