Заказывайте больше ссылкок по 50р на 1к сайтов в телеграме: @stalmokas

Managing disk quotas with fsdisk

What is fsdisk?

Fsdisk is a command-line tool used to manage disk quotas on Linux systems. Disk quotas allow system administrators to limit the amount of disk space a user or group can consume on a filesystem. This is useful in multi-user environments to prevent users from monopolizing disk space or to ensure that there is always enough space available for all users.

How to set up disk quotas with fsdisk?

To set up disk quotas with fsdisk, you first need to enable quotas on the filesystem where you want to enforce quotas. This is typically done by adding the ‘usrquota’ and ‘grpquota’ options to the filesystem entry in the /etc/fstab file. Once quotas are enabled, you can use the fsdisk command to set quotas for individual users or groups.

Managing user quotas with fsdisk

To manage user quotas with fsdisk, you can use the ‘-u’ option followed by the username to set or modify a user’s quota. For example, to set a soft limit of 1GB and a hard limit of 2GB for the user ‘john’, you would use the following command: ‘fsdisk -u john -s 1G -h 2G /path/to/filesystem’. You can also use the ‘-p’ option to display the current quotas for all users on the filesystem.

Managing group quotas with fsdisk

Similarly, you can manage group quotas with fsdisk using the ‘-g’ option followed by the group name. For example, to set a soft limit of 5GB and a hard limit of 10GB for the group ‘developers’, you would use the command ‘fsdisk -g developers -s 5G -h 10G /path/to/filesystem’. You can also use the ‘-q’ option to display the current quotas for all groups on the filesystem.

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *

Сайт создан и монетизируется при помощи GPT сервиса Ggl2.ru
Close