Connect with us

Hi, what are you looking for?

Linux

Linux Disc Quotas for CentOS 7

What is Disk Quotas?

Quotas are used to restrict the amount of hard disk space occupied by a user or a group.

  • Group level quota can only be applied to primary groups.
  • Quotas only be applied on quota enabled partition.

Quotas can be applied in two ways:

  1. Based on the number of inodes (number of files ).
  2. Based on the number of blocks (volumes of hard disk space).

To check the block size use the command blockdev – getbsz <partition>

Quotas Limits

There are two Quotas limits:

  1. Soft – Soft quota limits will only warn the user that they have reached their quota limits.
  2. Hard – Hard quota limits will not allow the user to create any more files or directories once the quota limit has been reached.

Steps to Apply Quotas

  1. Create a new partition.
  2. Format the partition.
  3. Create an directory.
  4. Mount the partition on the directory with quotas enabled.
  5. Give full permissions to the partition.
  6. Create the quota database file.
  7. Turn on the quotas.
  8. Assign the quotas to the users or groups.
  9. Applying Quotas on a Partition

To mount the partition with quotas enabled

[root@techbrown.com~]# mount –o usrquota, grpquota <partition name > <mount point>

Generate the quotas database file

[root@techbrown.com~]# quotacheck –cugv <mount point>

Options
-c Create new database -g Group
-u user -v Verbose

Turn on the quota

[root@techbrown.com~]# quotaon < mount point>

Assigning quotas to users and groups

[root@techbrown.com~]# edquota –u <user name >

Or

[root@techbrown.com~]# edquota –g <group name>

Disk Quotas for user <username > (uid <uid>)

Filesystem blocks soft Hard inodes soft hard

/dev/hda9 0 0 0 0 0 0

Congratulations now you have assigning the Disc Quotas.

Advertisement. Scroll to continue reading.
Comments
Advertisement
Advertisement

Linux

In this tutorial we will configure ISCSI Target Server on CentOS 8 / RHEL 8. ISCSI stands for Internet Small Computer Systems Interface.  This...

Linux

In this tutorial we will configure SELinux Modes on CentOS 8 / RHEL 8. SELinux stands for Security-Enhanced Linux and it is developed by...

Linux

DNF stands Dandified YUM and this is the default package manager for RHEL 8 / CentOS 8.  This tutorial explains you how to create...

Linux

If you forget a root password of your RHEL 8 and CentOS 8 and want to reset the password so that the RHEL 8...

Windows

How to auto upgrade JioFi firmware for JioFi 2 / JioFi 3 / JioFi 4 / JioFi 5 / JioFi 6 and other JioFi...

Advertisement

You May Also Like

Windows

How to auto upgrade JioFi firmware for JioFi 2 / JioFi 3 / JioFi 4 / JioFi 5 / JioFi 6 and other JioFi...

Windows

Internet is the most important public network for connecting to the WEB. For internet connection requirement the ISP is required as well as it...

Windows

How to download and install the Mobile Intel 4 Series Express Chipset Graphics Drivers for Windows 10.  Windows 10 is the one of the...

Windows

How to Install and Configure PCSX2 on Windows 10. The Windows 10 is the most recommended operating system for the Games. In stream platform...