Thursday, March 22, 2012

Managing diskk usage with quotas

http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch28_:_Managing_Disk_Usage_with_Quotas

# who
# wall The system is shutting down now!

# init 1
# cat /etc/fstab | grep -w usrquota
(if not exist then add it to make it looks like below:)
LABEL=/home       /home          ext3    defaults,usrquota  1 2

# mount -o remount /home
# exit

# touch /home/aquota.user
# chmod 600 /home/aquota.user
# aquotacheck -vagum
# edquota -u mp3user
Disk quotas for user mp3user (uid 503):   Filesystem  blocks       soft       hard     inodes     soft     hard
/dev/hda3 24 0 0 7 0 0


change the soft value to 5000 to limit user mp3user to a maximum of 5MB of data storage.

No comments: