LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-26-2015, 08:48 AM   #1
fornax
LQ Newbie
 
Registered: Jun 2011
Posts: 13

Rep: Reputation: Disabled
Shutdown hangs at "Stopping remaining crypto disks (busy)"


Hi, my question is basically the subject.
It is an up to date Debian testing amd64. It worked flawlessly until my last dist-upgrade some weeks ago. I'm using lvm+luks to encrypt all drives.

When shutting down, (w/o error messages), the last lines are:
Code:
[ ok ] Deactivating swap..done.
[ ok ] Unmounting local filesytems..done.
[....] Stopping remaining crypto disks...sdc5_crypt (busy)...
The systems hangs at this point, I need to kill it by long pressing the power button.

Can anyone give me some pointers how to debug this problem? So far, I could not find a log file which would give me useful information what's happening here.

Thank you!
 
Old 07-26-2015, 09:04 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by fornax View Post
The systems hangs at this point, I need to kill it by long pressing the power button.
While file systems are getting better all of the time and while I do understand your predicament you realize that still is an extremely ill advised thing to do, right?


Quote:
Originally Posted by fornax View Post
Can anyone give me some pointers how to debug this problem?
There may be a process keeping files open during shutdown. The problem is you're way too far down the shutdown progress to have any terminal access available to diagnose things. I'd drop to (the equivalent of) runlevel 1 and see what processes are still running ('ps ax -eopid,args' should do) and then check open files with 'lsof -Pwlnp <pid>;' or just 'lsof -Pwln -a +D<mountpoint>;'.
 
Old 07-26-2015, 09:24 AM   #3
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
You may have a terminal open, with a drive displayed. If you cd to a drive in a terminal, Linux won't allow you to unmount that drive, or do many other things with it. Something is certainly going on with the drive, but it's not possible to tell exactly from long distance.
 
Old 07-26-2015, 03:22 PM   #4
fornax
LQ Newbie
 
