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: Quota for users is enabled on mountpoint / so quotacheck might damage the file. Please turn quotas off or use -f to force checking.
CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_PRINT_QUOTA_WARNING=y CONFIG_QUOTA=y CONFIG_QUOTACTL=y CONFIG_QUOTA_NETLINK_INTERFACE=y CONFIG_XFS_QUOTA=y
mount /dev/sdd1 /home -o remount,rw,relatime,errors=remount-ro,usrjquota=aquota.user,jqfmt=vfsv0 mount /dev/sdc1 /usb1 -o remount,rw,relatime,errors=remount-ro,usrjquota=aquota.user,jqfmt=vfsv0 mount /dev/sdd1 /usb1_backup -o remount,rw,relatime,errors=remount-ro,usrjquota=aquota.user,jqfmt=vfsv0
Filesystem volume name: home Inode count: 4481024 Block count: 17920499 Free blocks: 16009141 Free inodes: 4397275 Block size: 4096Notes
We have 1 inode for every 4 blocks so with quotas we will give the user blocks/4 inodes So for a 1G quota we have 1G/4096 blocks = 244140.625 and inodes would be 61035
userid
1000000 1500000 61035 75000 -a /home
#!/bin/bash # # 3 Dec 2012 Mike Gore if (($# < 3)) then echo Usage: $0 user size_in_K file_system_mount_point exit 1 fi user=$1 mysize=$2 fs=$3 mygrace=$(($mysize * 3 /2 )) echo Grace: $mygrace myinodes=$(($mysize / 4 / 4)) myinodes_grace=$(($myinodes * 3 / 2)) echo setquota -u $user $mysize $mygrace $myinodes $myinodes_grace -a $fs setquota -u $user $mysize $mygrace $myinodes $myinodes_grace -a $fs
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/sda1 [/] done quotacheck: Checked 25324 directories and 240273 files quotacheck: Scanning /dev/sdb1 [/home] done quotacheck: Old group file not found. Usage will not be substracted. quotacheck: Checked 3998 directories and 79760 files quotacheck: Scanning /dev/sdc1 [/usb1] done quotacheck: Cannot stat old user quota file: No such file or directory quotacheck: Old group file not found. Usage will not be substracted. quotacheck: Checked 29309 directories and 320418 files quotacheck: Old file not found. quotacheck: Scanning /dev/sdd1 [/usb1_backup] done quotacheck: Cannot stat old user quota file: No such file or directory quotacheck: Old group file not found. Usage will not be substracted. quotacheck: Checked 29311 directories and 320418 files quotacheck: Old file not found.
#!/bin/bash # # Mike Gore # Apr 28, 2009 NOLIMIT="glabahn jorchard jwlwan paforsyt rbsimpso jageorge kvetzal yuying" USERS="acbelang amemarto aramotar b39wang csbmorle gxshen j27wang jwlwan l8xu lost+found momanovi myakhave nmhelsai polsar t2dravia tbian wjxiao ynzhang yq huang z4chen" NOLIMIT="glabahn jorchard jwlwan paforsyt rbsimpso jageorge kvetzal yuying" USERS="acbelang amemarto aramotar b39wang csbmorle gxshen j27wang jwlwan l8xu lost+found momanovi myakhave nmhelsai polsar t2dravia tbian wjxiao ynzhang yq huang z4chen" #turn off quotas quotaoff -a #setquota -u userid blocks_1k_max blocks_1k max_grace inodes_max inodes_max_grace # inodes = files, we have 4096 bytes per inode so we just assign that number # grace is the ammount they can go over for the grace period # 1G on /home for i in $USERS do echo $i setquota -u $i 1000000 1500000 61035 75000 -a /home done # 10G on /usb1 for i in $USERS do echo $i setquota -u $i 10000000 15000000 61035 75000 -a /usb1 done # 10G on /usb1_backup for i in $USERS do echo $i setquota -u $i 10000000 15000000 61035 75000 -a /usb1_backup done #turn on quotas quotaon -a