리눅스 쿼터(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 /]#
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1830 |
갈색야생마
|
17년 전 | 2845 | |
| 1829 |
갈색야생마
|
17년 전 | 1593 | |
| 1828 |
갈색야생마
|
17년 전 | 1352 | |
| 1827 |
갈색야생마
|
17년 전 | 2018 | |
| 1826 |
갈색야생마
|
17년 전 | 1465 | |
| 1825 |
갈색야생마
|
17년 전 | 1408 | |
| 1824 |
갈색야생마
|
17년 전 | 1354 | |
| 1823 |
갈색야생마
|
17년 전 | 1563 | |
| 1822 |
갈색야생마
|
17년 전 | 2051 | |
| 1821 |
갈색야생마
|
17년 전 | 1436 | |
| 1820 |
갈색야생마
|
17년 전 | 1408 | |
| 1819 |
갈색야생마
|
17년 전 | 1213 | |
| 1818 |
갈색야생마
|
17년 전 | 1441 | |
| 1817 |
갈색야생마
|
17년 전 | 1170 | |
| 1816 |
갈색야생마
|
17년 전 | 1301 | |
| 1815 |
갈색야생마
|
17년 전 | 1559 | |
| 1814 |
갈색야생마
|
17년 전 | 1394 | |
| 1813 |
갈색야생마
|
17년 전 | 1294 | |
| 1812 |
갈색야생마
|
17년 전 | 1262 | |
| 1811 |
갈색야생마
|
17년 전 | 1379 | |
| 1810 |
갈색야생마
|
17년 전 | 1154 | |
| 1809 |
갈색야생마
|
17년 전 | 1208 | |
| 1808 |
갈색야생마
|
17년 전 | 1241 | |
| 1807 |
갈색야생마
|
17년 전 | 1313 | |
| 1806 |
갈색야생마
|
17년 전 | 1339 | |
| 1805 |
갈색야생마
|
17년 전 | 1344 | |
| 1804 |
갈색야생마
|
17년 전 | 1307 | |
| 1803 |
갈색야생마
|
17년 전 | 1627 | |
| 1802 | 17년 전 | 2961 | ||
| 1801 | 17년 전 | 3359 | ||
| 1800 | 17년 전 | 1454 | ||
| 1799 | 17년 전 | 1549 | ||
| 1798 | 17년 전 | 1365 | ||
| 1797 | 17년 전 | 2119 | ||
| 1796 | 17년 전 | 3040 | ||
| 1795 | 17년 전 | 1380 | ||
| 1794 | 17년 전 | 1374 | ||
| 1793 |
갈색야생마
|
17년 전 | 1374 | |
| 1792 |
갈색야생마
|
17년 전 | 1222 | |
| 1791 |
갈색야생마
|
17년 전 | 1419 | |
| 1790 |
갈색야생마
|
17년 전 | 1474 | |
| 1789 |
갈색야생마
|
17년 전 | 1282 | |
| 1788 |
갈색야생마
|
17년 전 | 2566 | |
| 1787 |
갈색야생마
|
17년 전 | 1313 | |
| 1786 |
갈색야생마
|
17년 전 | 1589 | |
| 1785 |
갈색야생마
|
17년 전 | 1465 | |
| 1784 |
갈색야생마
|
17년 전 | 1772 | |
| 1783 |
갈색야생마
|
17년 전 | 1795 | |
| 1782 | 17년 전 | 1806 | ||
| 1781 | 17년 전 | 1854 | ||
| 1780 | 17년 전 | 1513 | ||
| 1779 | 17년 전 | 1605 | ||
| 1778 |
갈색야생마
|
17년 전 | 1513 | |
| 1777 |
갈색야생마
|
17년 전 | 1861 | |
| 1776 |
갈색야생마
|
17년 전 | 1769 | |
| 1775 |
갈색야생마
|
17년 전 | 1566 | |
| 1774 |
갈색야생마
|
17년 전 | 1741 | |
| 1773 |
갈색야생마
|
17년 전 | 1408 | |
| 1772 |
갈색야생마
|
17년 전 | 1640 | |
| 1771 |
갈색야생마
|
17년 전 | 1960 | |
| 1770 |
갈색야생마
|
17년 전 | 2790 | |
| 1769 | 17년 전 | 1997 | ||
| 1768 | 17년 전 | 1410 | ||
| 1767 | 17년 전 | 1950 | ||
| 1766 | 17년 전 | 2405 | ||
| 1765 | 17년 전 | 1561 | ||
| 1764 | 17년 전 | 2326 | ||
| 1763 |
sini117
|
17년 전 | 1761 | |
| 1762 |
sini117
|
17년 전 | 1468 | |
| 1761 |
nooree
|
17년 전 | 1324 | |
| 1760 | 17년 전 | 1996 | ||
| 1759 | 17년 전 | 2884 | ||
| 1758 | 17년 전 | 2503 | ||
| 1757 | 17년 전 | 1529 | ||
| 1756 | 17년 전 | 2875 | ||
| 1755 | 17년 전 | 2410 | ||
| 1754 | 17년 전 | 2754 | ||
| 1753 | 17년 전 | 2766 | ||
| 1752 | 17년 전 | 2556 | ||
| 1751 | 17년 전 | 2368 | ||
| 1750 | 17년 전 | 1728 | ||
| 1749 | 17년 전 | 2462 | ||
| 1748 | 17년 전 | 3960 | ||
| 1747 |
|
17년 전 | 1837 | |
| 1746 | 17년 전 | 3925 | ||
| 1745 | 17년 전 | 1851 | ||
| 1744 | 17년 전 | 1739 | ||
| 1743 | 17년 전 | 2070 | ||
| 1742 | 17년 전 | 2486 | ||
| 1741 | 17년 전 | 1440 | ||
| 1740 | 17년 전 | 1778 | ||
| 1739 | 17년 전 | 2335 | ||
| 1738 | 17년 전 | 1811 | ||
| 1737 | 17년 전 | 1769 | ||
| 1736 | 17년 전 | 1545 | ||
| 1735 | 17년 전 | 1389 | ||
| 1734 | 17년 전 | 1345 | ||
| 1733 | 17년 전 | 1163 | ||
| 1732 | 17년 전 | 1151 | ||
| 1731 | 17년 전 | 1178 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기