session 9 - Setting up disk quota in ubuntu

download session 9 - Setting up disk quota in ubuntu

of 11

Transcript of session 9 - Setting up disk quota in ubuntu

  • 7/26/2019 session 9 - Setting up disk quota in ubuntu

    1/11

    Setting up

    DiskQuota

  • 7/26/2019 session 9 - Setting up disk quota in ubuntu

    2/11

    Introduction

    For example, your Linux Server is running outof space in the lesystem because of anabundance of MP3 downloads

  • 7/26/2019 session 9 - Setting up disk quota in ubuntu

    3/11

    Edit your /etc/fstab File

    !he "etc"fstab le lists all the partitions thatneed to be auto#mounted when the systemboots $ou have to alert Linux that %uotas areenabled on the lesystem by editing the"etc"fstab le and modifying the options forthat le system $ou&ll need to add theusr%uota option 'n case you forget the name,the usr%uota option is mentioned in the fstabman pages

  • 7/26/2019 session 9 - Setting up disk quota in ubuntu

    4/11

    Edit your /etc/fstab File

    !he old "etc"fstab loo(ed li(e

    ))'*+ea-.ca3#3/b/#/e#-30a#

    /..a3-12/.2 " ext errors+remount#ro. 0

    4ut your new "etc"fstab should be

    ))'*+ea-.ca3#3/b/#/e#-30a#/..a3-12/.2 " ext errors+remount#ro,usr%uota,grp%uota . 0

  • 7/26/2019 session 9 - Setting up disk quota in ubuntu

    5/11

    Remount the File system

    5diting the "etc"fstab le isn&t enough, Linuxneeds to reread the le to get its instructionsfor "home $ou can do this using the mountcommand with the 6o remount %ualier

    mount 6o remount "

  • 7/26/2019 session 9 - Setting up disk quota in ubuntu

    6/11

    Create the Partition Quota Conguration Files

    !he uppermost directory of the lesystem needsto have an a%uotauser le 7denes %uotas byuser8 and an a%uotagroup le 7denes %uotas by

    group8 or both !he page for %uota lists them atthe bottom

    'n this case 9ust enable per#user %uotas for the

    "home lesystem

    %uotachec( #avugfm

  • 7/26/2019 session 9 - Setting up disk quota in ubuntu

    7/11

    Initialize the Quota Table and check diskuota manually

    uotacheck !a"ugfm

    #ote$:a % all le systems

    :" % "erbos &'rocess(

    :u % users

    :g %grou':f % force check

    :m % remount les system again

  • 7/26/2019 session 9 - Setting up disk quota in ubuntu

    8/11

    Edit the )ser*s Quota Information$

    ed%uota 6u testuser

    From here, you can edit a number of elds

    4loc(s; !he amount of space in 0< bloc(sthe user is currently using

    'nodes; !he number of les the user iscurrently using

  • 7/26/2019 session 9 - Setting up disk quota in ubuntu

    9/11

    Edit the )ser*s Quota Information$

    Soft Limit; !he maximum bloc(s"inodes a%uota user may have on a partition !he role

    of a soft limit changes if grace periods areused

    =ard Limit; !he maximum bloc(s"inodes a%uota user may have on a partition when a

    period is set )sers may exceed a soft limitbut they can never exceed their hard limit

  • 7/26/2019 session 9 - Setting up disk quota in ubuntu

    10/11

    +ther to'ics

    ed%uota 6t 7set grace period for eachlesystem

    rep%uota "home 7lists %uota usage limits ofall users on the systemed%uota 6p user0 user2 user3 user%uotaon #a 7enable %uota8

    %uotao> #a 7disable %uota8

  • 7/26/2019 session 9 - Setting up disk quota in ubuntu

    11/11

    Testing