Add kpartx example to manpage
authorRitesh Raj Sarraf <rrs@researchut.com>
Wed, 17 Aug 2011 17:40:37 +0000 (23:10 +0530)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 22 Aug 2011 13:40:18 +0000 (15:40 +0200)
Thanks: Lars Wirzenius
Closes: 637538
Signed-off-by: Ritesh Raj Sarraf <rrs@debian.org>
kpartx/kpartx.8

index 5d73d31eaa2c80af51f5b936c2680f0b6838abde..795a2e090c586934aa70420f4a1aecb3e44a46c1 100644 (file)
@@ -34,6 +34,26 @@ force GUID partition table (GPT)
 .TP
 .B \-v
 Operate verbosely
+.SH EXAMPLE
+To mount all the partitions in a raw disk image:
+.IP
+kpartx -av disk.img
+.PP
+This will output lines such as:
+.IP
+loop3p1 : 0 20964762 /dev/loop3 63
+.PP
+The 
+.I loop3p1
+is the name of a device file under 
+.I /dev/mapper
+which you can use to access the partition, for example to fsck it:
+.IP
+fsck /dev/mapper/loop3p1
+.PP
+When you're done, you need to remove the devices:
+.IP
+kpartx -d disk.img
 .SH "SEE ALSO"
 .BR multipath (8)
 .BR multipathd (8)