本文共 1268 字,大约阅读时间需要 4 分钟。
xen nfs挂载
How to attach and mount Xen DomU’s disk partitions on without Xen?
如何在没有Xen的上附加和挂载Xen DomU的磁盘分区?
You can use to create devices from the VM disk (say, ./vmdisk0).
您可以使用从VM磁盘 (例如./vmdisk0)创建设备。
To activate all the partitions in a raw VM disk image:
要激活原始VM磁盘映像中的所有分区,请执行以下操作:
# kpartx -av ./vmdisk0
This will output lines such as:
这将输出如下行:
add map loop1p1 (253:8): 0 497664 linear /dev/loop1 2048add map loop1p2 (253:9): 0 2 linear /dev/loop1 501758add map loop1p5 (253:10): 0 63557632 linear /dev/loop1 501760add map loop1p6 (253:11): 0 61769665 linear /dev/loop1 64059455
The loop1
is the name of a device file under /dev/mapper which you can use to access the partition. If the raw disk image’s partitions are LVM volumes, you may find the LVM volumes being found by like vg0 here:
loop1
是/ dev / mapper下的设备文件的名称,可用于访问分区。 如果原始磁盘映像的分区是LVM卷,则可以在此处找到正在查找的LVM卷,例如vg0:
# vgsVG #PV #LV #SN Attr VSize VFree HomeLVM 1 1 0 wz--n- 683.59g 0 vg0 2 2 0 wz--n- 59.75g 29.49g
When you’re done with the partitions (and with filesystems unmounted), you need to remove the devices
完成分区(和卸载的文件系统)后,需要删除设备
# vgchange -an vg0 # not need to do this if you have not LVM# kpartx -dv ./vmdisk0
翻译自:
xen nfs挂载
转载地址:http://fcowd.baihongyu.com/