1 / 8

Linux 基礎學習

Linux 基礎學習. Chapter 15 Quota VBird 2005/09/08. 什麼是 Quota. 什麼是 Quota 用來限制使用者使用磁碟空間的一個機制; 可以讓使用者使用資源更為公平; 一般用途: 針對 WWW server ,例如:每個人的網頁空間的容量限制! 針對 mail server ,例如:每個人的郵件空間限制。 針對 file server ,例如:每個人最大的可用網路硬碟空間。. Quota 的一般限制. 限制: 僅能針對單一 partition ,而非針對某個 directory

danika
Download Presentation

Linux 基礎學習

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linux 基礎學習 Chapter 15 Quota VBird 2005/09/08 Linux基礎--Quota

  2. 什麼是 Quota • 什麼是 Quota • 用來限制使用者使用磁碟空間的一個機制; • 可以讓使用者使用資源更為公平; • 一般用途: • 針對 WWW server ,例如:每個人的網頁空間的容量限制! • 針對 mail server,例如:每個人的郵件空間限制。 • 針對 file server,例如:每個人最大的可用網路硬碟空間。 Linux基礎--Quota

  3. Quota 的一般限制 • 限制: • 僅能針對單一 partition ,而非針對某個 directory • 僅支援 Linux 的標準檔案格式,如 ext2/ext3 等 • 核心必須要支援 quota 相關參數 • 在設定的 partition 最頂層目錄下,會有 aquota.user 及/或 aquota.group • 僅對一般身份者有效。 • ps: 故在系統規劃之初,就應該將磁區預留! Linux基礎--Quota

  4. Quota 的一般限制(續) • Quota 可以限制的項目: • partition 的參數: • blocks (單位為 1KBytes) • inodes (單位為『個數!』) • soft/hard 的差異: • hard 為最嚴格的限制,使用者的可用容量不可超過; • soft 為寬限警告值,可超過 soft 但不可超過 hard。 • 超過 soft 未達 hard 時,使用者登入後,會取得警告訊息。 • 寬限時間: • 與上面的 soft/hard 有關,在 hard/soft 之間時,這個寬限時間的設定值才會生效! • 警告使用者在寬限時間內將容量刪除至低於 soft ! Linux基礎--Quota

  5. Quota 的設定: • quota 啟動的流程: • 設定 filesystem 支援 quota • 編輯 /etc/fstab ,加入 usrquota 與 grpquota /dev/hda8 /mnt/hda8 ext3 defaults,usrquota,grpquota 1 2 • 必須啟動,使正確的資訊寫入 /etc/mtab 內; • 注意, quota 主要是看 /etc/mtab 啊! • 啟動的方式: • reboot • mount -o remount /mount_point • 建立 quota 記錄檔 (aquota.[user|group]) • quotacheck -avug • 觀察 mount point 目錄內容! Linux基礎--Quota

  6. Quota 的設定:(續) • quota 啟動的流程:(續) • 啟動 quota 這個玩意兒: • quotaon -avug • 編輯使用者的 quota 限值: • edquota -u username • edquota -g groupname • edquota -p user1 user2 • edquota -t Linux基礎--Quota

  7. Quota 的設定:(續) • quota 啟動的流程:(續) • 查閱 quota 設定值: • quotacheck -avug • quota -vu username • quota -vg groupname • repquota -avug Linux基礎--Quota

  8. Quota 的設定:(續) • 練習: • 將班上主機剩餘的空間格式化為 ext3 • 將上述 partition 掛載到 /mnt/quota 中 • 利用 quota 的所有指令建立 novell 這個使用者的 quota ,限制為 30 MB • 將 novell 的 quota 資訊複製給 lcc • 將 quota 的報表列出 Linux基礎--Quota

More Related