Ask Your Question
0

CIFS mounts cause delay when resume from suspend

asked 2018-01-28 18:26:05 -0500

theroark gravatar image

updated 2018-01-28 18:27:19 -0500

Fedora 27 hangs on resume from suspend for about 15-30 seconds, whether connected via eth0 or wifi. I have been able to isolate the issue to the CIFS network mounts that I use and are set in /etc/fstab. If they are removed (or commented), this issue resolves. Is there a way to automatically mount network drives using CIFS that does not cause a hang on resume?

Here is the stanza in my /etc/fstab:

//10.0.5.2/USB_Router /mnt/USB_Router  cifs credentials=/home/user/.smbcredentials,vers=1.0,nofail,iocharset=utf8,sec=ntlm,file_mode=0777,dir_mode=0777,uid=me,gid=me 0 0
edit retag flag offensive close merge delete

Comments

Worth noting that the same /etc/fstab entry works without delay in Ubuntu.

theroark gravatar imagetheroark ( 2018-02-10 14:24:39 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-03-25 17:50:14 -0500

theroark gravatar image

updated 2018-03-25 17:51:56 -0500

The answer appears to be to abandon /etc/fstab and move to systemd. Here is the solution that worked for me and has the same functionality. It is copied from this post.

Note: systemd file name follows the path so if mounting /home/USER/here name has to be home-USER-here.mount:

sudo nano /etc/systemd/system/mnt-USB_USER.mount

{paste}

[Unit]

Description=cifs automount USB_USER

[Mount]

What=//192.168.0.35/USB_USER

Where=/mnt/USB_USER

Type=cifs

Options=credentials=/etc/.smbcredentials,rw,vers=1.0

[Install]

WantedBy=multi-user.target

{ctrl+x to exit and save} {do NOT enable}

sudo nano /etc/systemd/system/mnt-USB_USER.automount

[Unit]

Description=Automount CIFS USB_USER

Requires=network-online.target

After=network-online.service

[Automount]

Where=/mnt/USB_USER

TimeoutIdleSec=10

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-01-28 18:26:05 -0500

Seen: 357 times

Last updated: Mar 25 '18