In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the setting method of disk quota under Redhat Linux system". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "the setting method of disk quota under Redhat Linux system".
Quotas make it impossible for individual users and groups to occupy all the space of the partition. You can configure quotas by limiting the number of inode, where each inode is associated with a specific file, or you can set an absolute limit (number of KB).
By default, readhat installs and activates the quota rpm package. If you're not sure, you can run the command: rpm-Q quota.
Quotas are usually activated in the kernel.
To use quotas for specific users, there are six steps:
one. Modify / etc/fstab to activate quota options for the selected file system
two. Remount the file system for the changes to take effect
three. Create an aquota.user file at the beginning of the file system.
four. Scan the corresponding file system and generate basic quota files with the quotacheck command
five. Use the edquota command to impose quota restrictions on specific users
six. Finally, activate the quota with the quotaon command.
The following is an example of how to impose a disk quota limit on user test under / partition:
Modify / etc/fstab
# vi / etc/fstab, in
LABEL=/ / ext3 defaults 1 1 line activates the disk quota, and the modified result is as follows:
LABEL=/ / ext3 defaults,usrquota 1 1
After saving and exiting.
Remount the file system for the changes to take effect
Reactivation / etc/fstab change: # mount-o remount /
Create an aquota.user file
The easiest way to generate the aquota.user file under the / partition is to use the touch command:
Touch aquota.user, modify the permissions of the aquota.user file to allow only root users to access:
Chmod 600 aquota.user
Conduct a quota check
You can use the quotacheck-avum command to generate the appropriate quota file.
-a: scan for file systems that support quotas in / etc/fstab
-v: generate lengthy output
-u: check user quota
-m: remount the scanned file system
Set quotas on user test
Run the following command: edquota test
LABEL=/ / ext3 defaults,usrquota 1 1
Disk quotas for user test (uid 501):
Filesystem blocks soft hard inodes soft hard
/ dev/hda2 20 100000 0 6 00
~
Make inodes soft hard settings.
Enable quota
# quotaon / (quota setting for quotaoff / can be cancelled / partition)
At this point, the quota setting for test users for the / partition is complete.
You can copy the same restrictions to other users (kk tt) with the following command:
# edquota-up test kk tt
In addition, use the repquota command to monitor quota usage.
Undefinedundefined
At this point, I believe you have a deeper understanding of "the setting method of disk quota under the Redhat Linux system". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.