Managing disk quotas with fsdisk
Introduction
Managing disk quotas is an important aspect of system administration, especially in multi-user environments where resources need to be allocated efficiently. One tool that can be used for managing disk quotas in Linux systems is fsdisk. Fsdisk is a command-line utility that allows administrators to set and manage disk quotas for users and groups.
Setting up disk quotas
To set up disk quotas using fsdisk, first, you need to make sure that the filesystem where you want to enable quotas is mounted with the quota option. You can check this by looking at the output of the mount command. Once you have confirmed that the filesystem is mounted with the quota option, you can enable quotas by running the command quotacheck -cug /dev/sdX, where /dev/sdX is the device file of the filesystem you want to enable quotas on.
Managing user quotas
Once quotas are enabled on a filesystem, you can start managing user quotas using the fsdisk command. To set a quota for a specific user, you can use the edquota -u username command, where username is the username of the user you want to set a quota for. This will open a text editor where you can specify the soft and hard limits for the user’s disk usage.
Managing group quotas
In addition to managing user quotas, fsdisk also allows you to set quotas for groups. To set a quota for a group, you can use the edquota -g groupname command, where groupname is the name of the group you want to set a quota for. Similar to setting user quotas, this command will open a text editor where you can specify the soft and hard limits for the group’s disk usage.