¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 1,358°Ç
   
Mount a vIrtual image (With LVM)
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2015-09-07 (¿ù) 15:44 Á¶È¸ : 5320
±ÛÁÖ¼Ò :
                                
Err Message
# mount /dev/mapper/nbd0p2 /mnt
mount: unknown filesystem type 'LVM2_member'


Mount a raw image (with LVM)
If your partitions are managed with LVM, use losetup and kpartx as in the previous example
to expose the partitions to the host.
# losetup -f
/dev/loop0
# losetup /dev/loop0 rhel62.img
# kpartx -av /dev/loop0

Next, you need to use the vgscan command to identify the LVM volume groups and then
vgchange to expose the volumes as devices:
 # vgscan
 Reading all physical volumes. This may take a while...
 Found volume group "vg_rhel62x8664" using metadata type lvm2
 # vgchange -ay
 2 logical volume(s) in volume group "vg_rhel62x8664" now active
 # mount /dev/vg_rhel62x8664/lv_root /mnt

Clean up when you're done:
# umount /mnt
# vgchange -an vg_rhel62x8664
# kpartx -d /dev/loop0
# losetup -d /dev/loop0


Mount a qcow2 image (with LVM)
If the image partitions are managed with LVM, after you use qemu-nbd and partprobe,
you must use vgscan and vgchange -ay in order to expose the LVM partitions as devices
that can be mounted:
# modprobe nbd max_part=16
# qemu-nbd -c /dev/nbd0 image.qcow2
# partprobe /dev/nbd0# vgscan
 Reading all physical volumes. This may take a while...
 Found volume group "vg_rhel62x8664" using metadata type lvm2
# vgchange -ay
 2 logical volume(s) in volume group "vg_rhel62x8664" now active
# mount /dev/vg_rhel62x8664/lv_root /mnt

When you're done, clean up:
# umount /mnt
# vgchange -an vg_rhel62x8664
# qemu-nbd -d /dev/nbd0 

À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.