Bug 498665 - Wrong use of kpartx and misses the rest of the example
Wrong use of kpartx and misses the rest of the example
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: Virtualization_Guide (Show other bugs)
5.5
All Linux
low Severity high
: rc
: ---
Assigned To: Christopher Curran
Joshua Wulf
: Documentation
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-01 14:56 EDT by Amadeus
Modified: 2014-10-19 18:56 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-04-06 21:41:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Amadeus 2009-05-01 14:56:32 EDT
The example how kpartx is used is wrong. All these pages have the same bug:

http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Virtualization_Guide/sect-Virtualization-How_To_troubleshoot_Red_Hat_Virtualization-Accessing_data_on_guest_disk_image.html

http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.2/html/Virtualization/sect-Virtualization-How_To_troubleshoot_Red_Hat_Virtualization-Accessing_data_on_guest_disk_image.html

http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/en-US/RHEL510/Virtualization_Guide/ch-virt-accessing-data.html

http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Virtualization-en-US/ch-virt-accessing-data.html


It should have been "kpartx -av imagefile" and not the device path.

The example also misses to explain how to actually mount the image. It should say something like

"You can mount it now with mount /dev/mapper/loop0pX /mnt/ -o loop,ro. After unmounting you can disconnect the mapper devices with kpartx -d imagefile."
Comment 1 Amadeus 2009-05-01 15:02:56 EDT
Should be something like:

kpartx -l /vm/xenguest.img

kpartx -a /vm/xenguest
mount /dev/mapper/loop0pX /mnt/tmp -o loop,ro 

# do your stuff

umount /mnt/tmp
kpartx -d /vm/xenguest.img
Comment 3 Christopher Curran 2010-02-23 02:18:54 EST
Fixed for 5.5.

Note You need to log in before you can comment on or make changes to this bug.