Red Hat Certification Exam Question:

Download Job Interview Questions and Answers PDF

Suppose neo user tried by:
dd if=/dev/zero of=/home/neo/somefile bs=1024 count=70
files created successfully. Again neo tried to create file having 70K using following
command:
dd if=/dev/zero of=/home/neo/somefile bs=1024 count=70
But he is unable to create the file. Make the user can create the file less then 70K.

Red Hat Certification Interview Question
Red Hat Certification Interview Question

Answer:

Very Tricky question from redhat. Actually question is giving scenario to you to
implement quota to neo user. You should apply the quota to neo user on /home that neo
user shouldn't occupied space more than 70K.
1. vi /etc/fstab
LABEL=/home /home ext3 defaults,usrquota 0 0
To enable the quota on filesystem you should mount the filesystem with usrquota for user
quota and grpquota for group quota.
2. touch /home/aquota.user ->Creating blank quota database file.
3. mount -o remount /home-> Remounting the /home with updated mount options.
You can verify that /home is mounted with usrquota options or not using mount
command.
4. quotacheck -u /home ->Initialization the quota on /home
5. edquota -u neo /home-> Quota Policy editor
See the snapshot
Disk quotas for user neo (uid 500):
Filesystem blocks soft hard inodes soft hard
/dev/mapper/vo-myvol 2 30 70 1 0 0
Can you set the hard limit 70 and soft limit as you think like 30.
Verify using the repquota /home command.

Download Red Hat Certification Interview Questions And Answers PDF

Previous QuestionNext Question
How to Successfully resolve to server1.example.com where your DNS server is 172.24.254.254Explain What is the prefdm file used for? A. To specify the preferred X display manager to use B. To setup preferences for GNOME C. To do performance analysis of system CPU usage D. To perform profiling of C code