System Administration Guide: Advanced Administration (2024)

Guidelines for Setting Up Quotas

Before you set up quotas, you need to determine how much space and howmany inodes to allocate to each user. If you want to be sure that the totalfile system space is never exceeded, you can divide the total size of thefile system between the number of users. For example, if three users sharea 100-Mbyte slice and have equal disk space needs, you could allocate 33 Mbytesto each user.

In environments where not all users are likely to push their limits,you might want to set individual quotas so that they add up to more than thetotal size of the file system. For example, if three users share a 100-Mbyteslice, you could allocate 40 Mbytes to each.

When you have established a quota for one user by using the edquota command, you can use this quota as a prototype to set thesame quota for other users on the same file system.

Before you turn on the quotas, you must first configure the UFS filesystems for the quotas, establish quotas for each user, and run the quotacheck command to check for consistency between current diskusage and quota files. Also, if systems are rebooted infrequently, it is agood idea to periodically run the quotacheck command.

The quotas you set up with the edquota command arenot enforced until you turn them on by using the quotaoncommand. If you have properly configured the quota files, the quotas are turnedon automatically each time a system is rebooted and the file system is mounted.

Task

Description

For Instructions

1. Configure a file system for quotas

Edit the /etc/vfstab file so that quotas are activatedeach time the file system is mounted, and create a quotasfile.

"How to Configure File Systems for Quotas"

2. Set up quotas for a user

Use the edquota command to create disk quotas and inodequotas for a single user account.

"How to Set Up Quotas for a User"

3. (Optional) Set up quotas for multiple users

Use the edquota command to apply prototypequotas to other user accounts.

"How to Set Up Quotas for Multiple Users"

4. Check for consistency

Usethe quotacheck command to compare quotas to current diskusage for consistency across one or more file systems.

"How to Check Quota Consistency"

5. Turn on quotas

Use the quotaon command to initiatequotas on one or more file systems.

"How to Turn On Quotas"

System Administration Guide: Advanced Administration (1)How to Configure File Systems for Quotas

  1. Become superuser.

  2. Edit the /etc/vfstab file and add rqto the mount options field for each UFS file system thatwill have quotas.

  3. Change directory to the root of the file system that will have quotas.

  4. Create a file named quotas.

    # touch quotas
  5. Change permissions to read/write for root access only.

    # chmod 600 quotas

Examples--Configuring File Systems for Quotas

The following /etc/vfstab example shows that the /export/home directory from the system plutois mounted as an NFS file system on the local system. You can tell quotasare enabled by the rq entry under the mount options column.

#device device mount FS fsck mount mount#to mount to fsck point type pass at boot options#pluto:/export/home - /export/home nfs - yes rq

The following example line from /etc/vfstab showsthat the local /work directory is mounted with quotasenabled, signified by the rq entry under the mount options column.

#device device mount FS fsck mount mount#to mount to fsck point type pass at boot options#/dev/dsk/c0t4d0s0 /dev/rdsk/c0t4d0s0 /work ufs 3 yes rq

System Administration Guide: Advanced Administration (2)How to Set Up Quotas for a User

  1. Become superuser.

  2. Use the quota editor to create a temporary file that contains one lineof quota information for each mounted UFS file system that has a quotas file in the file system's root directory.

    # edquota username

    Where username is the user for whom you wantto set up quotas.

  3. Change the number of 1-Kbyte disk blocks (both soft and hard) and thenumber of inodes (both soft and hard) from 0 (the default) to the quotas youspecify for each file system.

  4. Verify the user's quota.

    # quota -v username

    -v

    Displays the user's quota informationon all mounted file systems where quotas exist.

    username

    Specifies the user name to view quotalimits.

Examples--Setting Up Quotas for a User

The following example shows the contents of the temporary file openedby edquota on a system where /filesis the only mounted file system containing a quotas filein the root directory.

fs /files blocks (soft = 0, hard = 0) inodes (soft = 0, hard = 0)

The following example shows the same line in the temporary file afterquotas have been set up.

fs /files blocks (soft = 50, hard = 60) inodes (soft = 90, hard = 100)

System Administration Guide: Advanced Administration (3)How to Set Up Quotas for Multiple Users

  1. Become superuser.

  2. Use the quota editor to apply the quotas you already established fora prototype user to the additional users you specify.

    # edquota -p prototype-user username ...

    prototype-user

    User name of the account for whichyou have set up quotas.

    username ...

    Specifies one or more user names ofadditional accounts.

Example--Setting Up Prototype Quotas for Multiple Users

The following example shows how to apply the quotas established foruser bob to users mary and john.

# edquota -p bob mary john

System Administration Guide: Advanced Administration (4)How to Check Quota Consistency

