ÔõÑùÔÚLinuxÉÏÉèÖôÅÅÌÅä¶î
ÔõÑùÔÚ linux ÉÏÉèÖôÅÅÌÅä¶î
ÔÚ Linux ϵͳÖУ¬´ÅÅÌÅä¶îÊÇÒ»ÖÖÓÐÓõÄÖÎÀí¹¤¾ß£¬Ëü¿ÉÒÔÏÞÖÆÓû§Ê¹ÓôÅÅÌ¿Õ¼äµÄ¾Þϸ¡£Í¨¹ýÉèÖôÅÅÌÅä¶î£¬ÏµÍ³ÖÎÀíÔ±¿ÉÒÔ¿ØÖÆÓû§µÄ´ÅÅÌʹÓÃÇéÐΣ¬²¢±ÜÃâ´ÅÅ̿ռ䱻ÀÄÓᣱ¾ÎĽ«ÏÈÈÝÔõÑùÔÚ linux ÉÏÉèÖôÅÅÌÅä¶î£¬²¢ÌṩÏìÓ¦µÄ´úÂëʾÀý¡£
¼ì²éÄÚºËÄ£¿é
Ê×ÏÈ£¬ÎÒÃÇÐèҪȷ±£ÏµÍ³ÄÚºËÒÑÆôÓôÅÅÌÅä¶î¹¦Ð§¡£·¿ªÖնˣ¬Ê¹ÓÃÒÔÏÂÏÂÁî¼ì²éÊÇ·ñÒѼÓÔØÏìÓ¦µÄÄÚºËÄ£¿é£º
$ sudo modprobe quota_v1 $ sudo modprobe quota_v2
µÇ¼ºó¸´ÖÆ
ÈôÊÇûÓб¨´íÌáÐÑ£¬²¢ÇÒÏÂÁîÖ´ÐÐÀֳɣ¬ÄÇô˵Ã÷ÄÚºËÄ£¿éÒÑ׼ȷ¼ÓÔØ¡£
×¼±¸Îļþϵͳ
ÔÚÉèÖôÅÅÌÅä¶î֮ǰ£¬ÎÒÃÇÐèÒªÔÚÎļþϵͳÉÏÆôÓÃÅä¶î¹¦Ð§¡£ÕÒµ½ÒªÆôÓÃÅä¶î¹¦Ð§µÄ·ÖÇø»ò´ÅÅÌ×°±¸£¬È»ºóʹÓÃÒÔÏÂÏÂÁî¹ÒÔظ÷ÖÇø»ò×°±¸£º
$ sudo mount -o remount,usrquota,grpquota /dev/sda1
µÇ¼ºó¸´ÖÆ
ÕâÀïµÄ /dev/sda1 ÊÇÒªÆôÓÃÅä¶î¹¦Ð§µÄ·ÖÇø×°±¸£¬Æ¾Ö¤ÏÖÕæÏàÐξÙÐÐÐ޸ġ£
½¨ÉèÅä¶îÊý¾Ý¿â
ÆôÓÃÅä¶î¹¦Ð§ºó£¬ÎÒÃÇÐèÒª½¨ÉèÅä¶îÊý¾Ý¿â¡£Ê¹ÓÃÒÔÏÂÏÂÁÉèÅä¶îÊý¾Ý¿â£º
$ sudo quotacheck -cug /dev/sda1
µÇ¼ºó¸´ÖÆ
ÔÚÒÔÉÏÏÂÁîÖУ¬/dev/sda1 ÊÇÒª½¨ÉèÅä¶îÊý¾Ý¿âµÄ·ÖÇø×°±¸Ãû³Æ¡£
ÆôÓÃÅä¶î¹¦Ð§
½¨ÉèÅä¶îÊý¾Ý¿âºó£¬ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÆôÓÃÅä¶î¹¦Ð§£º
$ sudo quotaon /dev/sda1
µÇ¼ºó¸´ÖÆ
ÕâÀïµÄ /dev/sda1 ÊÇÒªÆôÓÃÅä¶î¹¦Ð§µÄ·ÖÇø×°±¸£¬Æ¾Ö¤ÏÖÕæÏàÐξÙÐÐÐ޸ġ£
ÉèÖÃÓû§Åä¶î
½ÓÏÂÀ´£¬ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîΪÓû§ÉèÖÃÅä¶îÏÞÖÆ£º
$ sudo edquota -u username
µÇ¼ºó¸´ÖÆ
½« username Ì滻ΪҪÉèÖÃÅä¶îµÄÓû§Ãû¡£Ö´ÐÐÒÔÉÏÏÂÁîºó£¬½«·¿ªÒ»¸ö±à¼Æ÷£¬Äú¿ÉÒÔÔÚÆäÖÐÉèÖÃÓû§µÄ´ÅÅÌÅä¶îÏÞÖÆ¡£ÀýÈ磬Äú¿ÉÒÔÉèÖÃÈíÏÞÖƺÍÓ²ÏÞÖÆ£¬ÌåÏÖÓû§¿ÉÒÔʹÓõÄ×î´ó´ÅÅ̿ռ䡣ʾÀýÈçÏ£º
Disk quotas for user username (uid xxx): Filesystem blocks soft hard inodes soft hard /dev/sda1 10 10 15 3 0 0
µÇ¼ºó¸´ÖÆ
ÔÚÒÔÉÏʾÀýÖУ¬ÈíÏÞÖÆΪ10¸ö¿é£¬Ó²ÏÞÖÆΪ15¸ö¿é£¬¼´Óû§×î¶à¿ÉÒÔʹÓÃ15¸ö¿éµÄ´ÅÅ̿ռ䡣
ÉèÖÃÍêÓû§Åä¶îºó£¬ÉúÑIJ¢¹Ø±Õ±à¼Æ÷¼´¿É¡£
¼ì²éÅä¶îʹÓÃÇéÐÎ
ʹÓÃÒÔÏÂÏÂÁî¿ÉÒÔÉó²éÓû§Åä¶îʹÓÃÇéÐΣº
$ sudo repquota -a
µÇ¼ºó¸´ÖÆ
ÒÔÉÏÏÂÁÏÔʾËùÓÐÓû§µÄÅä¶îʹÓÃÇéÐΣ¬°üÀ¨ÒÑʹÓõĴÅÅÌ¿Õ¼äºÍÅä¶îÏÞÖÆ¡£
²âÊÔÅä¶î
ΪÁËÑéÖ¤Åä¶îÉèÖÃÊÇ·ñÉúЧ£¬Äú¿ÉÒÔʵÑéÔÚÉèÖÃÅä¶îÏÞÖÆÄÚ½¨ÉèÎļþ»òĿ¼¡£ÈôÊÇÁè¼ÝÅä¶îÏÞÖÆ£¬ÏµÍ³½«ÏÔʾÏìÓ¦µÄ¹ýʧÐÅÏ¢¡£
×ܽá
ͨ¹ýÉèÖôÅÅÌÅä¶î£¬ÎÒÃÇ¿ÉÒÔÓÐÓõØÖÎÀíϵͳÉϵĴÅÅÌʹÓÃÇéÐΣ¬²¢×èÖ¹´ÅÅ̿ռ䱻ÀÄÓᣱ¾ÎÄÏÈÈÝÁËÔõÑùÔÚ linux ÉÏÉèÖôÅÅÌÅä¶î£¬²¢ÌṩÁËÏìÓ¦µÄ´úÂëʾÀý¡£Ï£Íû±¾ÎĶÔÄúÓÐËù×ÊÖú¡£
ÒÔÉϾÍÊÇÔõÑùÔÚLinuxÉÏÉèÖôÅÅÌÅä¶îµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