Solaris UNIX Configure Disk Quota For UFS File System

www.laut‮oc.irut‬m
Solaris UNIX Configure Disk Quota For UFS File System

To configure disk quotas for a UFS (Unix File System) on Solaris or OpenSolaris, you will need to use the quotacheck, quotaon, and edquota commands.

  1. Enable quotas: To enable quotas on a UFS file system, you will need to run the quotacheck and quotaon commands. For example:
quotacheck -a
quotaon /path/to/ufs

The quotacheck command scans the file system and creates or updates the quota files, and the quotaon command enables quotas on the file system. Replace /path/to/ufs with the path to the UFS file system.

  1. Set quotas: To set quotas for a user or group, use the edquota command. For example:
edquota -u username
edquota -g groupname

Replace username with the name of the user, and groupname with the name of the group. This will open the quota configuration file for the specified user or group in an editor. You can then set the desired quotas for the user or group. For example:

disk quotas for username (uid 501):
filesystem  blocks       soft       hard       inodes     soft       hard
/path/to/ufs  200000      200000     300000     20000      20000     30000

In this example, the user is allowed to use up to 200,000 blocks of disk space, with a hard limit of 300,000 blocks. The user is also allowed to create up to 20,000 files, with a hard limit of 30,000 files.

  1. Check quotas: To check the quotas for a user or group, use the repquota command. For example:
repquota /path/to/ufs

This will show you a summary of the quotas for all users and groups on the file system.

Note: These commands require root privileges to execute.

Created Time:2017-10-30 14:27:19  Author:lautturi