1KPARTX(8) System Manager's Manual KPARTX(8)
2
3
4
6 kpartx - Create device maps from partition tables.
7
9 kpartx [-a|-d|-u|-l] [-r] [-p] [-f] [-g] [-s|-n] [-v] wholedisk
10
12 This tool, derived from util-linux' partx, reads partition tables on
13 specified device and create device maps over partitions segments
14 detected. It is called from hotplug upon device maps creation and dele‐
15 tion.
16
18 -a Add partition mappings.
19
20 -d Delete partition mappings.
21
22 -u Update partition mappings.
23
24 -l List partition mappings that would be added -a.
25
26 -r Read-only partition mappings.
27
28 -p Set device name-partition number delimiter.
29
30 -f Force creation of mappings; overrides 'no_partitions' feature.
31
32 -g Force GUID partition table (GPT).
33
34 -s Sync mode (Default). Don't return until the partitions are cre‐
35 ated.
36
37 -n Nosync mode. Return before the partitions are created.
38
39 -v Operate verbosely.
40
42 To mount all the partitions in a raw disk image:
43
44 kpartx -av disk.img
45
46 This will output lines such as:
47
48 add map loop1p1 (254:4): 0 409597 linear 7:1 3
49
50 The loop1p1 is the name of a device file under /dev/mapper which you
51 can use to access the partition, for example to fsck it:
52
53 fsck /dev/mapper/loop1p1
54
55 When you're done, you need to remove the devices:
56
57 kpartx -d disk.img
58
60 multipath(8) multipathd(8) hotplug(8)
61
63 This man page was assembled By Patrick Caulfield for the Debian
64 project.
65
66 multipath-tools was developed by Christophe Varoqui <christophe.varo‐
67 qui@opensvc.com> and others.
68
69
70
71Linux 2016-10-28 KPARTX(8)