ºìÁªLinuxÃÅ»§
Linux°ïÖú
µ±Ç°Î»ÖÃ: ºìÁªLinuxÃÅ»§ > SuSE

Open SuSe Linux´ÅÅÌÏÞ¶îÉèÖÃ

·¢²¼Ê±¼ä:2007-08-18 10:16:05À´Ô´:ºìÁª×÷Õß:Intercon
²Ù×÷ϵͳ°æ±¾£º
suse10:/ # cat /etc/SuSE-release
openSUSE 10.2 (i586)
VERSION = 10.2
suse10:/ # uname -a
Linux suse10 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006 i686 athlon i386 GNU/Linux

1¡¢¼ì²éϵͳÊÇ·ñ°²×°quota°ü
suse10:/ # rpm -qa | grep quota
suse10:/ #
²éѯÎÞÈκÎÊä³ö£¬±íʾϵͳδ°²×°¡£

2¡¢°²×°quota°ü
suse10:/tmp # ls -l quota*
-rwxr-xr-x 1 root root 270080 Aug 17 14:33 quota-3.13-17.i586.rpm
suse10:/tmp # rpm -ivh quota-3.13-17.i586.rpm
Preparing... ########################################### [100%]
1:quota ########################################### [100%]

3¡¢Ôٴμì²éϵͳÊÇ·ñ³É¹¦°²×°quota°ü
suse10:/tmp # rpm -qa | grep quota
quota-3.13-17
ÓС°quota-3.13-17¡±Êä³ö£¬±íʾquota°ü°²×°³É¹¦¡£

4¡¢ÉèÖÃÐèÒª×öÓû§/×é´ÅÅÌÏÞ¶îµÄÎļþϵͳ
±à¼­/etc/fstabÎļþ£¬¶ÔÓû§½øÐÐÏÞÖÆ£¬Ìí¼Óusrquota£¬¶Ô×é½øÐÐÏÞÖÆ£¬Ìí¼Ógrpquota¡£ÈçϺìÉ«²¿·Ö£º
suse10:/ # cat /etc/fstab
/dev/system_vg/root_lv / ext3 acl,user_xattr 1 1
/dev/hda1 /boot ext3 acl,user_xattr 1 2
/dev/system_vg/home_lv /home ext3 acl,user_xattr,usrquota,grpquota 1 2
/dev/system_vg/tmp_lv /tmp ext3 acl,user_xattr 1 2
/dev/system_vg/usr_lv /usr ext3 acl,user_xattr 1 2
/dev/system_vg/swap_lv swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/data_vg/informix_lv /informix ext3 acl,user_xattr 1 2
/dev/data_vg/oracle_lv /oracle ext3 acl,user_xattr 1 2

5¡¢ÖØÐÂmountÎļþϵͳ
¶ÔÆôÓôÅÅÌÏÞ¶îµÄÎļþϵͳÖØмÓÔØ£º
suse10:/ # mount -o remount /home
»Ø³µºóÈçÎÞÈκÎÐÅÏ¢£¬±íʾÖØмÓÔسɹ¦¡£

6¡¢ÎªÆôÓôÅÅÌÏÞ¶îµÄÎļþϵͳ´´½¨ÏÞ¶îÎļþ
suse10:/ # quotacheck -gumv /home
quotacheck: Scanning /dev/mapper/system_vg-home_lv [/home] done
quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
quotacheck: Checked 3210 directories and 8310 files
quotacheck: Old file not found.
quotacheck: Old file not found.
-g²ÎÊý£ºÉ¨Ãè´ÅÅÌ¿Õ¼äʱ£¬¼ÆËãÿ¸ö×é±êʶ·û(GID)ËùÕ¼ÓõÄĿ¼ºÍÎļþÊýÄ¿£»
-u²ÎÊý£ºÉ¨Ãè´ÅÅÌ¿Õ¼äʱ£¬¼ÆËãÿ¸öÓû§±êʶ·û(UID)ËùÕ¼ÓõÄĿ¼ºÍÎļþÊýÄ¿£»
-v²ÎÊý£º±êʶÃüÁîÖ´Ðйý³Ì¡£
-m²ÎÊý£ºÇ¿ÖÆÖ´ÐÐÃüÁî¡£
´Ëʱ»áÔÚ/homeÎļþϵͳ¸ùĿ¼ÏÂ×Ô¶¯Éú³ÉÁ½¸öÎļþ£ºaquota.userºÍaquota.group
suse10:/ # ls -l /home/aquota.*
-rw------- 1 root root 8192 Aug 17 22:18 /home/aquota.group
-rw------- 1 root root 8192 Aug 17 22:18 /home/aquota.user

