Red_Hat
RH302 · Question #159
The user 'neo' is unable to create a file larger than 70KB in their home directory (/home/neo). Files up to 70KB were initially created successfully, but subsequent attempts to create another 70KB…
This scenario indicates a disk quota problem. The solution involves setting up and enforcing user quotas for the /home filesystem. 1. Enable quota support on the /home filesystem in /etc/fstab. Add the usrquota and grpquota options: vi /etc/fstab Example entry (assuming /home…
Storage management
Question
The user 'neo' is unable to create a file larger than 70KB in their home directory (
/home/neo). Files up to 70KB were initially created successfully, but subsequent attempts to create another 70KB file failed. Configure the system to allow the user 'neo' to create files up to a hard limit of 70KB, with a soft limit of 30KB.Explanation
This scenario indicates a disk quota problem. The solution involves setting up and enforcing user quotas for the /home filesystem.
- Enable quota support on the
/homefilesystem in/etc/fstab. Add theusrquotaandgrpquotaoptions:vi /etc/fstabExample entry (assuming/homeis on a separate partition/LV):/dev/mapper/rootvg-homelv /home ext3 defaults,usrquota,grpquota 0 0(Adjust/dev/mapper/rootvg-homelvto your actual device for/homeandext3to your filesystem type if different). - Remount the
/homefilesystem to apply the new options:mount -o remount /homeYou can verify by checkingmountcommand output forusrquota. - Create blank quota database files:
touch /home/aquota.usertouch /home/aquota.group - Initialize the quotas for the
/homepartition:quotacheck -ug /home - Edit user quotas for 'neo' using
edquota:edquota -u neoThis will open a text editor. Locate the line for the/homefilesystem and set the soft and hard limits for disk blocks (in 1KB units). Change the line for/hometo reflect a soft limit of 30 blocks (30KB) and a hard limit of 70 blocks (70KB). For example:Disk quotas for user neo (uid 500):Filesystem blocks soft hard inodes soft hard/dev/mapper/vo-myvol 2 30 70 1 0 0(Ensure to replace/dev/mapper/vo-myvolwith the correct device for/home). - Enable quotas on the filesystem:
quotaon -ug /home(orquotaon -ato enable all configured quotas) - Verify the applied quotas for user 'neo':
quota -u neorepquota -a
Topics
#disk quotas#soft limit#hard limit#user resource limits
Community Discussion
No community discussion yet for this question.