* cryptsetup + lvm on usb disk, unusable /dev/dm-* after suspend/resume cycle
@ 2010-07-25 16:06 Nils Radtke
2010-07-25 21:00 ` Milan Broz
0 siblings, 1 reply; 5+ messages in thread
From: Nils Radtke @ 2010-07-25 16:06 UTC (permalink / raw)
To: linux-kernel
Greetings,
Using an external usb 2 hdd with recent kernels with cryptsetup containers that
contain lvm volumes.
After a suspend/resume cycle, with active lvm volumes, the mounted fs is "offline",
the dm-* devices don't respond to commands issued. No more access possible.
Have to reboot to free the devices.
Someone ever experienced that? Ideas to fix?
Thanks,
Nils
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cryptsetup + lvm on usb disk, unusable /dev/dm-* after suspend/resume cycle
2010-07-25 16:06 cryptsetup + lvm on usb disk, unusable /dev/dm-* after suspend/resume cycle Nils Radtke
@ 2010-07-25 21:00 ` Milan Broz
2010-07-26 13:06 ` Nils Radtke
0 siblings, 1 reply; 5+ messages in thread
From: Milan Broz @ 2010-07-25 21:00 UTC (permalink / raw)
To: Nils Radtke; +Cc: linux-kernel
On 07/25/2010 06:06 PM, Nils Radtke wrote:
> Using an external usb 2 hdd with recent kernels with cryptsetup containers that
> contain lvm volumes.
>
> After a suspend/resume cycle, with active lvm volumes, the mounted fs is "offline",
> the dm-* devices don't respond to commands issued. No more access possible.
>
> Have to reboot to free the devices.
I guess it is not dm/block layer problem but USB related - can you check syslog if
the device is not attached after resume with another major:minor?
If this happens - you can free the mappings using dmsetup:
- try to force umount fs (if mounted), then run "dmsetup table" and manually remove
orphaned mappings using "dmsetup remove".
Milan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cryptsetup + lvm on usb disk, unusable /dev/dm-* after suspend/resume cycle
2010-07-25 21:00 ` Milan Broz
@ 2010-07-26 13:06 ` Nils Radtke
2010-07-26 13:22 ` Milan Broz
0 siblings, 1 reply; 5+ messages in thread
From: Nils Radtke @ 2010-07-26 13:06 UTC (permalink / raw)
To: Milan Broz; +Cc: linux-kernel
Hi,
Thanks for your answer.
On Sun 2010-07-25 @ 11-00-49PM +0200, Milan Broz wrote:
# On 07/25/2010 06:06 PM, Nils Radtke wrote:
#
# > Using an external usb 2 hdd with recent kernels with cryptsetup containers that
# > contain lvm volumes.
# >
# > After a suspend/resume cycle, with active lvm volumes, the mounted fs is "offline",
# > the dm-* devices don't respond to commands issued. No more access possible.
# >
# > Have to reboot to free the devices.
#
# I guess it is not dm/block layer problem but USB related - can you check syslog if
# the device is not attached after resume with another major:minor?
I'm not sure I can map this to what happened here.
What I can tell is, a plain usb conn survives nowadays (there were kernels in the days
of 200x where x < 8 when usb didn't survive) suspend/resume cycles.
It is as well working with a usb + cryptsetup (w/o lvm): survives suspend/resume.
However usb + cryptsetup + lvm does not survive as of these days.
# If this happens - you can free the mappings using dmsetup:
# - try to force umount fs (if mounted), then run "dmsetup table" and manually remove
# orphaned mappings using "dmsetup remove".
That's what I tried and failed gloriously. I'm trying to revive my memory about the
situation: fs could be unmounted, however, the cryptsetup luksClose failed (IRC) and
therefore the dmsetup remove consequently failed also.
These experiences let me to the conclusion that there might be some issue
regarding dmsetup in the ensemble of usb + cryptsetup + lvm.
Thanks for your opinion,
Nils
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cryptsetup + lvm on usb disk, unusable /dev/dm-* after suspend/resume cycle
2010-07-26 13:06 ` Nils Radtke
@ 2010-07-26 13:22 ` Milan Broz
2010-07-26 15:56 ` Nils Radtke
0 siblings, 1 reply; 5+ messages in thread
From: Milan Broz @ 2010-07-26 13:22 UTC (permalink / raw)
To: Nils Radtke; +Cc: linux-kernel
On 07/26/2010 03:06 PM, Nils Radtke wrote:
> That's what I tried and failed gloriously. I'm trying to revive my memory about the
> situation: fs could be unmounted, however, the cryptsetup luksClose failed (IRC) and
> therefore the dmsetup remove consequently failed also.
So instead of "cryptsetup luksClose" use dmsetup remove for crypt device too
(There was a bug in some version of cryptsetup which failed close if underlying device
disappeared, should be fixed in >=1.1.2, anyway "dmsetup remove" is low-level equivalent.)
Also see man page and "dmsetup remove -f" flag.
The usb device reinitialization is separate problem, maybe someone can help if you provide
more logs.
Milan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cryptsetup + lvm on usb disk, unusable /dev/dm-* after suspend/resume cycle
2010-07-26 13:22 ` Milan Broz
@ 2010-07-26 15:56 ` Nils Radtke
0 siblings, 0 replies; 5+ messages in thread
From: Nils Radtke @ 2010-07-26 15:56 UTC (permalink / raw)
To: Milan Broz; +Cc: linux-kernel
Hi Milan,
Thank you for your explanation.
So I'll try to find logs regarding this issue (won't be easy though..).
On the other hand, the usb device survives suspend/resume normally, that is,
when using a plain disk, std partition etc.
Ok, I'm going for the logs and if found be back.
Thank you again for your help.
Nils
On Mon 2010-07-26 @ 03-22-45PM +0200, Milan Broz wrote:
# On 07/26/2010 03:06 PM, Nils Radtke wrote:
# > That's what I tried and failed gloriously. I'm trying to revive my memory about the
# > situation: fs could be unmounted, however, the cryptsetup luksClose failed (IRC) and
# > therefore the dmsetup remove consequently failed also.
#
# So instead of "cryptsetup luksClose" use dmsetup remove for crypt device too
# (There was a bug in some version of cryptsetup which failed close if underlying device
# disappeared, should be fixed in >=1.1.2, anyway "dmsetup remove" is low-level equivalent.)
#
# Also see man page and "dmsetup remove -f" flag.
#
# The usb device reinitialization is separate problem, maybe someone can help if you provide
# more logs.
#
# Milan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-07-26 15:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-25 16:06 cryptsetup + lvm on usb disk, unusable /dev/dm-* after suspend/resume cycle Nils Radtke
2010-07-25 21:00 ` Milan Broz
2010-07-26 13:06 ` Nils Radtke
2010-07-26 13:22 ` Milan Broz
2010-07-26 15:56 ` Nils Radtke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox