8
Junior Level Linux Certification

101 4.4 manage disk quotas

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: 101 4.4 manage disk quotas

Junior Level Linux Certification

Page 2: 101 4.4 manage disk quotas

Exam Objectives

Key Knowledge Areas

Set up a disk quota for a filesystem. Edit, check and generate user quota reports.

Objective 4: Devices, Linux Filesystems, Filesystem Hierarchy Standard

Manage disk quotas Weight: 1

Terms and Utilities

quota edquota repquota quotaon

2

Page 3: 101 4.4 manage disk quotas

Manage disk quotas

quota utility is used to view information about disk usage and user quotas.

quota

3

Quota information can be displayed for all file systems listed in /etc/fstab:this file contains info regarding whether quotas can be used on various file systems.Files used to manage quotas are located in file system root: - quota.user for user accounts - quota.group for group quotas.

Files must be created by superuser and with rw permissions only for superuserThese files are not manually edited when working with quotas.

Quotas are specified at the partition level, which enables control which partitions use quotas and to set these quotas independently of partition.

Page 4: 101 4.4 manage disk quotas

Manage disk quotas

User and group quotas are set individually. When a user creates a new file, that user’s account and group both have ownership of the file. If a user’s group exceedes quota limit, user will be unable to create files, regardless of user’s quota.

quota

4

Option Use-g Displays group quota information.-u Displays user quota information. This is the default action.-v Displays quotas on file systems with no storage allocated.-q Displays information for file systems with usage exceeding the quota.

# quota angieDisk quotas for user angie (uid 501): none

Ex:

Page 5: 101 4.4 manage disk quotas

Manage disk quotas

edquota is used by the superuser to edit user and group quotas.

edquota

5

Option Use-u Specifies to edit the user quota. This is the default action.-g Specifies to edit the group quota.-p user Duplicates the quotas of the user specified for each user specified.-t Used to edit the grace period used for soft limits for each file system.

# edquota –p jason –u angieEx:

utility to set 3 different quota limits:

1.soft limit – limit that can be exceeded for a period of time. 2.grace period - period of time in which a user can exceed their soft limit. 3.hard limit - limit at which a user can no longer create new files.

Page 6: 101 4.4 manage disk quotas

Manage disk quotas

repquota displays summary of the disk usage and quotas for the specified file systems.

repquota

6

Option Use-a Displays information on all file systems indicated in /etc/fstab with quotas.

-v Displays information for all quotas, even if there is no usage.

-g Displays quota information for groups.

-u Displays quota information for users. This is the default.

# repquota –v /*** Report for user quotas on / (/)

Block limits File limitsUser used soft hard grace used soft hard graceroot -- 8 0 0 1 0 0

Ex:

Page 7: 101 4.4 manage disk quotas

Manage disk quotas

quotaon and quotaoff are used to enable and disable file system quotas.

quotaon and quotaoff

7

Option Use with quotaon Use with quotaoff

-a Enables quotas for all file systems in Disables quotas for all file systems/etc/fstab that are configured listed in /etc/fstab.with read/write quotas.

-v Displays a message for each Displays a message for each filefile system with quotas enabled. system affected.

-u Enables user quotas; Disables user quotas; this is thethis is the default action. default action.

-g Enables group quotas. Disables group quotas.

quota.user and quota.group files must exist before you can run the quotaon

Page 8: 101 4.4 manage disk quotas

Fim de sessão

8