Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-14-2016, 02:51 AM   #1
LQ Newbie
Registered: Nov 2004
Location: Surrey, UK
Distribution: Linux Mint 17
Posts: 14

Rep: Reputation: 0
Unhappy PC won't shutdown if I shutdown NAS server with ssh

I have a Linux Mint 18 PC (mini i7) and a Western Digital My Cloud NAS server (Debian). I mount the NAS folders with the fstab entries:
Quote: /mnt/NAS/shared nfs rw,udp,users,vers=3,soft,intr,rsize=8192,wsize=8192 0 0 /mnt/NAS/user nfs rw,udp,users,vers=3,soft,intr,rsize=8192,wsize=8192 0 0
If I just shut down my PC it shuts down quickly.
If I shut down the NAS server first with:
ssh -t root@ 'sudo /usr/local/modules/script/ -h now'
and then try and shutdown my PC the PC hangs. I've tried unmounting my NAS mounts and then shutting down my PC without shutting down the NAS. It shuts down fine. It seems the distinguishing step is shutting down the NAS server with ssh. If I do that it hangs when I then try to shut down my PC. Any ideas? Thx,
Old 10-14-2016, 04:33 AM   #2
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,325

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
What does /usr/local/modules/script/ script contain? Or have you a link to this module maybe?
Old 10-14-2016, 06:11 AM   #3
Registered: Aug 2002
Posts: 21,592

Rep: Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163Reputation: 4163
Basically the PC hangs since it is trying to unmount something that isn't there anymore. If this is your normal shutdown process then you might want to consider using automount. Your shares are automatically mounted when you access them and then unmounted when idle.

There are two ways to automount i.e autofs and a systemd. Both are easy to setup and below is a systemd howto.


nas, shutdown, ssh

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
FC18: running a command on shutdown (or reboot) before every other shutdown operation P5music Fedora 3 04-23-2013 03:56 PM
Where I can locate Shutdown log for Linux Shutdown (RHL 5.1-2.6.18-53.el5PAE) msmallya Linux - General 2 04-23-2010 01:56 AM
Unable to shutdown/reboot server, no shutdown process running dctw Linux - Server 5 03-31-2010 05:46 AM
NAS mounts with fstab but hangs on shutdown zuser Linux - Newbie 4 04-07-2009 02:07 PM
My Server won't off when i shutdown kamtono Mandriva 1 09-30-2003 09:46 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:04 PM.

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