I need a way to get and set the quota for an AFS volume from within
a program - said program not knowing anything about mountpoints.

By looking at CMU's afs_balance I was able to figure out the quota
getting in short order, but setting the quota is proving more
difficult.  I've tried a number of variations on the theme:

        storeStat.Mask = AFS_SETMAXQUOTA;
        storeStat.MaxQuota = quota_amount;
        storeStat.MinQuota = 0;
        addr = inet_addr("129.186.6.161");        /* fileserver in question */
        conn = UV_Bind(addr, AFSCONF_VOLUMEPORT);
        code = RXAFS_SetVolumeStatus(conn, vols.volEntries_val[j].volid,
            &storeStat, vols.volEntries_val[j].name, "", "");
        if (conn) rx_DestroyConnection(conn);
        if (code) {
                fprintf(stderr, "RXAFS_SetVolumeStatus, code = %d\n", code);
        }

with no luck.  Any help or pointers would be greatly appreciated.

John
PS, we have a source license if that matters

Reply via email to