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 administration commands
* Main command
Note: We will convert the disk format, is converted to a format you can create LVM
Case
The first step Subdivision, as shown:
Creating partitions
and then need to do a physical volume:
here ".." indicates continuous
at this time to see if there is a physical volumeThe basic unit of the size of each PE 4MB
In this case the logical volume is divided, as shown:
at which time expansion space:
After completion of the addition must be formatted as:
create a mount point:
At this view:
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
Enable file system quota support
Note: usrquota for a user group for grpquota
Edit user and group account quota settings
- -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
- -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 packagesAttachment: Close Enhanced security features, without closing the quota function can not be written
At this time, need to be remounted:
the next node verifies:
At this verification Capacity:
Note: if the take place of ... ... ... file generated fromAs 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