LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-14-2016, 06:39 PM   #1
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,833

Rep: Reputation: 108Reputation: 108
systemd chokes at shutdown, when nfs mount disk is absent.


Hya

System
Several Debian stretch's amd64.
One of them is a nfs server for other ones.

What I did
One laptop is connected to this system via eth0, then common drive is nfs mounted.
... did some jobs (mostly reading)...
The laptop is disconnected from this system. (I did not unmount the nfs drive).
... did more jobs (not networked) ...
Then at the end of the day, when I tried to shutdown the laptop, systemd waits forever to take care of nfs drive.


What I tried
I was unable to log in through tty2, (of course not.)
Network was not active, so that no ssh log in.
No way to cancel the shutdown process.

Power button long press did power-off.

Question
What is the correct way to get out of this situation?
Is there anything like systemd force time out?

Yes, I know I did wrong thing to run into this situation. But it was too late when I realized.

++ added on edit.
This thread suggests to use debug shell. But it was not active either!

Last edited by kaz2100; 08-15-2016 at 09:29 PM. Reason: additional info
 
Old 08-16-2016, 05:47 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Yes, systemd.automount should work for you.

https://wiki.archlinux.org/index.php/fstab
https://wiki.archlinux.org/index.php/NFS

Last edited by michaelk; 08-16-2016 at 05:55 AM.
 
Old 08-16-2016, 09:17 AM   #3
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
AFAIK, there is no solution to this problem. I think it's a known bug with systemd which they will not fix. It's even worse if you're connected by wifi, because the wifi connection will invariably be shut down before systemd attempts to shut down nfs. So, you always get the stupid nfs mount hang. Every. Single. Time. And they're uninterested in fixing this bug.

The only solution I've managed is to remember to manually umount nfs shares before shutting down the computer. If I really wanted to get fancy, I could try and figure out a script which automatically runs before logging out that umounts nfs shares first.
 
Old 08-17-2016, 01:07 AM   #4
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,833

Original Poster
Rep: Reputation: 108Reputation: 108
Hya

Thanks for posts.

Yes, systemd.automount works. (shutdown after eth0 disconnect without unmounting nfs)

It looks like that there is no way to get out, once we run into this trouble.

cheers
 
Old 08-20-2016, 02:32 AM   #5
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,833

Original Poster
Rep: Reputation: 108Reputation: 108
Hya

With systemd.automount, everytime nfs drive is accessed, penguin waits for timeout, when nfs drive is unavailable.

A kind of side effect.

cheers

Thread back to unsolved.
 
Old 08-20-2016, 07:00 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
There is a device-timeout option that you can add in fstab to set the time it waits but that is the way it works.
 
Old 08-26-2016, 02:18 AM   #7
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,833

Original Poster
Rep: Reputation: 108Reputation: 108
Hya

Thanks for your reply.

Yes, I agree, that is a timeout option. I need to adjust many options, I guess.

cheers
 
  


Reply

Tags
debian, nfs, shutdown, systemd



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
Used to shutdown/reboot from CLI but since systemd replaced init "shutdown" cmnd broke? Beagleburt Debian 10 09-24-2019 07:49 PM
[SOLVED] shutdown works, but /lib/systemd/system/shutdown.target does not. kaz2100 Debian 3 08-06-2014 03:28 AM
nfs wicd netcl systemd blues (cannot shutdown without CPU Lock) forshark Linux - Networking 2 05-28-2013 02:29 PM
Problem using Windows to SMB mount an NFS-mounted disk Sroys Linux - Networking 1 05-21-2012 12:49 PM
how to configure nfs mount disk to samba share for windows client harun7862003 Linux - Networking 2 11-09-2010 03:11 AM

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

All times are GMT -5. The time now is 10:53 AM.

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