Setting this example for quota limits on ext4 filesystem.
Code:
[root@Centos7 mnt1]# pwd
/mnt/mnt1
#Edit /etc/fstab
[root@Centos7 mnt1]# cat /etc/fstab
... ...
/dev/vdb7 /mnt/mnt1 ext4 defaults,usrquota,grpquota 0 2
... ...
#mount
[root@Centos7 mnt1]# mount /mnt/mnt1
#Create quota database
[root@Centos7 mnt1]# quotacheck --create-files --user --group /dev/vdb7
#edquota --user root
Disk quotas for user root (uid 0):
Filesystem blocks soft hard inodes soft hard
/dev/vdb7 17 15 16 6 3 4
#edquota --group root
Disk quotas for group root (gid 0):
Filesystem blocks soft hard inodes soft hard
/dev/vdb7 13 14 15 2 3 5
[root@Centos7 mnt1]# quotaon /mnt/mnt1
#Added a few files.... using touch to purposely exceed hard
#and soft limits for inodes, and number of files.
[root@Centos7 mnt1]# df --inodes .
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/vdb7 25688 17 25671 1% /mnt/mnt1
#Add more files... not shown
[root@Centos7 mnt1]# ls -a
. .. aquota.group aquota.user file1 file2 file3 file4 lost+found
[root@Centos7 mnt1]# quotacheck --user --verbose .
quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown.
quotacheck: Scanning /dev/vdb7 [/mnt/mnt1] done
quotacheck: Checked 2 directories and 6 files
[root@Centos7 mnt1]# touch file5
[root@Centos7 mnt1]# ls -a
. .. aquota.group aquota.user file1 file2 file3 file4 file5 lost+found
[root@Centos7 mnt1]# quotacheck --user --verbose .
quotacheck: Your kernel probably supports journaled quota
but you are not using it. Consider switching to journaled
quota to avoid running quotacheck after an unclean shutdown.
quotacheck: Scanning /dev/vdb7 [/mnt/mnt1] done
quotacheck: Checked 2 directories and 7 files
[root@Centos7 mnt1]# df -i .
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/vdb7 25688 18 25670 1% /mnt/mnt1
Then redo this also:
Quote:
[root@Centos7 mnt1]# quotaon /mnt/mnt1
[root@Centos7 mnt1]# ls
aquota.group aquota.user file1 file2 file3 file4 file5 lost+found
[root@Centos7 mnt1]# touch file6
[root@Centos7 mnt1]# ls
aquota.group aquota.user file1 file2 file3 file4 file5 file6 lost+found
[root@Centos7 mnt1]# df -i .
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/vdb7 25688 19 25669 1% /mnt/mnt1
|
Why am I still allowed to add files when I have
exceeded the user and group quota limits for inodes?