You are not logged in.

#1 2013-11-23 12:07:44

Spider.007
Member
Registered: 2004-06-20
Posts: 1,176

Systemd kills my network on shutdown before nfs is unmounted

My home-directory is on nfs and I've been having this issue for a couple of months now; when shutting down systemd will stop my network without waiting for nfs unmounts to complete sad This results in incomplete shutdowns which sometimes take more then 10 minutes. It looks like this:

Nov 15 10:52:26 desktop systemd[1]: Stopped RPC GSS-API client-side daemon.
Nov 15 10:52:26 desktop systemd[1]: Unmounting RPC pipe filesystem...
Nov 15 10:52:26 desktop systemd[1]: Stopping RPC Bind...
Nov 15 10:52:26 desktop rpcbind[454]: rpcbind terminating on signal. Restart with "rpcbind -w"
Nov 15 10:52:26 desktop rpcbind[454]: cannot open file = /run/rpcbind.xdr for writing
Nov 15 10:52:26 desktop rpcbind[454]: cannot save any registration
Nov 15 10:52:26 desktop rpcbind[454]: cannot open file = /run/portmap.xdr for writing
Nov 15 10:52:26 desktop rpcbind[454]: cannot save any registration
Nov 15 10:52:26 desktop systemd[1]: rpcbind.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Nov 15 10:52:26 desktop systemd[1]: Stopped RPC Bind.
Nov 15 10:52:26 desktop systemd[1]: Unit rpcbind.service entered failed state.
Nov 15 10:52:26 desktop systemd[1]: Stopped Login Service.
Nov 15 10:52:26 desktop umount[3604]: umount: /home/user: not mounted
Nov 15 10:52:26 desktop systemd[1]: home-user.mount mount process exited, code=exited status=32
Nov 15 10:52:26 desktop systemd[1]: Unmounted /home/user.
Nov 15 10:52:26 desktop systemd[1]: Unit home-user.mount entered failed state.
Nov 15 10:52:26 desktop systemd[1]: Unmounted RPC pipe filesystem.
Nov 15 10:52:26 desktop systemd[1]: mnt-bigdisk.mount mount process exited, code=exited status=32
Nov 15 10:52:26 desktop systemd[1]: Unmounted /mnt/bigdisk.
Nov 15 10:52:26 desktop systemd[1]: Unit mnt-bigdisk.mount entered failed state.
Nov 15 10:52:26 desktop systemd[1]: Stopping Network is Online.
Nov 15 10:52:26 desktop systemd[1]: Stopped target Network is Online.
Nov 15 10:52:26 desktop systemd[1]: Stopping Network.
Nov 15 10:52:26 desktop systemd[1]: Stopped target Network. 
Nov 15 10:52:26 desktop systemd[1]: Stopping dhcpcd on enp3s0...
Nov 15 10:52:26 desktop umount[3605]: umount: /mnt/bigdisk: not mounted
Nov 15 10:52:26 desktop dhcpcd[3623]: dhcpcd[3623]: sending signal 15 to pid 414
Nov 15 10:52:26 desktop dhcpcd[3623]: dhcpcd[3623]: waiting for pid 414 to exit 
Nov 15 10:52:26 desktop dhcpcd[3623]: sending signal 15 to pid 414
Nov 15 10:52:26 desktop dhcpcd[3623]: waiting for pid 414 to exit 
Nov 15 10:52:26 desktop dhcpcd[414]: received SIGTERM from PID 3623, stopping
Nov 15 10:52:26 desktop dhcpcd[414]: enp3s0: removing interface
Nov 15 10:52:26 desktop dhcpcd[414]: enp3s0: deleting host route to 192.168.1.12 via 127.0.0.1
Nov 15 10:52:26 desktop dhcpcd[414]: enp3s0: deleting route to 192.168.1.0/24
Nov 15 10:52:26 desktop dhcpcd[414]: enp3s0: deleting default route via 192.168.1.254
Nov 15 10:52:26 desktop systemd[1]: Stopped User Manager for 1000.
Nov 15 10:52:26 desktop systemd[1]: Stopping user-1000.slice.
Nov 15 10:52:26 desktop systemd[1]: Removed slice user-1000.slice.
Nov 15 10:52:26 desktop dhcpcd[414]: exited
Nov 15 10:52:26 desktop systemd[1]: dhcpcd@enp3s0.service: main process exited, code=exited, status=1/FAILURE
Nov 15 10:52:26 desktop systemd[1]: Stopped dhcpcd on enp3s0.
Nov 15 10:52:26 desktop systemd[1]: Unit dhcpcd@enp3s0.service entered failed state.
Nov 15 10:52:26 desktop systemd[1]: Stopping system-dhcpcd.slice.
Nov 15 10:52:26 desktop systemd[1]: Removed slice system-dhcpcd.slice.
Nov 15 10:52:27 desktop systemd[1]: slim.service: main process exited, code=exited, status=1/FAILURE
Nov 15 10:52:27 desktop systemd[1]: Stopped SLiM Simple Login Manager.
Nov 15 10:52:27 desktop systemd[1]: Unit slim.service entered failed state.
Nov 15 10:52:27 desktop systemd[1]: Stopping Permit User Sessions...
...
Nov 15 10:52:27 desktop systemd[1]: Stopping Local File Systems.
Nov 15 10:52:27 desktop systemd[1]: Stopped target Local File Systems.
Nov 15 10:52:27 desktop systemd[1]: Unmounting /home...
Nov 15 10:52:27 desktop systemd[1]: Unmounting /var/backup...
Nov 15 10:52:27 desktop systemd[1]: Unmounting /tmp...
Nov 15 10:52:27 desktop umount[3666]: umount: /home: target is busy
Nov 15 10:52:27 desktop umount[3666]: (In some cases useful info about processes that
Nov 15 10:52:27 desktop umount[3666]: use the device is found by lsof(8) or fuser(1).)
Nov 15 10:52:27 desktop systemd[1]: home.mount mount process exited, code=exited status=32
Nov 15 10:52:27 desktop systemd[1]: Failed unmounting /home.
Nov 15 10:52:27 desktop systemd[1]: Unmounted /tmp. 
Nov 15 10:52:27 desktop systemd[1]: Unmounted /var/backup.
Nov 15 10:52:27 desktop systemd[1]: Starting Unmount All Filesystems.
Nov 15 10:52:27 desktop systemd[1]: Reached target Unmount All Filesystems.
Nov 15 10:52:27 desktop systemd[1]: Stopping Local File Systems (Pre).
Nov 15 10:52:27 desktop systemd[1]: Stopped target Local File Systems (Pre).
Nov 15 10:52:27 desktop systemd[1]: Stopping Remount Root and Kernel File Systems... 
Nov 15 10:52:27 desktop systemd[1]: Stopped Remount Root and Kernel File Systems.
Nov 15 10:52:27 desktop systemd[1]: Starting Shutdown.
Nov 15 10:52:27 desktop systemd[1]: Reached target Shutdown.
Nov 15 10:52:27 desktop systemd[1]: Starting Final Step.
Nov 15 10:52:27 desktop systemd[1]: Reached target Final Step.
Nov 15 10:52:27 desktop systemd[1]: Starting Reboot...
Nov 15 10:52:27 desktop systemd[1]: Shutting down.
Nov 15 10:52:27 desktop sudo[3600]: pam_unix(sudo:session): session closed for user root
Nov 15 10:52:27 desktop systemd[1]: Hardware watchdog 'iTCO_wdt', version 0
Nov 15 10:52:27 desktop systemd[1]: Set hardware watchdog to 10min.
Nov 15 10:52:27 desktop kernel: watchdog watchdog0: watchdog did not stop!
Nov 15 10:52:27 desktop systemd-journal[144]: Journal stopped

