nerdexam
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.

  1. Enable quota support on the /home filesystem in /etc/fstab. Add the usrquota and grpquota options: vi /etc/fstab Example entry (assuming /home is on a separate partition/LV): /dev/mapper/rootvg-homelv /home ext3 defaults,usrquota,grpquota 0 0 (Adjust /dev/mapper/rootvg-homelv to your actual device for /home and ext3 to your filesystem type if different).
  2. Remount the /home filesystem to apply the new options: mount -o remount /home You can verify by checking mount command output for usrquota.
  3. Create blank quota database files: touch /home/aquota.user touch /home/aquota.group
  4. Initialize the quotas for the /home partition: quotacheck -ug /home
  5. Edit user quotas for 'neo' using edquota: edquota -u neo This will open a text editor. Locate the line for the /home filesystem and set the soft and hard limits for disk blocks (in 1KB units). Change the line for /home to 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-myvol with the correct device for /home).
  6. Enable quotas on the filesystem: quotaon -ug /home (or quotaon -a to enable all configured quotas)
  7. Verify the applied quotas for user 'neo': quota -u neo repquota -a

Topics

#disk quotas#soft limit#hard limit#user resource limits

Community Discussion

No community discussion yet for this question.

Full RH302 Practice