LVM and disk quotas

LVM and disk quotas

A, LVM Overview

LYM is the Linux system to a logical disk partition management mechanism, which is based on the hard disk and the partition, a file system under the logical layer, the lower layer disk partition layout screen when a file system, it is possible to maintain dynamic disk capacity adjustment in the case of existing data unchanged, thereby increasing the flexibility of disk management.

  • Logical Volume Manager, logical volume management
    • Dynamic adjustment disk capacity, disk management to improve flexibility
    • / Boot partition for storing boot files can not be created on LVM
    • Graphical Interface Management
    • system-config-lvm
  • The basic concept of the mechanism of LVM

    • PV (physical volume)
    • VG (volume group)
    • LV (Logical Volume)
      LVM and disk quotas

      LVM administration commands

      * Main command

      LVM and disk quotas
      LVM and disk quotas

      Note: We will convert the disk format, is converted to a format you can create LVM

      Case

      LVM and disk quotas
      LVM and disk quotas
      LVM and disk quotas
      The first step Subdivision, as shown:
      LVM and disk quotas
      Creating partitions
      LVM and disk quotas
      LVM and disk quotas
      LVM and disk quotas
      LVM and disk quotas
      and then need to do a physical volume:
      LVM and disk quotas
      LVM and disk quotas
      here ".." indicates continuous
      at this time to see if there is a physical volume
      LVM and disk quotas
      LVM and disk quotas
      LVM and disk quotas

      The basic unit of the size of each PE 4MB

      In this case the logical volume is divided, as shown:
      LVM and disk quotas
      LVM and disk quotas
      LVM and disk quotas
      LVM and disk quotas
      at which time expansion space:

LVM and disk quotas
After completion of the addition must be formatted as:
LVM and disk quotas
create a mount point:
LVM and disk quotas
LVM and disk quotas
LVM and disk quotas
At this view:
LVM and disk quotas

carry out!

Disk quotas

Achieve conditions disk quota

  • Linux kernel support needed
  • Installation xfsprogs and quota package

    Features Linux disk quota

  • Range: for a specified file system (partition)
  • Restrictions target: user accounts, group accounts
  • Limit Type: disk capacity, the number of files
  • Restriction method: soft limit, hard limit
    LVM and disk quotas

    Enable file system quota support

    LVM and disk quotas

    Note: usrquota for a user group for grpquota

    Edit user and group account quota settings

    LVM and disk quotas

  • -u Specifies the user
  • -g specified group account
  • -x Enable Expert Mode
  • Use -c command

    Verify Disk quota feature

    • Switch to set the quota partition (mount directory)
    • Creates a specified number of files: use the touch command, or cp command
    • Create a file designated capacity: Use the dd command, or cp command

      Check quota usage

      LVM and disk quotas

  • -a View all
  • -u user view
  • -g View Group
  • -b output report
  • -i View node information

    Case:

    Node capacity disk quota soft limit hard limit
    viewing installed packages
    LVM and disk quotas
    LVM and disk quotas

    Attachment: Close Enhanced security features, without closing the quota function can not be written

    LVM and disk quotas
    LVM and disk quotas
    LVM and disk quotas
    At this time, need to be remounted:
    LVM and disk quotas
    the next node verifies:
    LVM and disk quotas
    LVM and disk quotas
    At this verification Capacity:
    Note: if the take place of ... ... ... file generated from
    LVM and disk quotas
    LVM and disk quotas

    As long as there is a limit of two kinds of ultra-limit, it can not be written to use.

    This chapter concludes:

    Dynamic disks using LVM scheme, the flexibility to expand disk space, the basic process of creating and using LVM scheme:

  • Create a physical volume
  • Create a volume group
  • Creating a Logical Volume
  • Format File System
  • Hanging in

Guess you like

Origin blog.51cto.com/14481836/2431243