7¡¢¿ªÆô´ÅÅÌÏÞ¶î
suse10:/ # quotaon -augv
/dev/mapper/system_vg-home_lv [/home]: group quotas turned on
/dev/mapper/system_vg-home_lv [/home]: user quotas turned on
-a²ÎÊý£º¿ªÆôÔÚ/ect/fstabÎļþÀÓмÓÈëquotaÉèÖõķÖÇøµÄ¿Õ¼äÏÞÖÆ£»
-g²ÎÊý£º¿ªÆôȺ×éµÄ´ÅÅÌ¿Õ¼äÏÞÖÆ£»
-u²ÎÊý£º¿ªÆôÓû§µÄ´ÅÅÌ¿Õ¼äÏÞÖÆ£»
-v²ÎÊý£ºÏÔʾָÁîÖ¸ÁîÖ´Ðйý³Ì¡£

8¡¢±à¼­Óû§/×éµÄ´ÅÅÌÏÞ¶î´óС£¨±¾ÎÄÒÔoracle1Óû§ÎªÀý£¬×éÅäÖùý³ÌÀàËÆ£¬±¾ÎIJ»Áгö£©
suse10:/ #edquota -u oracle1
»Ø³µºó»áµ÷ÓÃvi±à¼­£¬ÈçÏ£º
Disk quotas for user oracle1 (uid 2002):
Filesystem blocks soft hard inodes soft hard
/dev/mapper/system_vg-home_lv 1886624 0 0 3880 0 0
˵Ã÷£º
Filessystem£º±íʾµ±Ç°ÆôÓôÅÅÌÏÞ¶îµÄÎļþϵͳÃû³Æ£»
blocks£º±íʾµ±Ç°Óû§ÒÑʹÓÿéÊýÁ¿´óС£»
soft£º±íʾÈíÏÞÖÆ£¨·ÇÇ¿ÖÆÐÔÏÞÖÆ£©´ÅÅÌ¿Õ¼ä´óС£¬µ¥Î»ÎªKBytes£»
hard£º±íʾӲÏÞÖÆ£¨Ç¿ÖÆÐÔÏÞÖÆ£©´ÅÅÌ¿Õ¼ä´óС£¬µ¥Î»ÎªKBytes£»
inodes£º±íʾµ±Ç°Óû§ÒÑʹÓÃÎļþ¸öÊý£»
soft£º±íʾÈíÏÞÖÆ£¨·ÇÇ¿ÖÆÐÔÏÞÖÆ£©Îļþ¸öÊý£»
hard£º±íʾӲÏÞÖÆ£¨Ç¿ÖÆÐÔÏÞÖÆ£©Îļþ¸öÊý¡£
¡°0¡±±íʾûÓв»ÏÞÖÆ£¬°ÑÏëÒªÉèÖõÄÊýÖµÌîÈë¶ÔÓ¦Ïî±£´æÍ˳ö¡£

9¡¢²é¿´Ä³¸öÓû§µÄ´ÅÅÌÏÞ¶îÇé¿ö
suse10:/ # quota -u oracle1
Disk quotas for user oracle1 (uid 2002):
Filesystem blocks quota limit grace files quota limit grace
/dev/mapper/system_vg-home_lv 1886624 4194304 4200000 3880 10000 11000
˵Ã÷£º²é¿´Ä³¸ö×éµÄ´ÅÅÌÏÞ¶îÇé¿öʹÓÃ-g²ÎÊý¡£

10¡¢²é¿´Ä³¸öÎļþϵͳµÄ´ÅÅÌÏ޶°üÀ¨Óû§ºÍ×éÏ޶
suse10:/ # repquota -ugv /home
*** Report for user quotas on device /dev/mapper/system_vg-home_lv
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 1027760 0 0 2444 0 0
metal -- 3068 0 0 656 0 0
informix -- 599128 0 0 2076 0 0
oracle -- 701152 0 0 2437 0 0
oinstall -- 116 0 0 25 0 0
oracle1 -- 1886624 4194304 4200000 3880 10000 11000

Statistics:
Total blocks: 8
Data blocks: 1
Entries: 6
Used average: 6.000000

*** Report for group quotas on device /dev/mapper/system_vg-home_lv
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
Group used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 1003900 0 0 2449 0 0
users -- 3068 0 0 656 0 0
informix -- 623104 0 0 2096 0 0
oinstall -- 2587776 0 0 6317 0 0

Statistics:
Total blocks: 8
Data blocks: 1
Entries: 4
Used average: 4.000000

11¡¢±à¼­¿íÏÞʱ¼ä
suse10:/ #edquota -t
Grace period before enforcing soft limits for users:
Time units may be: days, hours, minutes, or seconds
Filesystem ock grace period Inode grace period
/dev/mapper/system_vg-home_lv 7days 7days
ϵͳȱʡÊÇ7Ì죬¿É¸Ä³ÉÄãʵ¼ÊÐèÒªµÄÖµ±£´æºóÍ˳ö¼´¿É¡£
ÌرðҪ˵Ã÷µÄÊÇ£¬µ±Êµ¼ÊʹÓõĿռä䳬¹ýÈí£¨soft£©ÏÞÖÆ£¬¿íÏÞ£¨grace£©Ê±¼äÊDz»»á³öÏÖÔÚquota -u usernameÊä³öÖеġ£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 1 ÌõÆÀÂÛ

  1. xj815 ÓÚ 2007-08-24 12:47:01·¢±í:

    i am new user, it is hard to understand