Experiment: Migrating the/home partition
Requirements: 1. Add a 20GB SCSI disk to the virtual machine
2. Create a 10GB partition on the new hard drive, and store all the normal user's host folders
3. The newly created partition is still attached to the/home directory, importing the data of the original user in the system
4. The server automatically mounts the partition on the secondary boot
Environment: VMware Workstation 14. redhad-server-6.4
Idea: Transfer the contents of the original/home directory and do a backup
Modify the partition mount settings in the/etc/fstab file
Mount the newly created partition to the/home directory by pressing the settings in the/etc/fstab file
Copy the backed up user data to the newly mounted/home file system
Configuration steps:
1. Add a 20GB SCSI disk to the virtual machine
2. Create a 10GB partition on the new hard drive, and store all the normal user's host folders
3. The newly created partition is still attached to the/home directory, importing the data of the original user in the system
手动挂载不需要重启就会生效,但是是临时的,重启后就会失效;若要每次开机后都能挂载,就需要自动挂载。
4. The server automatically mounts the partition on the secondary boot
Auto Mount
The automatic mount succeeds and the reboot takes effect.
It can be mounted automatically without manual mounting, but be sure to find the mounted file or directory. In this experiment, I appeared in the following diagram of the problem, auto-mount after the restart can not find the user, because the user's host directory was previously modified, so to choose the appropriate mount mode with the environment, is not automatically mounted before the manual to take effect.
Case study: LVM volume management and quota setup
Requirements Description: 1. Using LVM Disk Management scheme
2. In the virtual machine environment, add two SCSI hard disk devices, complete the hard drive detection and partition
3. Set up the logical volume MBOX, format it to the EXT4 file system, mount it to the/mailbox directory
4. Set up and enable disk quotas
5. Enable quota support for file systems mounted to the/mailbox directory
6. Limit user jerry can use up to 500MB of disk space
7. Limit user totals for ACCP groups to use up to 4GB of disk space
Environment: VMware Workstation 14. redhad-server-6.4
Implementation ideas: Adding disk quota support to LVM volumes
Set up and enable disk quotas
Verify the disk quotas feature to limit the disk space that users use
Configuration steps:
1. In the virtual machine environment, add two SCSI hard disk devices, complete the hard drive detection and partition
2. Using the LVM Disk Management scheme
3. Set up the logical volume MBOX, format it to the EXT4 file system, mount it to the/mailbox directory
4. Set up and enable disk quotas
Detect disk quotas and generate quota files
You can use the Quotachek command to perform disk quota detection on a specified file system, or to establish a quota file to hold the user's quota settings in that partition.
To automatically scan the available file systems, you can not specify a detection object,
Such as: Scan the system for all file systems, and support quotas for the file system to establish quota files.
QUOTACHECK–AUGCV (Combo option)
-a means that all partitions are scanned –u–g represents scan user and group quota information
-C indicates the creation of a new quota file, and the details are displayed during the-V execution
5. Enable quota support for file systems mounted to the/mailbox directory
Edit quota settings for user and group accounts
Quota settings are an important part of implementing disk quotas, and using the Edquota command-combined with the-U–G option allows you to edit the quota settings for users and groups. When the Edqouta command is executed correctly, it will go to the text file editing interface (default call VI), but set the disk capacity and the soft and hard limit value of the file size.
6. Limit user jerry can use up to 500MB of disk space
7. Limit user totals for ACCP groups to use up to 4GB of disk space
Toggle Jurry user Authentication disk quotas
Switch User Cisco authentication disk quotas
Disk Configuration in Linux