Registered: Jun 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thanks for the answers so far. Of course I know that killing the system is a bad idea, but it really
hangs here (I've waited for several hours). So it unfortunately leaves me no choice.

I tried checking processes in single user but found nothing suspicious. I can post the output if you would like to have a look.

After more debugging, I found some other interesting issues.
To begin with, the upgrade (maybe since systemd, yay) renamed my disks.
Before the update, I had /dev/sdb1 -> sdb1_crypt and /dev/sdc5 -> sdc5_crypt.
Now, the disks got renamed to /dev/sda1 and /dev/sdb5.
Both still worked as they should with using UUIDs.

I adapted /etc/crypttab and /etc/blkid (new file? never saw that one before), shutdown
was successfull ONCE.

After that, I tried updating the initramfs, which gave me this warning:
Code:
cryptsetup: WARNING: invalid line in /etc/crypttab for sdc5_crypt -
The resulting initramfs did not boot and had no cryptsetup in the initramfs shell.
Had to fix it with a recovery shell from USB.

Now the names are correct, the problem stays the same except it is sdb5_crypt now.
 
Old 08-01-2015, 04:16 AM   #5
kiyop
Member
 
Registered: Jun 2015
Distribution: Debian, Arch
Posts: 56

Rep: Reputation: Disabled
Is there any relevant info on the release notes especially some URL such as the following?
https://www.debian.org/releases/jess...mation.en.html
 
Old 08-01-2015, 07:02 AM   #6
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Use UUIDs to identify the drives rather than block devices.

Does the system shut down cleanly under SysVinit?
https://wiki.debian.org/FAQsFromDebi...t_on_Jessie.3F
 
Old 08-01-2015, 07:44 AM   #7
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
If things work as they should using UUIDs, then why not use them and get on with life? You can't rely on drives being mounted as the same sd? every time. You could also give the drives labels, and mount using those labels, which is sometimes more reliable than UUID.
 
Old 08-02-2015, 03:47 PM   #8
fornax
LQ Newbie
 
Registered: Jun 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
Okay, seems like my comments about the naming caused more uncertainties than they helped.
To bring it to the point: I was using UUIDs all the time, booting & mounting worked and still work, but *no* effect on the described problem.
The *one* time the system was shutting down was at one point after adapting the name (not the UUID!) in the crypttab. I could neither reproduce this, nor did it shut
down after rebooting with the "fixed" cryptab.
The whole naming thing was just something that I found quite interesting to cause problems (like the initrd/grub upgrade) at all. I thought it might be related. Turns out, it was not.

I tried sysvinit as well, same behavior.

Last edited by fornax; 08-02-2015 at 03:49 PM.
 
Old 08-09-2015, 09:31 PM   #9
kiyop
Member
 
Registered: Jun 2015
Distribution: Debian, Arch
Posts: 56

Rep: Reputation: Disabled
Of course, you have read https://www.debian.org/releases/jess...orted-features , haven't you?

How about using "poweroff" command instead of "shutdown -h now" or "halt" command?

Last edited by kiyop; 08-09-2015 at 09:33 PM.
 
Old 08-10-2015, 08:45 AM   #10
fornax
LQ Newbie
 
Registered: Jun 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
Tried poweroff, same behavior. I think the power down bug which is referred here happens at a later stage.
 
Old 11-19-2015, 05:44 AM   #11
BeniBela2
Member
 
Registered: Dec 2012
Posts: 52

Rep: Reputation: Disabled
Has anyone found a solution to this?

After a dist-upgrade I have the same problem.


I do not even have a running crypto disk (I mount my crypto disk like once a month).

Quote:
Code:
$ cat /etc/crypttab
# <target name>	<source device>		<key file>	<options>
# /dev/mapper/crypt-home /dev/sda7 none luks,noauto
cswap /dev/sda5 /dev/urandom swap
/dev/mapper/crypt-home UUID=89fd998a-dfba-479b-b80a-f99ae6b2f35d none luks,noauto
 
Old 11-19-2015, 07:54 AM   #12
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Did your dist-upgrade also upgrade your kernel? If so, and if you still also have the old kernel, boot into it. Dist-upgrade to a new kernel caused the same problem with my hardware on Sid. Fortunately, i also had the original kernel 3.16 to boot into from which i flushed kernel 4.2.5. I have found that upgrading to a new kernel works without errors on my laptop only when i compile it from source while upgrading it from the repos or backports buggers up my system..more than once.
 
Old 11-20-2015, 05:45 PM   #13
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
I always keep at least one previous known-good kernel installed, sometimes two. You never know when things will go south unexpectedly.
 
Old 11-24-2015, 12:51 PM   #14
BeniBela2
Member
 
Registered: Dec 2012
Posts: 52

Rep: Reputation: Disabled
So, now I have tried 3.16, 3.14 and 3.12

It does not work with any

I do not think it is a kernel issue

Any other ideas?
 
Old 12-02-2015, 02:49 PM   #15
BeniBela2
Member
 
Registered: Dec 2012
Posts: 52

Rep: Reputation: Disabled
Found this: https://bugs.debian.org/cgi-bin/bugr...cgi?bug=792552
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] cryptsetup hangs during shutdown at "Locking LUKS crypt volume ...:" danielldaniell Slackware 2 01-19-2015 09:09 AM
Fedora 14 Shutdown hangs at "iptables unloading modules" farmerdave Fedora 5 02-05-2011 08:06 PM
[SOLVED] During shutdown /, /srv/ var: "device busy" catkin Slackware 3 03-25-2010 07:04 AM
Fedora Core 6 hangs at shutdown on "Synchronizing SCSI cache" with iSCSI linux=future Linux - Software 5 08-17-2008 11:47 AM
Do your SATA disks make a "tack" noise at shutdown? MartyMcFly Linux - Hardware 6 06-21-2007 12:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration