当前位置:网站首页>lvm logical volume and disk quota
lvm logical volume and disk quota
2022-08-05 06:08:00 【Magic star】
lvm logical volume
lvm Logical Volume
Partition advantages:
- Optimize read and write performance
- Implement disk space quota limits
- Increase repair speed
- Isolate systems and programs
- Installing multiple OS
- Using a different file system
Disadvantages of partitioning:
- Only use one hard drive space
- If the partition must be contiguous space
- If the size of the partition cannot be changed (you cannot change the size at will, deleting the partition will result in data loss)
Do not install graphics at work: in order to reduce hardware resource consumption.
What is a logical volume
Split (logically split) the hard disk or partition into the smallest unit PE, and then form a logical volume (**one PE: 4M**)
Create logical volume
- Have a physical disk: physical volume (partition can be a whole hard disk)
- Combines multiple physical volumes, and the capacity of the volume group is extracted from the physical volumes
- The capacity of creating a logical volume is extracted from the volume group
/dev/sdc represents the entire hard disk
/dev/sdc1 represents a partition
Note: Use the partition as the physical volume, the partition must be in 8e format
1. Create a physical volume
[[email protected] ~]#pvcreate /dev/sdb

2.
[[email protected] ~]#vgcreate vg0 /dev/sdb

3.
[[email protected] ~]#lvcreate -L +15G -n ky22 vg0

4.
The logical volume was created successfully, butStill unable to use
to create a file system, mount 
[[email protected] ~]#mount /dev/vg0/ky22 /mnt
How to expand:
The first case: the original volume group has enough space
The second case: The original volume group does not have enough space
1. The volume group must be expanded first
2, and then the logical volume should be expanded
xfs file format
Extend volume group

[email protected] ~]#vgextend vg0/dev/sdc

Extend Logical Volume

[[email protected] ~]#lvextend-L +10G /dev/vg0/ky22
[[email protected] ~]#xfs_growfs /mnt

or
[[email protected] ~]#lvextend -r -L +2G /dev/vg0/ky22 (ext4 file system can also be used)

Disk Quota
Disk Quota Function:
Disk quota can limit the disk space that can be used by a specified account, which can prevent other users from being unable to work normally or even affect the system operation due to excessive use of disk space by one user.
This feature is very important in server management, but not so meaningful for stand-alone users.
- Function: Improve system security
- Definition: Used disk space for quota limit
- File system: NTFS
边栏推荐
- unity实现第一人称漫游(保姆级教程)
- Contextual non-local alignment of full-scale representations
- spark算子-repartition算子
- 通过单总线调用ds18b20的问题
- IJCAI 2022|Boundary-Guided Camouflage Object Detection Model BGNet
- 函数在开发环境中的应用(简易实例)
- 【UiPath2022+C#】UiPath 练习和解决方案-变量、数据类型和控制流程
- LeetCode刷题之第61题
- 入门文档06 向流(stream)中添加文件
- 硬核!Cocos开发面试必备十问,让你offer拿到手软
猜你喜欢
随机推荐
“元宇宙”是个啥?都有哪些大招?
LeetCode刷题之第129题
如何使用Houdini进行程序化优化?
每日一题-删除链表的倒数第 N 个结点-0718
C语言—扫雷的实现
每日一题-最长回文子串-0714
硬盘分区和永久挂载
Wireshark抓包及常用过滤方法
错误类型:reflection.ReflectionException: Could not set property ‘xxx‘ of ‘class ‘xxx‘ with value ‘xxx‘
C语言入门笔记 —— 函数(1)
unity实现第一人称漫游(保姆级教程)
入门文档01 series按顺序执行
阿里云视频点播
【UiPath2022+C#】UiPath变量和参数
Spark源码-任务提交流程之-6-sparkContext初始化
一个小时教你如何掌握ts基础
Cocos Creator小游戏案例《棍子士兵》
洞察互联网大趋势,读完这篇文章你就彻底了解中文域名
Autoware--北科天绘rfans激光雷达使用相机&激光雷达联合标定文件验证点云图像融合效果
I217-V在openwrt软路由下大流量断网问题
![[Pytorch study notes] 8. How to use WeightedRandomSampler (weight sampler) when the training category is unbalanced data](/img/29/5b44c016bd11f0c0a9110cf513f4e1.png)








