Quota
22.1 디스크 quota 설정
사용자들이 디스크 공간을 제한된 이상으로 사용하거나 시스템상에서 무제한적으로 디스크 공간을 낭비하지 않도록 한다.
각 사용자에게 일정한 디스크 공간을 할당하여 시스템의 성능을 향상시키고 효율적으로 관리할 수 있다.
커널 컴파일시 y
Quota support(CONFIG_QUOTA)
현재는 ext2 파일시스템에사만 quota를 지원
quota는 디스크를 두가지로 제한
1) 사용자가 가질 수 있는 inode 수
2) 디스크 블록의 수
3) 소프트와 하드 limits로 설정
22.2 기본 설정 - 사용자별 디스크 할당량 지정
[root @edu00 linux]#useradd linux
[root @edu00 linux]#passwd linux
[root @edu00 linux]# vi /etc/fstab
-------------------------------------------
/dev/hda8 /home ext2 defaults,usrquota(grpquota) 1 2
--------------------------------------------
[root @edu00 linux]#mount -o remount /home
: or 시스템 재부팅
[root @edu00 linux]#touch /home/quota.user
: Database Binary File
[root @edu00 linux]#chmod 600 /home/quota.user
[root @edu00 linux]#ls -l /home/quota*
[root @edu00 linux]#quotacheck /home
: 반드시 quotaoff /home 한 후에 하거나 시스템 down시에 한다.
[root @edu00 linux]#quotaon /home or quotaon -a
: /etc/rc.d/rc.sysinit에 설정이 포함되어 있다.
[root @edu00 linux]#edquota -t
: grace period 설정
-----------------------------------------------
Time units may be: days, hours, minutes, or seconds
Grace period before enforcing soft limits for users:
/dev/hda8:block grace period: 7 days, file grace period: 0 days
------------------------------------------------
[root @edu00 linux]#edquota (-u) linux
------------------------------------------------
Edit block and inode quota for user linux:
Device /dev/hda8 (/home):
Used 7070KB, limits: soft=10240 hard=15360
: soft limit은 10M(10240KB), hard limit은 15M(15360KB)
Used 54 inodes, limits: soft=1000 hard=1500
: soft limit은 1000개, hard limit은 1500개)
[root @edu00 linux]#quota (-v) linux
[root @edu00 linux]#telnet 0
login:linux
Password:
[linux @edu00 linux]$cp -R /usr/share .
[linux @edu00 linux]$du -sh .
[linux @edu00 linux]$exit
[root @edu00 linux]#quota -v
[root @edu00 linux]#quota -q
[root @edu00 linux]#edquota -p linux (-u) test wind
: linux에 대한 설정을 test, wind에도 적용
[root @edu00 linux]#quota (-v) wind
[root @edu00 linux]#repquota -a
[root @edu00 linux]#repquota /home
[root @edu00 linux]#quotaoff -a
[root @edu00 linux]#quotacheck -a
22.3 그룹별 디스크 할당량 지정
서버에 프로젝트를 위한 공간을 할당해 주거나, 각 부서별로 공간을 나누어 주고자 할 경우에 그룹별로 디스크 할당량을 정한다.
[root @edu00 linux]#mkdir /home/ICLUB
[root @edu00 linux]#chgrp ICLUB /home/ICLUB
[root @edu00 linux]#chmod 770 /home/ICLUB
[root @edu00 linux]#ls -ld /home/ICLUB
[root @edu00 linux]#vi /etc/fstab
-----------------------------------------
/dev/hda8 /home ext2 defaults,usrquota,grpquota 1 2
------------------------------------------
[root @edu00 linux]#touch /home/quota.group
[root @edu00 linux]#chmod 600 /home/quota.group
[root @edu00 linux]#ls -l /home/quota*
[root @edu00 linux]#reboot
[root @edu00 linux]#edquota -g -t
Time units may be: days, hours, minutes, or seconds
Grace period before enforcing soft limits for groups:
/dev/hda8:block grace period: 7 days, file grace period: 0 days
[root @edu00 linux]#edquota -g ICLUB
Quotas for group ICLUB:
/dev/hda8: blocks in use:0, limits (soft = 12000, hard = 13000)
inodes in use:0, limits ( soft = 0, hard = 0)
[root @edu00 linux]#quotaon /home
[root @edu00 linux]#edquota -v -g ICLUB
[root @edu00 linux]#telnet 0
login:open
Password:
[open @edu00 open]$groups
[open @edu00 open]$newgrp ICLUB
[open @edu00 open]$groups
[open @edu00 open]$cd /home/ICLUB
[open @edu00 open]$cp -R /usr/share .
[open @edu00 open]$du -sh
[open @edu00 open]$exit
[root @edu00 linux]#quota -v -g ICLUB
[root @edu00 linux]#quota -q -g ICLUB
[root @edu00 linux]#repquota -a
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7730 | 10년 전 | 1315 | ||
| 7729 | 10년 전 | 1174 | ||
| 7728 |
잘살아보자
|
10년 전 | 615 | |
| 7727 |
잘살아보자
|
10년 전 | 513 | |
| 7726 |
잘살아보자
|
10년 전 | 843 | |
| 7725 |
잘살아보자
|
10년 전 | 570 | |
| 7724 |
잘살아보자
|
10년 전 | 488 | |
| 7723 |
잘살아보자
|
10년 전 | 551 | |
| 7722 |
잘살아보자
|
10년 전 | 490 | |
| 7721 |
잘살아보자
|
10년 전 | 521 | |
| 7720 |
잘살아보자
|
10년 전 | 488 | |
| 7719 |
비긴어게인
|
10년 전 | 702 | |
| 7718 |
|
10년 전 | 2548 | |
| 7717 |
잘살아보자
|
10년 전 | 670 | |
| 7716 |
잘살아보자
|
10년 전 | 415 | |
| 7715 |
잘살아보자
|
10년 전 | 448 | |
| 7714 |
잘살아보자
|
10년 전 | 511 | |
| 7713 | 10년 전 | 1792 | ||
| 7712 | 10년 전 | 1730 | ||
| 7711 | 10년 전 | 1118 | ||
| 7710 | 10년 전 | 1409 | ||
| 7709 | 10년 전 | 1530 | ||
| 7708 | 10년 전 | 1471 | ||
| 7707 | 10년 전 | 866 | ||
| 7706 |
별지기천사
|
10년 전 | 581 | |
| 7705 | 10년 전 | 1085 | ||
| 7704 |
ICONdesignstudio
|
10년 전 | 641 | |
| 7703 | 10년 전 | 605 | ||
| 7702 |
|
10년 전 | 742 | |
| 7701 | 10년 전 | 1433 | ||
| 7700 | 10년 전 | 1116 | ||
| 7699 | 10년 전 | 586 | ||
| 7698 | 10년 전 | 1159 | ||
| 7697 | 10년 전 | 5183 | ||
| 7696 | 10년 전 | 672 | ||
| 7695 | 10년 전 | 1697 | ||
| 7694 | 10년 전 | 1084 | ||
| 7693 | 10년 전 | 1569 | ||
| 7692 | 10년 전 | 1312 | ||
| 7691 | 10년 전 | 836 | ||
| 7690 | 10년 전 | 1398 | ||
| 7689 | 10년 전 | 1028 | ||
| 7688 | 10년 전 | 634 | ||
| 7687 |
파랑새1597
|
10년 전 | 614 | |
| 7686 | 10년 전 | 864 | ||
| 7685 | 10년 전 | 1352 | ||
| 7684 | 10년 전 | 811 | ||
| 7683 | 10년 전 | 1124 | ||
| 7682 | 10년 전 | 1038 | ||
| 7681 | 10년 전 | 683 | ||
| 7680 | 10년 전 | 998 | ||
| 7679 | 10년 전 | 521 | ||
| 7678 | 10년 전 | 751 | ||
| 7677 | 10년 전 | 654 | ||
| 7676 |
|
10년 전 | 958 | |
| 7675 |
|
10년 전 | 1195 | |
| 7674 | 10년 전 | 1058 | ||
| 7673 | 10년 전 | 766 | ||
| 7672 | 10년 전 | 1107 | ||
| 7671 | 10년 전 | 917 | ||
| 7670 | 10년 전 | 685 | ||
| 7669 |
mashmellow
|
10년 전 | 1241 | |
| 7668 | 10년 전 | 730 | ||
| 7667 | 10년 전 | 1027 | ||
| 7666 |
senseme
|
10년 전 | 669 | |
| 7665 | 10년 전 | 525 | ||
| 7664 | 10년 전 | 1907 | ||
| 7663 |
mixx애교
|
10년 전 | 989 | |
| 7662 | 10년 전 | 1058 | ||
| 7661 |
hkhkah
|
10년 전 | 801 | |
| 7660 | 10년 전 | 1076 | ||
| 7659 |
커네드커네드
|
10년 전 | 946 | |
| 7658 |
바람돌이팡
|
10년 전 | 688 | |
| 7657 | 10년 전 | 1176 | ||
| 7656 | 10년 전 | 1588 | ||
| 7655 | 10년 전 | 1006 | ||
| 7654 |
개발짜증나
|
10년 전 | 868 | |
| 7653 |
네이비칼라
|
10년 전 | 893 | |
| 7652 |
밥먹고합시다
|
10년 전 | 820 | |
| 7651 |
플라이SINJI
|
10년 전 | 1523 | |
| 7650 |
개발짜증나
|
10년 전 | 1430 | |
| 7649 | 10년 전 | 461 | ||
| 7648 |
이미영ㅇㅇ
|
10년 전 | 884 | |
| 7647 | 10년 전 | 455 | ||
| 7646 | 10년 전 | 826 | ||
| 7645 | 10년 전 | 2335 | ||
| 7644 | 10년 전 | 830 | ||
| 7643 |
|
10년 전 | 2884 | |
| 7642 | 10년 전 | 1528 | ||
| 7641 | 10년 전 | 1150 | ||
| 7640 |
개발짜증나
|
10년 전 | 479 | |
| 7639 |
|
10년 전 | 823 | |
| 7638 |
개발짜증나
|
10년 전 | 1145 | |
| 7637 | 10년 전 | 1565 | ||
| 7636 | 10년 전 | 2921 | ||
| 7635 | 10년 전 | 1711 | ||
| 7634 | 10년 전 | 1899 | ||
| 7633 | 10년 전 | 2363 | ||
| 7632 | 10년 전 | 3968 | ||
| 7631 |
|
10년 전 | 1555 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기