Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Google Cloud Platform icon
Labs

Linux User Management: Configuring Group Disk Quotas

User and group disk quotas set limits on how much storage a user can consume. Quotas are important to preventing users from consuming all of the disk space on a system. In this lab, students will install the `quota` package and learn to configure group and user quotas for a filesystem.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Intermediate
Last updated
Aug 03, 2025
Duration
30m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Create the app Group as Well as appuser1 and appuser2, and Set the app Group as the Primary Group for Both Users
    # groupadd app
    # useradd -g appuser1
    # useradd -g app appuser2
    
  2. Challenge

    Create a Filesystem on One of the 2 GB Drives Configured on the System

    Check to see what disks are available:

    # lsblk
    

    Create a partition on the /dev/xvdb disk:

    # fdisk /dev/xvdb
    Welcome to fdisk (util-linux 2.23.2).
    
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.
    
    Device does not contain a recognized partition table
    Building a new DOS disklabel with disk identifier 0xb3c6ea84.
    
    Command (m for help): n
    Partition type:
      p   primary (0 primary, 0 extended, 4 free)
      e   extended
    Select (default p): p
    Partition number (1-4, default 1):
    First sector (2048-4194303, default 2048):
    Using default value 2048
    Last sector, +sectors or +size{K,M,G} (2048-4194303, default 4194303):
    Using default value 4194303
    Partition 1 of type Linux and of size 2 GiB is set
    
    Command (m for help): w
    The partition table has been altered!
    
    Calling ioctl() to re-read partition table.
    Syncing disks.
    

    Run the partprobe command to ensure the partition table has been updated:

    # partprobe
    

    Create an ext4 filesystem on the /dev/xvdb1 partition:

    # mkfs -t ext4 /dev/xvdb1
    
  3. Challenge

    Create the Directory for the Mount Point and Change the Group to app
    # mkdir /app
    
  4. Challenge

    Configure /etc/fstab with the UUID of /dev/xvdb1, Mount the Filesystem, and change the group of the filesystem to app.

    Get the UUID for /dev/xvdb1:

    # blkid /dev/xvdb1
    /dev/xvdb1: UUID="d6a5691b-a045-463f-bf2b-74d0c71895e2" TYPE="ext4"
    

    Paste the UUID into the /etc/fstab file with the following options:

    # vim /etc/fstab
    UUID=d6a5691b-a045-463f-bf2b-74d0c71895e2       /app    ext4    defaults,grpquota       1       2
    

    Mount newly added filesytems configured in /etc/fstab:

    # mount -a
    

    Change the group of the /app filesystem to app:

    # chgrp app /app
    
  5. Challenge

    Install the quota Package, Create the Quota Files for the /app Filesystem, and Generate the Table of Current Disk Usage for Each Filesystem

    Install the quota package:

    yum install -y quota
    

    Create the quota files for the /app filesystem:

    quotacheck -cug /app
    

    Generate the table of current disk usage per filesystem:

    quotacheck -avug
    
  6. Challenge

    Assign a Soft Quota of 512 KB and a Hard Quota of 1M (1024KB) to the app Group, Then Turn Quotas on and Check the Group Quota Configuration for /app

    Assign a soft quota of 512 KB and a hard quota of 1M (1024KB) to the app group:

    $ edquota -g app
    Disk quotas for group app (gid 1004):
      Filesystem                   blocks       soft       hard     inodes     soft     hard
      /dev/xvdb1                        4        512       1024          1        0        0
    

    Turn quotas on for the filesystem:

    $ quotaon -vug /app
    

    Verify the group quota configuration for /app:

    $ repquota -g /app
    *** Report for group quotas on device /dev/xvdb1
    Block grace time: 7days; Inode grace time: 7days
                            Block limits                File limits
    Group           used    soft    hard  grace    used  soft  hard  grace
    ----------------------------------------------------------------------
    root      --      16       0       0              1     0     0       
    app       --       4     512    1024              1     0     0       
    
    
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight