[dm-devel] How do you force-close a dm device after a disk failure?

Zdenek Kabelac zkabelac at redhat.com
Wed Sep 16 08:04:33 UTC 2015


Dne 16.9.2015 v 02:58 Adam Nielsen napsal(a):
>>> dmsetup reload backup --table "0 11720531968 error"
>
> This one returns without error.
>
>>> dmsetup suspend --noflush backup
>>
>> or even better use   --noflush  --nolockfs
>> (if there was a mounted filesystem)
>
> This one does not return to the command prompt.  Running it through
> strace shows this:
>
> $ strace dmsetup suspend --noflush --nolockfs backup
> ...
> munmap(0x7f9cdea45000, 4096)            = 0
> ioctl(3, DM_VERSION, 0x5644ae2ca0d0)    = 0
> ioctl(3, DM_DEV_SUSPEND
>
> It always seems to freeze at DM_DEV_SUSPEND.  This ioctl never seems to
> return.

As with any other kernel frozen task - try to capture kernel stack trace.
If you properly configured sysrq trigger - easiest is to use:

'echo t >/proc/sysrq-trigger'

(Just make sure you have large enough kernel log buffer so lines are not lost)
Attach compressed trace - this should likely reveal where it blocks.
(I'll try to reproduce myself)


Zdenek




More information about the dm-devel mailing list