Note - To ensure accurate disk data, the file systems being checked shouldbe quiescent when you run the quotacheck command manually.The quotacheck command is run automatically when a systemis rebooted.

  1. Become superuser.

  2. Run a consistency check on UFS file systems.

    # quotacheck [-va] filesystem 

    -v

    (Optional) Identifies the disk quotasfor each user on a particular file system.

    -a

    Checks all file systems with an rq entry in the /etc/vfstab file.

    filesystem

    Specifies the file system to check.

    See quotacheck(1M)for more information.

Example--Checking Quota Consistency

The following example shows how to check quotas for the /export/home file system on the /dev/rdsk/c0t0d0s7 slice.The /export/home file system is the only file systemwith an rq entry in the /etc/vfstabfile.

# quotacheck -va*** Checking quotas for /dev/rdsk/c0t0d0s7 (/export/home)

System Administration Guide: Advanced Administration (5)How to Turn On Quotas

  1. Become superuser.

  2. Turn on file system quotas.

    # quotaon [-v] -a filesystem ...

    -v

    Displays a message for each file systemafter quotas are turned on.

    -a

    Turns on quotas for all file systemswith an rq entry in the /etc/vfstabfile.

    filesystem ...

    Turns on quotas for one or more filesystems that you specify. More than one file system is specified by separatingeach file system name with a space.

Example--Turning On Quotas

The following example shows how to turn quotas on for the file systemson the /dev/dsk/c0t4d0s7 and /dev/dsk/c0t3d0s7 slices.

# quotaon -v /dev/dsk/c0t4d0s7 /dev/dsk/c0t3d0s7/dev/dsk/c0t4d0s7: quotas turned on/dev/dsk/c0t3d0s7: quotas turned on

After you have set up and turned on disk quotas and inode quotas, youcan check for users who exceed their quotas. In addition, you can check quotainformation for entire file systems.

The following table describes the commands you use to check quotas.

Table 17-2 Commands for Checking Quotas

Command

Task

quota

Displays user quotas and current disk use, and information about users whoare exceeding their quotas

repquota

Displays quotas, files, and the amount of space owned forspecified file systems

System Administration Guide: Advanced Administration (2024)
Top Articles
How to View Student Quiz Logs in Canvas
Aggregated Funding Rate — Indicator by EliCobra — TradingView
Average Jonas Wife
Ret Paladin Phase 2 Bis Wotlk
Toyota gebraucht kaufen in tacoma_ - AutoScout24
Emmalangevin Fanhouse Leak
Osrs But Damage
Jessica Renee Johnson Update 2023
Purple Crip Strain Leafly
Craigslist Cars Nwi
2021 Lexus IS for sale - Richardson, TX - craigslist
Les Schwab Product Code Lookup
Slope Tyrones Unblocked Games
History of Osceola County
Missed Connections Dayton Ohio
Lcwc 911 Live Incident List Live Status
Buy Swap Sell Dirt Late Model
Race Karts For Sale Near Me
Full Standard Operating Guideline Manual | Springfield, MO
Katie Sigmond Hot Pics
Free Personals Like Craigslist Nh
Purdue 247 Football
Sand Dollar Restaurant Anna Maria Island
Powerschool Mcvsd
Anonib Oviedo
Rgb Bird Flop
Sacramento Craigslist Cars And Trucks - By Owner
Bfri Forum
Metra Union Pacific West Schedule
Gideon Nicole Riddley Read Online Free
John F Slater Funeral Home Brentwood
Acadis Portal Missouri
Tirage Rapid Georgia
The Transformation Of Vanessa Ray From Childhood To Blue Bloods - Looper
Ksu Sturgis Library
Pepsi Collaboration
Miracle Shoes Ff6
Craigs List Palm Springs
968 woorden beginnen met kruis
Emily Tosta Butt
Sarahbustani Boobs
Courses In Touch
Craigslist Com St Cloud Mn
Iupui Course Search
Interminable Rooms
Caphras Calculator
Gonzalo Lira Net Worth
Rocket League Tracker: A useful tool for every player
Abigail Cordova Murder
Game Like Tales Of Androgyny
Nfhs Network On Direct Tv
Ocean County Mugshots
Latest Posts
Article information

Author: Dan Stracke

Last Updated:

Views: 6229

Rating: 4.2 / 5 (63 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Dan Stracke

Birthday: 1992-08-25

Address: 2253 Brown Springs, East Alla, OH 38634-0309

Phone: +398735162064

Job: Investor Government Associate

Hobby: Shopping, LARPing, Scrapbooking, Surfing, Slacklining, Dance, Glassblowing

Introduction: My name is Dan Stracke, I am a homely, gleaming, glamorous, inquisitive, homely, gorgeous, light person who loves writing and wants to share my knowledge and understanding with you.