Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

LVM volume management and quota setting

2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Experimental case: LVM volume management and quota setting

Experimental environment: the company is going to build a mail server (REHL5 system platform) in Internet to provide email space for employees and some VIPK customers all over the country. Considering the need of dynamic expansion, it is planned to add two SCSI hard drives and build LVM logical volumes to store mail data, and limit users' mailbox space by disk quota.

Requirement description: using LVM disk management solution

Set and enable disk quotas

Recommended steps:

1 add disk devices and establish LLVM disk management scheme

Add two SCSI hard disk devices and complete hard disk detection and partition

Fdisk / dev/sdb: can enter the interactive zoning interface

N: new partition p: list disk partition t: change partition type w: save partition operation

And so on, complete the / dev/sdc partition

Partprobe: make the operating system detect the new partition table (after changing the partition settings of the disk, it is recommended that you restart the system or execute "partprobe / dev/sdb")

Fdisk-l: can be viewed. Confirm the device name and location of the new hard drive

Convert / dev/sdb1 and / dev/sdc1 Oh partitions to physical volumes

Consolidate the two physical volumes to create a volume group named mail_store

Create a logical volume named mbox in the mail_store volume group and set the capacity (as needed)

Use the mkfs command to format the logical volume mbox, create an EXT3 file system, and mount it to the / mailbox directory

2 add quota support

In the REHL5 system, the kernel has customized the disk quota function of the linux file system, and the quota package is installed by default in the system.

Confirm the installation of the quota package and list the quota management programs installed by the quota package

Modify the mount settings in the etc/fstab file and add usrquota grpquota parameters

Re-mount the logical volume mbox to the mailbox directory and add usrquota grpquota quota support

Use the quotasheck command to establish quota support in the / mailbox file system

3 set and enable disk quotas

Use the edquota command to set disk quotas for terry users and accp groups

Compile the quota for user terry

Compile the accp group

Use the quota command to enable disk quotas

4 verify disk quota function

Log in to the / mailbox directory using the user account in the jerry user accp group, and use the dd command to verify the quota function

Test using the dd conversion tool

The Dd command is a device conversion and copy command

Use the requota command to view the disk quota usage of the / mailbox file system

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report