리눅스 쿼터(quata)설정 및 설명
디스크 쿼터
1)커널에서 쿼터 지원여부 확인
[root@netdosapro44 ~]# cat /var/log/dmesg | grep quota
VFS: Disk quotas dquot_6.5.1
2)/etc/fstab에 쿼터 옵션 추가
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults.usrquota 1 1
LABEL=/boot1 /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/home /home ext3 defaults 1 2
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=/usr1 /usr ext3 defaults 1 2
LABEL=/var1 /var ext3 defaults 1 2
LABEL=SWAP-hda11 swap swap defaults 0 0
/dev/hdc /media/cdrom auto pamconsole,ro,exec,noauto,managed 0 0
3)쿼터 파티션 재설정
[root@netdosapro44 ~]# mount -o remount /
[root@netdosapro44 ~]# mount
/dev/hda10 on / type ext3 (rw,usrquota)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/hda7 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/hda13 on /home type ext3 (rw)
/dev/hda12 on /tmp type ext3 (rw)
/dev/hda8 on /usr type ext3 (rw)
/dev/hda9 on /var type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
[root@netdosapro44 ~]#
4)쿼터 데이터베이스 파일 만들기 및 퍼미션 추가
[root@netdosapro44 ~]# touch /aquota.user
[root@netdosapro44 ~]# cd /
[root@netdosapro44 /]# chmod 600 /aquota.user
[root@netdosapro44 /]#
5)쿼터 상태 체크
[root@netdosapro44 /]# quotacheck -avugm
quotacheck: WARNING - Quotafile //aquota.user was probably truncated. Can't save quota settings...
quotacheck: Scanning /dev/hda10 [/] quotacheck: Old group file not found. Usage will not be substracted.
done
quotacheck: Checked 3910 directories and 10070 files
6)쿼터 활성화
root@netdosapro44 /]# quotaon /
7)계정 용량 제한하기
[root@netdosapro44 /]# adduser soul1
[root@netdosapro44 /]# ls /home
lost+found pcs soul soul1
[root@netdosapro44 /]# edquota soul1
Disk quotas for user soul1 (uid 502):
Filesystem blocks soft hard inodes soft hard
/dev/hda10 0 0 0 0 0 0
(참고)
blocks : 현제 사용자가 사용 중인 총 블럭수 (용량)
soft : 사용자가 실제로 사용할수 있는 계정용량
hard : 하드로 할당된 용량 범위 내까지 소프트 용량을 사용할수 있게 함
inodes : 총 파일의 갯수
8)유예 기간(grace period)
Grace period before enforcing soft limits for users:
Time units may be: days, hours, minutes, or seconds
Filesystem Block grace period Inode grace period
/dev/hda10 7days 7days
~
9)쿼터 설정 사용 확인
[root@netdosapro44 /]# repquota -a
*** Report for user quotas on device /dev/hda10
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 282620 0 0 13949 0 0
news -- 388 0 0 28 0 0
rpm -- 84 0 0 1 0 0
10) 사용자 자신 쿼터 용량 확인
[root@netdosapro44 /]# su soul1
[soul1@netdosapro44 /]$ quota
Disk quotas for user soul1 (uid 502): none
[soul1@netdosapro44 /]$
11)쿼터 설정을 다른 사용자와 동일하게 설정하기
-soul2 를 soul1 처럼 용량 설정
[root@netdosapro44 /]# edquota -p soul1 soul2
[root@netdosapro44 /]# repquota -a
*** Report for user quotas on device /dev/hda10
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 282620 0 0 13949 0 0
news -- 388 0 0 28 0 0
rpm -- 84 0 0 1 0 0
[root@netdosapro44 /]#
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8230 | 9년 전 | 116 | ||
| 8229 | 9년 전 | 110 | ||
| 8228 |
커네드커네드
|
9년 전 | 154 | |
| 8227 | 9년 전 | 197 | ||
| 8226 | 9년 전 | 210 | ||
| 8225 | 9년 전 | 193 | ||
| 8224 | 9년 전 | 185 | ||
| 8223 | 9년 전 | 163 | ||
| 8222 |
|
9년 전 | 241 | |
| 8221 | 9년 전 | 145 | ||
| 8220 | 9년 전 | 184 | ||
| 8219 | 9년 전 | 140 | ||
| 8218 | 9년 전 | 189 | ||
| 8217 |
star3840
|
9년 전 | 159 | |
| 8216 | 9년 전 | 225 | ||
| 8215 | 9년 전 | 177 | ||
| 8214 | 9년 전 | 274 | ||
| 8213 | 9년 전 | 224 | ||
| 8212 | 9년 전 | 140 | ||
| 8211 | 9년 전 | 312 | ||
| 8210 | 9년 전 | 320 | ||
| 8209 | 9년 전 | 391 | ||
| 8208 | 9년 전 | 282 | ||
| 8207 | 9년 전 | 284 | ||
| 8206 |
|
9년 전 | 242 | |
| 8205 | 9년 전 | 225 | ||
| 8204 | 9년 전 | 196 | ||
| 8203 | 9년 전 | 273 | ||
| 8202 | 9년 전 | 192 | ||
| 8201 | 9년 전 | 235 | ||
| 8200 | 9년 전 | 232 | ||
| 8199 | 9년 전 | 257 | ||
| 8198 | 9년 전 | 221 | ||
| 8197 | 9년 전 | 212 | ||
| 8196 | 9년 전 | 611 | ||
| 8195 | 9년 전 | 213 | ||
| 8194 | 9년 전 | 328 | ||
| 8193 | 9년 전 | 220 | ||
| 8192 | 9년 전 | 250 | ||
| 8191 | 9년 전 | 203 | ||
| 8190 | 9년 전 | 202 | ||
| 8189 | 9년 전 | 254 | ||
| 8188 | 9년 전 | 192 | ||
| 8187 | 9년 전 | 193 | ||
| 8186 | 9년 전 | 195 | ||
| 8185 | 9년 전 | 367 | ||
| 8184 | 9년 전 | 151 | ||
| 8183 | 9년 전 | 376 | ||
| 8182 | 9년 전 | 224 | ||
| 8181 | 9년 전 | 187 | ||
| 8180 | 9년 전 | 766 | ||
| 8179 | 9년 전 | 535 | ||
| 8178 | 9년 전 | 380 | ||
| 8177 |
kiplayer
|
9년 전 | 390 | |
| 8176 | 9년 전 | 421 | ||
| 8175 | 9년 전 | 293 | ||
| 8174 | 9년 전 | 297 | ||
| 8173 | 9년 전 | 388 | ||
| 8172 | 9년 전 | 255 | ||
| 8171 | 9년 전 | 232 | ||
| 8170 | 9년 전 | 350 | ||
| 8169 |
커네드커네드
|
9년 전 | 305 | |
| 8168 | 9년 전 | 378 | ||
| 8167 | 9년 전 | 373 | ||
| 8166 | 9년 전 | 281 | ||
| 8165 | 9년 전 | 219 | ||
| 8164 | 9년 전 | 361 | ||
| 8163 | 9년 전 | 348 | ||
| 8162 | 9년 전 | 355 | ||
| 8161 | 9년 전 | 367 | ||
| 8160 |
|
9년 전 | 560 | |
| 8159 | 9년 전 | 503 | ||
| 8158 | 9년 전 | 313 | ||
| 8157 | 9년 전 | 427 | ||
| 8156 | 9년 전 | 311 | ||
| 8155 | 9년 전 | 306 | ||
| 8154 |
00년생용띠
|
9년 전 | 643 | |
| 8153 | 9년 전 | 282 | ||
| 8152 |
|
9년 전 | 466 | |
| 8151 | 9년 전 | 463 | ||
| 8150 | 9년 전 | 568 | ||
| 8149 |
Jangfolk
|
9년 전 | 412 | |
| 8148 | 9년 전 | 235 | ||
| 8147 | 9년 전 | 432 | ||
| 8146 | 9년 전 | 508 | ||
| 8145 | 9년 전 | 463 | ||
| 8144 | 9년 전 | 423 | ||
| 8143 | 9년 전 | 255 | ||
| 8142 | 9년 전 | 482 | ||
| 8141 | 9년 전 | 429 | ||
| 8140 | 9년 전 | 977 | ||
| 8139 | 9년 전 | 330 | ||
| 8138 |
전갈자리남자
|
9년 전 | 436 | |
| 8137 | 9년 전 | 467 | ||
| 8136 | 9년 전 | 801 | ||
| 8135 |
|
9년 전 | 836 | |
| 8134 |
PlayPixel
|
9년 전 | 577 | |
| 8133 |
|
9년 전 | 494 | |
| 8132 | 9년 전 | 513 | ||
| 8131 | 9년 전 | 877 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기