Do quota today...

Source: Internet
Author: User

The specific practices have been forgotten...
First, mount the GB hard disk to the machine.
1 first, ensure that the hard drive power cord is correctly connected to the ide, and the power cord cannot be reversed. Otherwise, the hard drive will be burned...
2. the hard disk is automatically searched in the BIOS to ensure that the hard disk has been attached. The hard disk serial number can be displayed for the hard disk size.
3. Pay attention to the/dev/hdx number. For X, we need to judge it based on the ide primary and slave lines. I mounted the GB hard disk to the slave master line, the serial number is/dev/HDC.
4. Create a file system, mkfs-T ext3/dev/HDC.
5. Use fdisk to partition the hard disk. If I have no partitions, I will directly use it as a partition for GB and create a directory so that the hard disk can be mounted to this directory.
6. Modify/etc/fstab to make sure that the modification is correct so that the system will automatically mount the partition after startup. Add usrquota and kgquota after modifying the ults option. Of course, ext3 can also use quota.
7. Restart and check whether the partition added in/etc/fstab can be successfully mounted. Use fdisk-L/dev/HDC to check the related information.
8. The premise is that usrquota has been added to the ults item in/etc/fstab, And it is successfully mounted. to formally start the quota process, first generate two files aquota using quotacheck. user, aquota. group. For quota V1, it should be quota. user and quota. group, but V2 is aquota. user and aquota. group, if quota is generated. user, quota. group, you can use convertquota or something to modify it again (these two files are not text files, so they cannot be modified manually)
9 Add users and groups. Note that the root directory should be set to the new hard disk mounted.
Groupadd Jintao
Useradd Jintao-G sunyard-D/sunyard/Jintao
10. Write a script to enable quotaon-avug upon startup. Call quotaoff-A after shutdown, put it in/etc/rc. d/rc3.d, and start with S99 and K99. The name is the same.
11. Start quota and quotaon-avug.
12. Edit the quota of a single user. Note that redhat9 comes in KB and is edited using edquota-u Jintao. For the block, soft, hard, inode concepts are also too boring. There are many
13. Use repquota-a to check the usage and remaining quota of each user. Use quota-u Jintao to check the use of Jintao. Note the +-symbol in front of each user.
14 Restart the operating system or Remount the file system to make quota take effect
15. The jintao2 user quota is the same as that of Jintao: edquota-P Jintao-u jintao2, which can be used by multiple users, such as edquota-P Jintao-u jintao2 jintao3 jintao4.

The idea is messy. I will try again next time. Now, leave a backup for yourself.
The main Commands are as follows:
Quotaon
Quotaoff
Quota
Quotacheck
Quotastats
Repquota-
Edquota

Most importantly, do not always use the root identity to test whether quota is successful or not, because there is no restriction on root, so it is okay to add content no matter how large it is in any user's directory, switch to this directory and test a large file...
I 've been stuck at this point for a long time, so I'm depressed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.