当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
2020,Laya最新中高级面试灵魂32问,你都知道吗?
LeetCode刷题之第61题
入门文档12 webserve + 热更新
【UiPath2022+C#】UiPath数据类型
什么是全栈设计师?
【Day5】软硬链接 文件存储,删除,目录管理命令
入门文档07 分阶段输出
spark算子-textFile算子
【Day8】使用LVM扩容所涉及的命令
C语言入门笔记 —— 初识
Unity huatuo 革命性热更系列1.3 huatuo示例项目源码分析与启发
Remembering my first CCF-A conference paper | After six rejections, my paper is finally accepted, yay!
每日一题-合并两个有序链表-0720
快问快答—腾讯云服务器常见问题解答
【Day6】文件系统权限管理 文件特殊权限 隐藏属性
一个小时教你如何掌握ts基础
C语言程序死循环问题解析——变量被修改
【3D模型教程】ZBrush如何表现皮肤纹理?
【UiPath2022+C#】UiPath控制流程概述
framebuffer应用编程及文字显示(1)









