KPARTX(8) System Manager's Manual KPARTX(8)

# [NAME](#NAME)

kpartx - Create device maps from partition tables.

# [SYNOPSIS](#SYNOPSIS)

**kpartx** \[**-a**|**-d**|**-u**|**-l**] \[**-r**] \[**-p**] \[**-f**] \[**-g**] \[**-s**|**-n**] \[**-v**] **wholedisk**

# [DESCRIPTION](#DESCRIPTION)

This tool, derived from util-linux' partx, reads partition tables on specified device and create device maps over partitions segments detected. It is called from hotplug upon device maps creation and deletion.

# [OPTIONS](#OPTIONS)

[**-a**](#a)

Add partition mappings.

[**-d**](#d)

Delete partition mappings.

[**-u**](#u)

Update partition mappings.

[**-l**](#l)

List partition mappings that would be added -a.

[**-r**](#r)

Read-only partition mappings.

[**-p**](#p)

Set device name-partition number delimiter.

[**-f**](#f)

Force creation of mappings; overrides 'no\_partitions' feature.

[**-g**](#g)

Force GUID partition table (GPT).

[**-s**](#s)

Sync mode (Default). Don't return until the partitions are created.

[**-n**](#n)

Nosync mode. Return before the partitions are created.

[**-v**](#v)

Operate verbosely.

# [EXAMPLE](#EXAMPLE)

To mount all the partitions in a raw disk image:

kpartx -av disk.img

This will output lines such as:

add map loop1p1 (254:4): 0 409597 linear 7:1 3

The *loop1p1* is the name of a device file under */dev/mapper* which you can use to access the partition, for example to fsck it:

fsck /dev/mapper/loop1p1

When you're done, you need to remove the devices:

kpartx -d disk.img

# [SEE ALSO](#SEE_ALSO)

[**multipath**(8)](/man/os/multipath-tools/multipath.8) [**multipathd**(8)](/man/os/multipath-tools/multipathd.8) [**hotplug**(8)](/man/os/multipath-tools/hotplug.8)

# [AUTHORS](#AUTHORS)

This man page was assembled By Patrick Caulfield for the Debian project.

*multipath-tools* was developed by Christophe Varoqui &lt;christophe.varoqui@opensvc.com&gt; and others.

2019-04-27 Linux

---

Document: kpartx(8) from multipath-tools 0.15.1-r0 (Chainguard OS)
Source: https://github.com/opensvc/multipath-tools
