The Shared File System (SFS) in z/VM has been around for a while, but it is now the default installation option to hold the service data for z/VM 6.4. IBM made SFS the default because it’s easier to work with and easier to manage the space compared with minidisks, IBM IT specialist Bruce Hayden explained in a recent SHARE presentation.
SFS was originally introduced because minidisks have limitations, such as fixed space allocation. SFS also added some new file system features, like file level access control and dynamic space management, while remaining compatible to the traditional CMS file system.
So, how do you use z/VM’s Shared File System (SFS)? Hayden presented a number of helpful tips for users who have very little experience with SFS. Here are some of the basics.
What makes up an SFS filepool?
For starters, a filepool comprises storage groups, as well as a catalog, a control disk, and log disks. The control disk keeps track of the usage of the data blocks in the filepool, and it must be large enough to map all of the blocks. The log disks record changes, like database log disks. There are two log disks, written in parallel, and best practice is to put the log disks on separate physical volumes.
The catalog, which is also storage group 1, holds all the metadata, such as file names, permissions, and structure. Storage groups 2 and higher hold the data, and users are assigned to a specific storage group.
How do I use an SFS filepool?
To use an SFS filepool, you must be enrolled. Enroll is a command that gives a user their own space to work with. The administrator can enroll everyone automatically, so you may not need a specific enrollment. By default, you’ll be enrolled with a quota of zero blocks. That means you’ll be able to read from and write to files (if you have the appropriate permissions), but you won’t be able to create any new files of your own.
What are the permissions?
For both files and directories, the permissions are read and write. If you have read permission, you can read the data in the files, or the names of the files in the directory. If you have write permission on a file, you can also update or replace the contents of the file (write implies read). If you can write a directory, you can create or erase files in that directory. It’s important to note that if you create a file, you don’t own the file unless you are also the file space owner.
What is an alias?
An alias is similar to a Linux/Unix symlink — it’s a symbolic reference to a base file. The permissions on the base file determine your access to the actual data. You cannot create an alias to a file unless you have read permission to that file, and you must have write permission in the directory where you create the alias, because you’re creating a file.
Aliases are very helpful if you want to have two names for the same file in the same directory, or if you want to use files owned by others, especially if they’re in directories you don’t have read access to. But, you cannot create a directory alias, which is an alias that points to a directory name.
What are the basic commands to work with SFS?
Many commands that are already familiar to users have been extended to work with SFS. Those include:
- ERASE to erase aliases and directories
- RENAME to rename aliases and directories
- QUERY to find out a lot of things
- LISTFILE has new options for more information about files
- The SEARCH option is very handy if you’re looking for something in SFS, Hayden notes.
- FILELIST also has a search option
There are also a number of helpful new commands to learn, like:
- CREATE to create files (empty files), directories and aliases
- GRANT to give permissions to files and directories
- REVOKE to remove permissions
- RELOCATE to move files between directories. No data is moved.
- LISTDIR for a list of directories
- DIRLIST for a full screen interface
What does all this mean to me?
You won’t necessarily be making any big changes to the IBM-installed SFS servers, Hayden explained, but there are a few things you should consider. Adding a control data backup disk, for example, can help speed up the recovery of some DASD errors. Think about how you will back up the filepools. Hayden recommends having a backup product that runs on VM that understands SFS filepools, but there are other options if that’s not feasible. You can also learn how to add more space to a filepool and how to change the quota of file spaces.
“More people are now caring about SFS because it’s the default for service data in version 6.4,” Hayden explained. “SFS has a lot of good features to offer, and these tips will help you get started.”
Watch Bruce Hayden’s full presentation “What is z/VM’s Shared File System and How Do I Work With It?” to learn more about SFS and get more tips on how to navigate it.