뽀로

메일,홈계정 쿼터 적용하기

· 19년 전 · 2585
쿼터 설정 입니다
음 안녕 1.2기준입니다
메일은 계정단 5M
홈계정은 200M 이런거 보셨죠
이게 바로 쿼터입니다

[root@ns root]# cat /etc/fstab
/dev/hda1 / ext3 defaults,noatime 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults,noatime 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb3 /usr ext3 defaults,noatime 1 2
/dev/hdb5 /usr/local ext3 defaults,noatime 1 2
/dev/hda2 /var ext3 defaults,usrquota 1 2
/dev/hdb2 /var/log ext3 defaults,noatime 1 2
/dev/hdb1 /web ext3 defaults,noatime 1 2
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
[root@ns root]#

[root@ns root]# vi /etc/fstab
/dev/hda1 / ext3 defaults,noatime 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults,noatime 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb3 /usr ext3 defaults,noatime 1 2
/dev/hdb5 /usr/local ext3 defaults,noatime 1 2
/dev/hda2 /var ext3 defaults,usrquota 1 2
/dev/hdb2 /var/log ext3 defaults,noatime 1 2
/dev/hdb1 /web ext3 defaults,usrquota 1 2
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0

[var] /dev/hda2 /var ext3 defaults,usrquota 1 2
[web] /dev/hdb1 /web ext3 defaults,usrquota 1 2
잘보세요 usrquota 철자 주의 틀리면 골때리는 문제 발생한담니다
책보면 그렇게 써서 저도 모르겠는 데 아마 그렇겠죠

[root@ns root]# touch /web/quota.user
[root@ns root]# chmod 600 /web/quota.user
[root@ns root]# reboot


[root@ns web]# quotacheck -a -m

음 처음 설치시 쿼터 데이터 베이스 점검및 갱신이래요
했든 뭐라고 나옵니다
처음 적용시 하시고요

아래는 2번째 부터 쿼터 적용시 점검시 사용하세요
[root@ns web]# quotacheck -a -m -f
quotacheck: WARNING - Quotafile /web/quota.user was probably truncated. Can't save
quota settings...
이건 지금 제가 /var /web를 2개 쿼터 적용해서
2번째 이렇게 하면 될것입니다
모르겠거든요 했든 .....

[root@ns web]# ll
합계 24
drwx-----x 4 root root 4096 9월 1 00:35 ./
drwx--x--x 18 root root 4096 9월 1 00:32 ../
drwx-----x 4 root root 4096 8월 28 13:24 home/
drwx-----x 2 root root 4096 8월 27 20:30 home2/
-rw------- 1 root root 16224 9월 1 00:35 quota.user
[root@ns web]# convertquota /web
이건 2.4.XX커널를 위한 데이터 베이스 생성이래요
아래 보시면 파일 하나생성 되었을 것입니다
[root@ns web]# ll
합계 32
drwx-----x 4 root root 4096 9월 1 00:35 ./
drwx--x--x 18 root root 4096 9월 1 00:32 ../
-rw------- 1 root root 7168 9월 1 00:35 aquota.user
drwx-----x 4 root root 4096 8월 28 13:24 home/
drwx-----x 2 root root 4096 8월 27 20:30 home2/
-rw------- 1 root root 16224 9월 1 00:35 quota.user

[root@ns web]# edquota rmcobol 음 사용자 쿼터 적용입다
Disk quotas for user rmcobol (uid 505):
Filesystem blocks soft hard inodes
soft hard
/dev/hda2 16 20 20 1
0 0
/dev/hdb1 37764 400000 400000 2429
0 0

위 보시면 /hda2 - 이건 메일 쿼터 고요
/hdb1 - 홈 계정 쿼터여요
히히 저는 처음 잘 몰라서 아래로 쭉 사용자를 쓸려구 했는 데
[root@ns web]# edquota <사용자> 이런식으로 사용하시면 돼요 ^^
[root@ns web]# edquota rmcobol 이래하면 위처럼 나오거든요 그럼 용량입력하세요
kbyte 기준이닌까 400000 / 1000 = 400M 가 인가요 1Mbyte 1000 kbyte
블럭이 용량이어요[계정용량 100M~50M]이런거요 저쪽건 볼필요 없구요
[root@ns web]# edquota webmail
Disk quotas for user webmail (uid 506):
Filesystem blocks soft hard inodes
soft hard
/dev/hda2 12 20 20 1
0 0
/dev/hdb1 141452 250000 250000 1128
0 0

[root@ns web]# quotaon /web 쿼터 적용해제 그런거죠
[root@ns web]# quotaoff /web

[root@ns web]# repquota -a
*** Report for user quotas on device /dev/hda2
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 22964 0 0 1013 0 0
mail -- 56 0 0 14 0 0
rpm -- 8528 0 0 14 0 0
pcap -- 264 0 0 15 0 0
apache -- 48 0 0 11 0 0
mysql -- 6028 0 0 189 0 0
named -- 92 0 0 24 0 0
rmcobol -- 16 20 20 1 0 0
webmail -- 12 20 20 1 0 0


