In order of operation:
STARTS with QUOTA:
quotacheck -amvug
quotaon -av
ENDS WITH QUOTA:
repquota -av
edquota -u|-g|-t <>
STARTS with QUOTA:
quotacheck -amvug
quotaon -av
ENDS WITH QUOTA:
repquota -av
edquota -u|-g|-t <>
etc/fstab
- usrquota,grpquota
- (or usrjquota=aquota.user,grpjquota=aquota.grp,jqfmt=vfsv0)
quotacheck –amvug
Created files after running quota check -amvug
- aquota.user
- aquota.groups
Turn quotas on
- quotaon –av
Report on quotas
- repquota –av
Create disk quota for user
- edquota –u student.
Complete the following:
1. Verify that you are logged in to your system.
2. If necessary, switch to your root user account with the su – command and a password of student.
3. Configure your mounted file systems to use quotas by doing the following:
a. Open your /etc/fstab file in a text editor.
b. Add the usrquota and grpquota parameters to the mount options for the / file system.
c. Save your changes to the file and exit the editor.
d. Restart your system so that the changes can take effect.
4. After the system has rebooted, create your quota files by doing the following:
a. Open a terminal session and switch to your root user account using the su –
command.
command.
b. At the shell prompt, enter quotacheck –amvug.
5. When quotacheck is complete, two files named aquota.user and aquota.groups should have been created in /.
6. Enable quotas on your file system by entering quotaon –av at the shell prompt.
7. View the current disk space used by your users by entering repquota –av at the shell prompt. A report is displayed on the screen showing how much space each user is consuming. Notice that no limits have been configured for any users.
8. Create disk quotas for your users by doing the following:
a. At the shell prompt, enter edquota –u student.
b. Use the vi editor to set the following:
• Block hard quota: 15000 • Block soft quota: 10000 • Inode hard quota: 1000 • Inode soft quota: 800
• Block hard quota: 15000 • Block soft quota: 10000 • Inode hard quota: 1000 • Inode soft quota: 800
c. Save your changes and exit the editor.
d. Repeat this process for the rest of your users.
9. Check your new quotas by entering repquota –av at the shell prompt. You should now see quotas established for your users.
10. Enter exit to leave the root user account.
11. Verify that you are logged in as a user account that quotas have been set for.
12. Create a big file by entering time dd if=/dev/zero of=bigfile.bin bs=1024 count=10000 at the shell prompt. You should see an error indicating the quota has been exceeded.
No comments:
Post a Comment