In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
LVM and disk quota
Experimental requirements
1. Mount with lvm logical volumes (40G) and verify using / dev/vg01/lv01 / abc
two。 Expand lv01 to 60G (online expansion): verification
3. Set disk quotas for tom users: authentication (dd)
4. Add tom to the finance group (caiwu), set a quota for the finance group (smaller than tom's), and verify whether the small quota is effective! Verification
Create a physical volume
[root@dyh ~] # pvcreate / dev/sdb1 / dev/sdc1
Physical volume "/ dev/sdb1" successfully created.
Physical volume "/ dev/sdc1" successfully created.
Create a volume group
[root@dyh ~] # vgcreate vg01 / dev/sdb1
Volume group "vg01" successfully created
Expand volume group
[root@dyh ~] # vgextend vg01 / dev/sdc1
Volume group "vg01" successfully extended
Create a logical volume
[root@dyh ~] # lvcreate-L 20g-n lv01 vg01 creates a logical volume lv01 with a size of 20G from vg01
Logical volume "lv01" created.
Format logical volumes
[root@dyh ~] # mkfs.xfs / dev/vg01/lv01
Experimental requirement one
Mount logical Volume
Experimental requirement two
Remount logical volume / dev/vg01/lv01 and add quota support
[root@dyh] # mount-o usrquota,gropquota / dev/vg01/lv01
Mount: / dev/mapper/vg01-lv01 has been mounted or / abc is busy
/ dev/mapper/vg01-lv01 has been mounted on / abc
[root@dyh ~] # chmod 777 / abc
[root@dyh ~] # vi / etc/fstab
[root@dyh] # mount-a
Experimental requirements three
Set disk quotas for users
[root@dyh] # xfs_quota-x-c 'limit-u bsoft=1M bhard=2M isoft=2 ihard=4 tom' / abc
Inspection
I. disk space
two。 Number of Fil
Create a group
[root@dyh ~] # groupadd caiwu
[root@dyh] # usermod-g caiwu tom changes the basic group of Tom to caiwu
[root@dyh ~] # groups tom
Tom: caiwu
Experimental requirement four
Set the disk quota for the group
[root@dyh] # xfs_quota-x-c 'limit-g bsoft=1M bhard=3M isoft=2 ihard=3 caiwu' / abc
Tom is 2m, caiwu is 3m, and the result is that 2m is effective.
Two. number of files
The limited quantity of Tom is 4 and the limited number of caiwu is 3. As a result, 3 of caiwu takes effect.
Conclusion: disk quota for users and groups, small effective
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.