PRIMECLUSTER Global File Services Configuration and Administration Guide 4.2 (Solaris(TM) Operating Environment) |
Contents Index |
Part 3 Global File Services Shared File System | > Chapter 15 File System Design | > 15.2 System Design |
To use the quota function, the GFS Shared File System uses management data called the external quotas file and internal quotas file. During creation of the file system with sfcnewfs(1M), the required minimum area for the management data is allocated.
1. Structure of the quotas file
The quota information uses a 64-byte area for each user. The quota information of the user in the file is stored in the offset obtained by multiplying an UID value by 64 bytes.
If possible, the UIDs of users should be consecutive values. If the values are not consecutive, the quota information will contain unused areas. In addition, the quota data may not be a cache hit if accessed and would require real input-output that may reduce system performance.
2. quotas file data storage area
The area of the internal quotas file is allocated from the V-data area. The area of the external quotas file is allocated from the data area.
The unit of acquisition from the V data area is 1 kilobytes; that from the file data area is 8 kilobytes.
Thus, if UID is limited to continuous users from X to Y, the V data area quantity used for internal quotas can be estimated as follows:
Use of disk space = ( INT(Y/16) - INT(X/16) +1 ) * 1KB + 1KB (case of X > 16)
Use the following formula to estimate the file data area quantity needed in an external quotas file:
Use of disk space = ( INT(Y/128) - INT(X/128) +1 ) * 8KB + 8KB (case of X > 128)
The following shows an example in which UID takes continuous values from 1000 to 2999.
<Internal quotas file> Amount of user information in the 1 kilobytes blocks is 1024 / 64 = 16. If the value changes from 1000 to 2999 continuously: 1000 / 16 = 62.5 2999 / 16 = 187.4375 As shown above, 126 blocks from block 62 to block 187are used. Thus,126 * 1KB + 1KB(for the root) = 127KB an area of 127 kilobytes is needed.
<external quotas file> Amount of user information in the 8 kilobytes blocks is 8192 / 64 = 128. If the value changes from 1000 to 2999 continuously: 1000 / 128 = 7.8125 2999 / 128 = 23.4... As shown above, 17 blocks from block 7 to block 23 are used. Thus, 17 * 8KB + 8KB(for the root) = 144KB an area of 144 kilobytes is needed.
If the quota function is used in an existing the GFS Shared File System, check for sufficient free area in the V-data area. If the quota function has been enabled, the number of usage files and number of user blocks is managed using the internal quotas file, even for users for which limit values have not been specified.
For details on the quota function, see Section 23.4 "quota function."
Contents Index |