直接挂载虚拟机内为LVM分区的镜像

本文介绍了如何处理虚拟机内部使用LVM分区的情况,详细阐述了挂载LVM分区的步骤和相关命令,帮助读者解决直接挂载镜像的难题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

如果虚拟机内部做了LVM,则直接挂载LVM分区有点麻烦

详细命令如下

[root@centos images]# fdisk -lu lvm-ubuntu.img 
You must set cylinders.
You can do this from the extra functions menu.

Disk lvm-ubuntu.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c848f

         Device Boot      Start         End      Blocks   Id  System
lvm-ubuntu.img1   *        2048      499711      248832   83  Linux
Partition 1 does not end on cylinder boundary.
lvm-ubuntu.img2          501758    20969471    10233857    5  Extended
Partition 2 has different physical/logical endings:
     phys=(1023, 254, 63) logical=(1305, 73, 48)
lvm-ubuntu.img5          501760    20969471    10233856   8e  Linux LVM


通过上面的命令可以看到这个虚拟机镜像内做了LV

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值