How to delete partition created on device-mapper multipath device?
Environment
- Red Hat Enterprise Linux 6
- device-mapper-multipath
Issue
- Need to delete partition created on top of
device-mapper-multipathdevice.
Resolution
-
Verify no application or processes using this device with
lsof. Also, if there is any important data present on the partition, then please make sure to take a backup of data before deleting partition using following steps: -
Delete partition mappings.
# kpartx -d -v <mpath name>
example:
# kpartx -d -v /dev/mapper/mpathb
- Delete partition created on top of mpath device
# fdisk /dev/mapper/mpathb
d - delete partition <select the partition>
w - save the changes
- Verify partition has been deleted using
fdisk -l.
# fdisk /dev/mapper/mpathb -l
# dmsetup info -C | grep mpathb
SBR
Product(s)
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.