当前位置:网站首页>Explanation of dev/mapper
Explanation of dev/mapper
2022-06-25 14:37:00 【qq_ forty-two million five hundred and thirty-three thousand tw】
Two 、/dev/mapper The explanation of the catalog
For the convenience of narration , Suppose a server has three hard disks, which are a,b,c, The capacity of each hard disk is 1T. In the installation Linux When , First, establish basic partitions according to the needs of the system and itself , Suppose for the hard disk a It was partitioned , Out 0.1T The space is mounted in /boot Under the table of contents , Other hard disks are not partitioned . System utilization Device mapper The mechanism establishes a volume group (volume group,VG), You can take VG Think of it as a resource pool , Last in VG Create a logical volume above (logical volume,LV). To remove the hard disk a Remaining space of 、 Hard disk b And the hard disk c All joined VG in , Then the hard disk a The remaining space will first be established by the system as a physical volume (physical volume,PV), And the size of the physical volume is 0.9T, Then the hard disk a The rest of the space 、 Hard disk b And the hard disk c With PV Join as VG In this resource pool , Then how much space do you need , You can start from VG How much space is set aside in the ( Of course, the maximum can not exceed VG The capacity of ). Compared with this, the space in the pool is 2.9T, At this point, you can build a 1T The above space comes out , Unlike before, the maximum capacity space can only be 1T.
/dev/mapper/Volume-lv_root I mean, you have a VG (volume group The volume group ) called Volume, This Volume There's a LV called lv_root. Actually this /dev/mapper/Volume-lv_root File is a connection file , Is connected to /dev/dm-0 Of , You can order ll /dev/mapper/Volume-lv_root To view the .
In fact, in the system /dev/Volume/lv_root and /dev/mapper/Volume-lv_root as well as /dev/dm-0 It's all one thing , Can be treated as a partition .
To understand the specific situation of the hard disk , It can be done by fdisk perhaps pvdisplay Command to view .
If you want to reinstall the system to /dev/sda Next , And during installation, some things do not want to be formatted and want to be transferred to /dev/sdb Next , But this time /dev/sda and /dev/sdb Be put in VG It's in , How to solve this problem ? In this case , Because there is no way to determine which hard disk the data is on , Because these two hard disks are like adding to the pool , By Device mapper management , So the solution is to create another logical volume , Move the data to a new volume , In this way, when you reinstall the system, you can delete only the things in the previous partition , And the things in the new volume don't move , It won't be lost .
/vm_data/openstack/nova/instance/instance-000008a9]$ ll
total 216080
-rw-r--r-- 1 nova nova 28744 Jun 17 14:53 console.log
-rw-r--r-- 1 nova nova 221249536 Jun 23 10:39 disk
lrwxrwxrwx 1 nova nova 52 Jun 17 14:52 disk.local -> /dev/raidVG/eph_d03ab0ae-09b6-43e5-a9e0-2dc4acf4dfd8
-rw-r--r-- 1 nova nova 1790 Jun 17 14:52 libvirt.xml
/dev/mapper/ Contents under the directory
/dev/mapper]$ ll |grep d03ab0ae
lrwxrwxrwx 1 root root 8 Jun 22 18:14 raidVG-eph_d03ab0ae--09b6--43e5--a9e0--2dc4acf4dfd8 -> ../dm-18
lrwxrwxrwx 1 root root 8 Jun 17 14:52 raidVG-eph_d03ab0ae--09b6--43e5--a9e0--2dc4acf4dfd8--linear -> ../dm-20
lrwxrwxrwx 1 root root 8 Jun 17 14:52 raidVG-eph_d03ab0ae--09b6--43e5--a9e0--2dc4acf4dfd8--meta -> ../dm-19
lvdisplay
--- Logical volume ---
LV Path /dev/raidVG/eph_d03ab0ae-09b6-43e5-a9e0-2dc4acf4dfd8-meta
LV Name eph_d03ab0ae-09b6-43e5-a9e0-2dc4acf4dfd8-meta
VG Name raidVG
LV UUID HExptR-uUCG-rfdd-RUFz-p9y2-wPuQ-6df7Yo
LV Write Access read/write
LV Creation host, time qd01-cp-compute111007151.qd01.ksyun.com, 2022-06-17 14:52:10 +0800
LV Status available
# open 1
LV Size 4.00 MiB
Current LE 1
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:19
边栏推荐
- [HBZ sharing] use of locksupport
- JS Base64 Library Learning
- Extend JS copy content to clipboard
- 【中國海洋大學】考研初試複試資料分享
- Classifier and cross entropy loss function
- For the first time in China, Chinatelecom 5g underground personnel positioning project is officially commercial: it can track the position in real time to ensure operation safety
- shell 内置命令
- Stream竟然还有应用进阶学习?作为程序员的你知道吗
- The best screenshot tool in the world, color absorption tool snipaste
- New good friend Pinia, leading the new era of state management
猜你喜欢
[untitled]
Partager les points techniques de code et l'utilisation de logiciels pour la communication Multi - clients socket que vous utilisez habituellement
Kubernetes 理解kubectl/调试
程序员为什么要软一点?
Uniapp cloud packaging app
shell 变量 入门
The best screenshot tool in the world, color absorption tool snipaste
JGG | 河北大学杜会龙组综述植物泛基因组学研究
JVM uses tools to analyze classic cases of OOM
112页机器学习-数学基础回顾.pptx
随机推荐
Application of TSDB in civil aircraft industry
Laravel8 implementation of picture verification code
开餐馆
Logistic Regression VS Linear Regression
[world history] Episode 1: people in the Stone Age
shell 运算符
Typescript and go --- essence
【深度学习】多标签学习
"Mobile cloud Cup" computing power network application innovation competition is in hot registration!
Encapsulating functions and event handling
Garbage collection mechanism
全国首例,中国电信 5G 井下人员定位项目正式商用:可实时跟踪位置,保障作业安全
[Ocean University of China] Data Sharing for retest of initial Examination
Shell operator
Shell built-in commands
Ideal L9 in the eyes of the post-90s: the simplest product philosophy, creating the most popular products
Add the resources directory under test in idea
'NVIDIA SMI' is not an internal or external command, nor is it a runnable program or batch file
dmsetup命令
Two methods to rollback the code in pycharm to the specified version (with screenshot)