Hi all,
the aboved mentioned problem happened to me again and this time i made sure i would try to find every open file and close it first, then unmount the partition but still luksClose did not work...
The partition is unmounted but still i get this error:
Device sata_p1_2TBa is busy.
no open files on *sata* davice (both device and mountpoint are called the same)
# lsof |grep sata
#
blkid doesnt really help me either:
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 512M 1 loop
└─cryptoswap (dm-0) 254:0 0 512M 0 crypt
mmcblk0 179:0 0 14,9G 0 disk
├─mmcblk0p1 179:1 0 72M 0 part
└─mmcblk0p2 179:2 0 14,9G 0 part /
sdc 8:32 0 1,8T 0 disk
sdd 8:48 0 1,8T 0 disk
└─sdd1 8:49 0 1,8T 0 part
dmsetup force close also does not work:
# dmsetup remove -f sata_p1_2TBa
device-mapper: remove ioctl failed: Device or resource busy
Command failed
here you can see how the mapper device lost its physical device:
/dev/mapper/sata_p1_2TBa is active and is in use.
type: LUKS1
cipher: -
keysize: 0 bits
device: (null)
Thank you,
Benjamin
On 25 December 2012 13:17, Benjamin Eberhardt <eberhab@xxxxxxxxx> wrote:
>
> Hi,
>
> thank you very much for your replies. I tried to reproduce the problem
> which I had once in order to supply more details, but so far the
> procedure you described works very well (identifying the culprit and
> luksClose). Ill get back to you if the problem should occur again.
>
> Merry Christmas :)
> Benjamin
>
>
> On 29 November 2012 15:53, Milan Broz <gmazyland@xxxxxxxxx> wrote:
> > On 11/29/2012 02:43 PM, Matthias Schniedermeyer wrote:
> >
> >> IOW. It's a problem of finding the culprit who holds the mountpoint
> >> open.
> >
> > Exactly. You cannot remove open (in-use) device-mapper device.
> >
> > You can it replace with "error" target though (this will detach
> > underlying device from mapping.).
> >
> > Just run "dmsetup remove -f <name>"
> > instead of cryptsetup remove/luksClose <name>"
> >
> > But the dead DM device will still be in system. I can easily add such
> > force option to cryptsetup as well but it will not help much.
> >
> > The correct way is to force unmout fs (or whatever use this device)
> > and then remove crypt mapping (see lsblk, lsof etc).
> >
> > Milan
> >
> > p.s.
> > There is a request to add "auto" removal flag for device-mapper devices
> > (automatic remove after last close, similar to loop auto removal).
> >
> > Once this option will be in kernel cryptsetup will support it too.
> > But this will not help with your situation anyway.
_______________________________________________ dm-crypt mailing list dm-crypt@xxxxxxxx http://www.saout.de/mailman/listinfo/dm-crypt