Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

kpartx: read error when removing mapping

Tags:

lvm

dm

I have a backup procedure that uses kpartx to read from a partitioned lvm volume. Seldomly it happens that the device cannot be unmapped.

Right now when I try to remove the mapping I get the following:

# kpartx -d /dev/loop7
read error, sector 0
read error, sector 1
read error, sector 29

I tried dmsetup clean loop7p1 but nothing changed. How can I free the partition without rebooting the server? thanks

like image 386
Maxxer Avatar asked Oct 29 '11 09:10

Maxxer


1 Answers

You can use 'dmsetup remove_all' to remove this mapping. You shouldn't need to use -f (force), but if you do, it may remove mappings that are in use.

like image 91
user2051456 Avatar answered Nov 13 '22 20:11

user2051456