If someone logs on to z/OS and uses Unix Services they need a home directory. By default it may be /u. This is not a good idea because they could fill up the disk space and prevent other people from doing any work in /u. Automount can create a ZFS for a directory if the directory such as /u/colin does not exist.
Lionel Dyck has a good write up on automount.
The blessing
With automount you can configure a file which says when I logon with a home directory of /u/colin, and this does not exist then allocate a dataset and mount it. For example it allocated a ZFS called OMVS.USER.COLIN.ZFS. You can control the name and size of the ZFS.
The curse
I wanted to mount an existing ZFS on /u/zopen. I created /u/zopen, then mounted the file system on it – but it said /u/zopen as in use!
I had a BPXPRMUS member in parmlib which mounted my file systems.
MOUNT TYPE(ZFS)
MODE(RDWR)
NOAUTOMOVE
MOUNTPOINT('/u/tmp')
FILESYSTEM('COLIN.ZFS2')
MOUNT FILESYSTEM('COLIN.ZFS.ZOWE.PROD') TYPE(ZFS)
MOUNTPOINT('/u/tmp/zowep') MODE(RDWR)
PARM('AGGRGROW') AUTOMOVE
MOUNT FILESYSTEM('COLIN.ZOPEN.ZFS') TYPE(ZFS)
MOUNTPOINT('/u/zopen') MODE(RDWR)
PARM('AGGRGROW') AUTOMOVE
When I activated this member with
T OMVS=(US)
I got
BPXO032I THE SET OMVS COMMAND WAS SUCCESSFUL.
BPXF236I FILE SYSTEM COLIN.ZFS2 WAS NOT MOUNTED.
THE MOUNT POINT SPECIFIED IN BPXPRMUS ALREADY HAS
FILE SYSTEM OMVS.USER.TMP.ZFS MOUNTED ON IT.
BPXF236I FILE SYSTEM COLIN.ZOPEN.ZFS WAS NOT MOUNTED.
THE MOUNT POINT SPECIFIED IN BPXPRMUS ALREADY HAS
FILE SYSTEM OMVS.USER.ZOPEN.ZFS MOUNTED ON IT.
I could not mount under /u – because it created the file systems.
The ZOWE file system did mount, because it was mounted under /u/tmp which was not covered by automount.
What controls it?
There is a file /etc/auto.master which controls what directories are automounted.
Mine ( a very simple one) has
/u /etc/auto.map
Which says for the /u directory enable automount and see the file /etc/auto.map. This file has
name *
type ZFS
filesystem OMVS.USER.<uc_name>.ZFS
mode rdwr
delay 0
duration 5
parm FSFULL(50,5)
allocany space(20,50) cyl vol(XXXVS1) pathperm(755) euid
Where
- name * is a generic (or specific) file
- delay 0 The minimum amount of time in minutes to leave the file system mounted after the duration expires and the file system is no longer in use. The default is 10 minutes.
- duration 5 the minimum amount of time in minutes to leave the file system mounted. The default is nolimit.
- <uc_name> is used to represent the name in uppercase characters. This creates COLIN from “colin”
- <asis_name>used to represent the name exactly, as is.
Turning it off
Lionel’s document explains how to enable it.
I tried changed the file /etc/auto.master to have a different directory to /u, which mostly worked. Some tasks depending on the auto-mount behaviour, and didn’t work.
I compromised. I used automount, but instead of using the /u/zopen directory, I used /u/tmp/zopen etc and the mounts worked.