Adding volumes to a compatibility mode aggregate

To add a candidate volume to a zFS aggregate, use the IDCAMS utility ALTER command with the ADDVOLUMES parameter. Figure 1 shows an example job that adds two volumes to the (SMS-managed) OMVS.ZFS.AGGR1 zFS aggregate.
Figure 1. Example job to add volumes to a zFS aggregate
//SUIMGVMA JOB (ACCTNO),'SYSPROG',CLASS=A,
//         MSGCLASS=H,MSGLEVEL=(1,1),NOTIFY=&SYSUID
//STEP01   EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
           ALTER OMVS.ZFS.AGGR1.DATA -
           ADDVOLUMES(* *)
/*

In this case, DFSMS is choosing the particular candidate volumes. If you want to specify the volumes, use their volume serials in place of the asterisks. See z/OS DFSMS Access Method Services Commands for more information about IDCAMS ALTER ADDVOLUMES. DFSMS states, if an ALTER ADDVOLUMES is done to a data set already opened and allocated, the data set must be closed, unallocated, reallocated, and reopened before VSAM can extend onto the newly added candidate volume.

For zFS, this means that if the zFS aggregate is already attached when the ALTER ADDVOLUMES is done, it must be detached and attached again before zFS can extend to the newly added candidate volume. Compatibility mode aggregates must be unmounted and mounted again (because that is when they are detached and attached). You can use the remount capability of z/OS® UNIX. For details, see the topic on Remounting a mounted file system in z/OS UNIX System Services Planning.