cloudstack-users-cn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jijun <jiju...@gmail.com>
Subject Re: 如何挂载qcow2 镜像文件中的的 lvm 分区
Date Sat, 29 Jun 2013 09:02:20 GMT
On 06/28/2013 06:49 PM, Ningning Li wrote:
> 一个qcow2格式的文件vm07.qcow2 ,里面有lVM分区,如果挂载呢?
>
> # modprobe nbd max_part=16
>
> # qemu-nbd -c /dev/nbd0 vm07.qcow2
>
> # partprobe /dev/nbd0
>
> # fdisk -ul /dev/nbd0
>
> Disk /dev/nbd0: 180.4 GB, 180388626432 bytes
>
> 255 heads, 63 sectors/track, 21931 cylinders, total 352321536 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: 0x0007e2d5
>
>
>      Device Boot      Start         End      Blocks   Id  System
>
> /dev/nbd0p1   *        2048     1050623      524288   83  Linux
>
> Partition 1 does not end on cylinder boundary.
>
> /dev/nbd0p2         1050624     9439231     4194304   82  Linux swap /
> Solaris
>
> Partition 2 does not end on cylinder boundary.
>
> /dev/nbd0p3         9439232    37748735    14154752   8e  Linux LVM
>

你可以先active
lvchange -ay /dev/VolGroup/lv_root
然后在执行挂载:
mount /dev/VolGroup/lv_root /mnt



-- 
Thanks,
Jijun


Mime
View raw message