Does systemd have any notion of a relation between the network connection and the filesystem that is mounted via that connection? Because it seems to treat the filesystem equal to a local filesystem which it clearly isn't.

Offline

#2 2013-11-23 12:09:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: Systemd kills my network on shutdown before nfs is unmounted

Post your /etc/fstab

Offline

#3 2013-11-23 12:45:36

Spider.007
Member
Registered: 2004-06-20
Posts: 1,176

Re: Systemd kills my network on shutdown before nfs is unmounted

Relevant parts:

/dev/sda2                       /                       ext4    defaults,discard                0 1
none                            /tmp                    tmpfs   nodev,nosuid,noatime,size=4G,mode=1777
/dev/md1                        /home                   ext4    defaults                0 3

server:/var/cache/pacman        /var/cache/pacman       nfs4    exec,auto
server:/srv                     /srv                    nfs4    defaults,auto
server:/home/user               /home/user              nfs4    exec,auto

Last edited by Spider.007 (2013-11-23 12:46:19)

Offline

#4 2013-11-23 12:50:49

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: Systemd kills my network on shutdown before nfs is unmounted

Just a guess but what if you allowed systemd to mount them?
EDIT: https://wiki.archlinux.org/index.php/NF … t_handling

Last edited by graysky (2013-11-23 12:54:48)

Offline

#5 2013-11-23 13:10:52

Spider.007
Member
Registered: 2004-06-20
Posts: 1,176

Re: Systemd kills my network on shutdown before nfs is unmounted

I don't see how creating a .service manually to mount this would be better then the current solution. As the message "Unit home-user.mount entered failed state." indicates; systemd already handles the mounting. Also; the problem is with unmounting which this script doesn't bother with?

Offline

#6 2013-11-23 19:27:57

BluMongoose
Member
From: 'Murica
Registered: 2012-04-24
Posts: 49

Re: Systemd kills my network on shutdown before nfs is unmounted

I ran into a similar problem with my nfs shares. The two options I added to my fstab that seemed to fix the problem were:

_netdev,x-systemd.automount

I added them both at the same time so I am unsure which actually fixed the issue. The NFS section of the wiki has more details on those options.


"Think for yourself and question authority." -T. Leary

Offline

#7 2013-11-24 11:09:25

Spider.007
Member
Registered: 2004-06-20
Posts: 1,176

Re: Systemd kills my network on shutdown before nfs is unmounted

BluMongoose wrote:

I ran into a similar problem with my nfs shares. The two options I added to my fstab that seemed to fix the problem were:

_netdev,x-systemd.automount

I added them both at the same time so I am unsure which actually fixed the issue. The NFS section of the wiki has more details on those options.

Thanks I'll try that. The wiki also says systemd assumes this for NFS, but maybe there is a subtle difference

Offline

Board footer

Powered by FluxBB