Grow Aggregate
Purpose
Extends the physical size of an attached aggregate. It supports both version 1.4 aggregates and version 1.5 aggregates.
Format
syscall_parmlist
opcode int 129 AGOP_GROW_PARMDATA
parms[0] int offset to AGGR_ID
parms[1] int new size of aggregate
parms[2] int 0
parms[3] int 0
parms[4] int 0
parms[5] int 0
parms[6] int 0
AGGR_ID
aid_eye char[4] "AGID"
aid_len char sizeof(AGGR_ID)
aid_ver char 1 (new size is 32 bits)
aid_name char[45] Name of aggregate
aid_reserved char[33] 0 ( Reserved for future use)
- OR -
syscall_parmlist
opcode int 129 AGOP_GROW_PARMDATA
parms[0] int offset to AGGR_ID
parms[1] int high 32 bits of new 64 bit size of aggregate
parms[2] int low 32 bits of new 64 bit size of aggregate
parms[3] int 0
parms[4] int 0
parms[5] int 0
parms[6] int 0
AGGR_ID
aid_eye char[4] "AGID"
aid_len char sizeof(AGGR_ID)
aid_ver char 3 (new size is 64 bits)
aid_name char[45] Name of aggregate
aid_reserved char[33] 0 (Reserved for future use)
Return_value 0 if request is successful, -1 if it is not successful
Return_code
8 DFSMS did not extend the aggregate
EBUSY Aggregate is busy or otherwise unavailable
EINTR ZFS is shutting down
EINVAL Invalid parameters
EMVSERR Internal error using an osi service
ENOENT No aggregate by this name is found
EPERM Permission denied to perform request
Reason_code
0xEFnnxxxx See z/OS Distributed File Service Messages and Codes
Usage notes
- The aggregate must be mounted or attached.
- The size specified is the new total size (in 1 KB blocks) that is being requested. The size can be rounded up by DFSMS. If a zero is specified for the new size, the aggregate is grown by a secondary allocation. DFSMS determines whether to extend to another volume. Requests that write to files and need aggregate blocks that are not available yet and other requests that access those files will wait. Other requests will not wait during the grow.
- For an AGGR_ID version 1, the new size cannot be larger than approximately 4 TB. For an AGGR_ID version 3, the new size is a 64 bit number, and cannot be larger than approximately 16 TB.
- Reserved fields and undefined flags must be set to binary zeros.
Privilege required
The issuer must have ALTER authority on the VSAM linear data set to be formatted and must be logged in as root or have READ authority to the SUPERUSER.FILESYS.PFSCTL resource in the z/OS® UNIXPRIV class.
Related services
List Aggregate Status Version 2
Restrictions
The aggregate to be grown cannot already be quiesced or be attached as read-only. An aggregate cannot be made smaller.
Examples
#pragma linkage(BPX1PCT, OS)
#pragma LANGLVL(EXTENDED)
extern void BPX1PCT(char *, int, int, char *, int *, int *, int *);
#include <stdio.h>
#define ZFSCALL_AGGR 0x40000005
#define AGOP_GROW_PARMDATA 129
typedef struct syscall_parmlist_t {
int opcode; /* Operation code to perform */
int parms[7]; /* Specific to type of operation, */
/* provides access to the parms */
/* parms[4]-parms[6] are currently unused*/
} syscall_parmlist;
#define ZFS_MAX_AGGRNAME 44
typedef struct aggr_id_t {
char aid_eye[4]; /* Eye catcher */
#define AID_EYE "AGID"
char aid_len; /* Length of this structure */
char aid_ver; /* Version */
#define AID_VER_INITIAL 1 /* Initial version */
char aid_name[ZFS_MAX_AGGRNAME+1]; /* Name, null terminated */
char aid_reserved[33]; /* Reserved for the future */
} AGGR_ID;
struct parmstruct {
syscall_parmlist myparms;
AGGR_ID aggr_id;
};
int main(int argc, char **argv)
{
int bpxrv;
int bpxrc;
int bpxrs;
char aggrname[45] = "PLEX.DCEIMGQX.FS";
struct parmstruct myparmstruct;
/* Ensure reserved fields are 0 */
memset(&myparmstruct.aggr_id, 0, sizeof(AGGR_ID));
myparmstruct.myparms.opcode = AGOP_GROW_PARMDATA;
myparmstruct.myparms.parms[0] = sizeof(syscall_parmlist);
myparmstruct.myparms.parms[1] = 70000; /*New size of aggregate in K-bytes*/
myparmstruct.myparms.parms[2] = 0;
myparmstruct.myparms.parms[3] = 0;
myparmstruct.myparms.parms[4] = 0;
myparmstruct.myparms.parms[5] = 0;
myparmstruct.myparms.parms[6] = 0;
memcpy(&myparmstruct.aggr_id.aid_eye, AID_EYE, 4);
myparmstruct.aggr_id.aid_len = sizeof(AGGR_ID);
myparmstruct.aggr_id.aid_ver = AID_VER_INITIAL;
strcpy(myparmstruct.aggr_id.aid_name, aggrname);
BPX1PCT("ZFS ",
ZFSCALL_AGGR, /* Aggregate operation */
sizeof(myparmstruct), /* Length of Argument */
(char *)&myparmstruct, /* Pointer to Argument */
&bpxrv, /* Pointer to Return_value */
&bpxrc, /* Pointer to Return_code */
&bpxrs); /* Pointer to Reason_code */
if (bpxrv < 0)
{
printf("Error growing aggregate %s\n", aggrname);
printf("BPXRV = %d BPXRC = %d BPXRS = %x\n", bpxrv, bpxrc, bpxrs);
return bpxrc;
}
else
{ /* Return from grow was successful */
printf("Aggregate %s grown succssfully\n", aggrname);
}
return 0;
}