CMSFS-FUSE(1)

πŸ“¦ version 2.44.1, in opensuse-leap 16.0

πŸ’… CMSFS-FUSE β€” the manual page, but make it friendly

okay bestie, so this is cmsfs-fuse, and it lives in the General Commands Manual (section 1, iykyk). Buckle up, because this thing is a whole vibe: it's a file system for z/VM CMS disks. Yes, those disks. Let's go πŸ¦‹


✨ NAME ✨

cmsfs-fuse β€” file system for z/VM CMS disks, no cap πŸ’–


🌸 SYNOPSIS 🌸

mounting:

cmsfs-fuse DEVICE MOUNTPOINT [OPTIONS]

unmounting:

fusermount -u MOUNTPOINT

πŸŽ€ DESCRIPTION πŸŽ€

okay so here's the tea β˜•: cmsfs-fuse gives you read and write access to files stored on a z/VM CMS disk. It's literally the main character here.

The cmsfs-fuse file system translates the record-based EDF file system on the CMS disk into UNIX semantics β€” like, it speaks both languages so you don't have to 🫢. Once the CMS disk is mounted, you can just use your common Linux tools to access the files on it. Oh, and you can enable automatic conversions of text files from EBCDIC to ASCII if that's your thing. Slay.

⚠️ Attention bestie ⚠️ You can inadvertently damage files and lose data when directly writing to files within the cmsfs-fuse file system. Not joking around here, this is real. To avoid problems when writing, multiple restrictions must be observed, especially with regard to linefeeds (go read the RESTRICTIONS section, fr fr).

If you're 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. That's the safe-girl method and honestly it's iconic πŸ’…


✨ OPTIONS ✨

🌈 general options 🌈

  • -o opt,[opt...] β€” Fuse or mount command options. For fuse options, look below πŸ‘‡; for mount options, see mount(8).
  • -h or --help β€” Print usage information, then exit. Your classic cry-for-help button πŸ₯Ί
  • -v or --version β€” Print version information, then exit. Show me what you're made of πŸ’–

πŸ¦‹ cmsfs-fuse options πŸ¦‹

  • -a or --ascii β€” Interpret all files on the CMS disk as text files and convert them from EBCDIC to ASCII. Every single one. Periodt.
  • --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 the CONFIGURATION FILES section, keep scrolling 🧚).

⭐ 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). It's giving default behavior πŸ”₯
  • -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, bestie:

  • 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. That's the out-of-the-box fit, and it ate πŸŽ€


πŸ’€ RESTRICTIONS πŸ’€

Listen, this part is important. Read it. Actually read it. πŸ™ˆ

  • 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.
lowkey a lot of rules, but that's the price of not losing your data πŸ’›

🧚 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. Prioritize your personal one, always ✨

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). iykyk πŸ‘‘


🌟 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

Obsessed with how clean that is πŸ’…


🫢 SEE ALSO 🫢

attr (5), getfattr (1), setfattr(1), iconv(1) and Linux on System z: Device Drivers, Features and Commands. Go read them, they're the supporting cast and they understood the assignment 🌈


and that's the whole page, bestie β€” with all the facts intact, as promised πŸŽ€

🌸 this cutie came from s390-tools, dated February 2010 β€” thanks for reading, love u, bye πŸ‘‘πŸ¦‹

πŸ“¦ where this page comes from