*** Report for user quotas on device /dev/hdb1
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 4460 0 0 14 0 0
rmcobol -- 37764 50000 50000 2429 0 0
webmail -- 141452 250000 250000 1128 0 0
#500 -- 13700 0 0 21 0 0
#501 -- 1428 0 0 3 0 0


음 여기서 1k byte 1000 이닌까요 250,000 / 1000 = 250 M
50000 / 1000 = 50 M
이런식으로 주시면 됩니다

[root@ns web]# repquota -a
*** Report for user quotas on device /dev/hda2
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 23020 0 0 1027 0 0
mail -- 56 0 0 14 0 0
rpm -- 8528 0 0 14 0 0
pcap -- 264 0 0 15 0 0
apache -- 48 0 0 11 0 0
mysql -- 6028 0 0 189 0 0
named -- 92 0 0 24 0 0
rmcobol -- 16 20 20 1 0 0
webmail -- 12 20 20 1 0 0


*** Report for user quotas on device /dev/hdb1
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 4476 0 0 15 0 0
rmcobol -- 50000 50000 50000 7days 2445 0 0
제가 테스트 했거든요 음 50 이상 자료 업하려니 안되더라구요
이유야 길죠 ^^ soft , hard 이건 아시죠
webmail -- 141452 250000 250000 1128 0 0
#500 -- 13700 0 0 21 0 0
#501 -- 1428 0 0 3 0 0

이로써 메일 쿼터랑 홈계정 쿼터를 배웠습니다
정균님 강좌 참조하세요
http://www.oops.org/?t=lecture&s=quota<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:32:05 Linux에서 이동 됨]</div>
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

프로그램

+
제목 글쓴이 날짜 조회
19년 전 조회 3,600
19년 전 조회 2,531
19년 전 조회 1,833
19년 전 조회 2,439
19년 전 조회 1,700
19년 전 조회 1,382
19년 전 조회 1,514
19년 전 조회 1,781
19년 전 조회 1,555
19년 전 조회 1,760
19년 전 조회 1,544
19년 전 조회 1,927
19년 전 조회 1,822
19년 전 조회 1,421
19년 전 조회 1,423
19년 전 조회 1,335
19년 전 조회 1,207
19년 전 조회 1,384
19년 전 조회 1,953
19년 전 조회 2,375
19년 전 조회 2,851
19년 전 조회 2,288
19년 전 조회 1,781
19년 전 조회 7,010
19년 전 조회 3,706
19년 전 조회 2,313
19년 전 조회 2,334
19년 전 조회 2,817
19년 전 조회 5,754
19년 전 조회 5,537
19년 전 조회 2,230
19년 전 조회 3,268
19년 전 조회 2,839
19년 전 조회 2,191
19년 전 조회 2,706
19년 전 조회 1,559
19년 전 조회 1,715
19년 전 조회 1,810
19년 전 조회 1,986
19년 전 조회 1,660
19년 전 조회 1,789
19년 전 조회 1,756
19년 전 조회 1,824
19년 전 조회 1,506
19년 전 조회 2,628
19년 전 조회 1,964
19년 전 조회 3,214
19년 전 조회 3,245
19년 전 조회 2,499
19년 전 조회 2,586
19년 전 조회 2,412
19년 전 조회 2,673
19년 전 조회 2,660
19년 전 조회 3,139
19년 전 조회 2,854
19년 전 조회 5,262
19년 전 조회 2,089
19년 전 조회 2,172
19년 전 조회 1,979
19년 전 조회 1,908
19년 전 조회 1,910
19년 전 조회 2,104
19년 전 조회 3,178
19년 전 조회 3,050
19년 전 조회 2,823
19년 전 조회 2,525
19년 전 조회 2,601
19년 전 조회 2,265
19년 전 조회 2,310
19년 전 조회 1,570
19년 전 조회 2,293
19년 전 조회 2,643
19년 전 조회 2,634
19년 전 조회 2,942
19년 전 조회 2,718
19년 전 조회 1,688
19년 전 조회 1,796
19년 전 조회 2,699
19년 전 조회 2,197
19년 전 조회 3,960
19년 전 조회 2,466
19년 전 조회 2,351
19년 전 조회 3,491
19년 전 조회 3,072
19년 전 조회 2,211
19년 전 조회 3,002
19년 전 조회 2,212
19년 전 조회 3,062
19년 전 조회 3,482
19년 전 조회 5,176
19년 전 조회 3,099
19년 전 조회 3,105
19년 전 조회 2,685
19년 전 조회 2,427
19년 전 조회 2,683
19년 전 조회 2,418
19년 전 조회 2,529
19년 전 조회 2,330
19년 전 조회 2,671
19년 전 조회 2,937
🐛 버그신고