You are not logged in.

#1 2013-12-10 14:44:51

MickeyKnox
Member
Registered: 2010-02-27
Posts: 169

[SOLVED] mounted cifs filesystem slows down reboot and poweroff

It may take about a minute for the system to shut down.

Unmounting them manually however goes fast and an immediate reboot is not slowed down.

The corresponding lines in /etc/fstab look like this:

//172.20.246.6/Videos	/media/videos	cifs	noauto,users,user=username,pass=password	0	0
//172.20.246.6/Musik	/media/musik    cifs    noauto,users,user=username,pass=password   0   0

journalctl -b -1 revealed something, but i don't know what to do with it:

Dec 10 02:08:43 skynet systemd[1]: Found ordering cycle on local-fs.target/stop
Dec 10 02:08:43 skynet systemd[1]: Found dependency on media-videos.mount/stop
Dec 10 02:08:43 skynet systemd[1]: Found dependency on network.target/stop
Dec 10 02:08:43 skynet systemd[1]: Found dependency on network.service/stop
Dec 10 02:08:43 skynet systemd[1]: Found dependency on basic.target/stop
Dec 10 02:08:43 skynet systemd[1]: Found dependency on sysinit.target/stop
Dec 10 02:08:43 skynet systemd[1]: Found dependency on local-fs.target/stop
Dec 10 02:08:43 skynet systemd[1]: Breaking ordering cycle by deleting job media-videos.mount/stop
Dec 10 02:08:43 skynet systemd[1]: Job media-videos.mount/stop deleted to break ordering cycle starting with local-fs.target/stop
Dec 10 02:08:43 skynet systemd[1]: Found ordering cycle on local-fs.target/stop
Dec 10 02:08:43 skynet systemd[1]: Found dependency on media-musik.mount/stop
Dec 10 02:08:43 skynet systemd[1]: Found dependency on network.target/stop
Dec 10 02:08:43 skynet systemd[1]: Found dependency on network.service/stop
Dec 10 02:08:43 skynet systemd[1]: Found dependency on basic.target/stop
Dec 10 02:08:43 skynet systemd[1]: Found dependency on sysinit.target/stop
Dec 10 02:08:43 skynet systemd[1]: Found dependency on local-fs.target/stop
Dec 10 02:08:43 skynet systemd[1]: Breaking ordering cycle by deleting job media-musik.mount/stop
Dec 10 02:08:43 skynet systemd[1]: Job media-musik.mount/stop deleted to break ordering cycle starting with local-fs.target/stop

Where might the problem be?

Last edited by MickeyKnox (2013-12-15 09:32:51)

Offline

#2 2013-12-11 07:51:53

Padfoot
Member
Registered: 2010-09-03
Posts: 381

Re: [SOLVED] mounted cifs filesystem slows down reboot and poweroff

Add the following option to your fstab lines:

x-systemd.automount

This will only mount the cifs shares when accessed and the unmount issue on shutdown/reboot is resolved as systemd is now handling the mount.

Another thing you may want to do is to protect your username and password from snooping eyes in your fstab. Replace the username and password options in fstab with the following:

credentials=/path/to/creds.file

Create a credentials file in that location (for example, I use /etc/conf.d/nas.cred) with the lines:

username=..........
password=.........

And change the permissions on the file so it can only be read/write by root.

Cheers.

Offline

#3 2013-12-15 09:32:32

MickeyKnox
Member
Registered: 2010-02-27
Posts: 169

Re: [SOLVED] mounted cifs filesystem slows down reboot and poweroff

Thanks Padfoot, that worked.

Offline

Board footer

Powered by FluxBB