- This topic has 4 replies, 2 voices, and was last updated Oct 10-4:56 pm by fanantix.
-
AuthorPosts
-
October 9, 2025 at 12:10 pm #187172
fanantix
MemberTesting my custom lighting adjustment script, I found that a mounted CIFS share was not reconnecting immediately after wake from suspend. The last of the dmesg log shows:
[290081.030353] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [290083.424426] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX [290083.424604] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [290252.770119] CIFS VFS: Server [x.x.x.x] has not responded in 180 seconds. Reconnecting...The share is properly reconnected after that delay. Is there a way to force re-connection immediately after wake (on ‘resume’) in an action script in /etc/pm/sleep.d/?
October 9, 2025 at 1:16 pm #187176abc-nix
MemberDoes this mounted share mount automatically or do you mount it manually? When mounting, you can configure the wait timeout and change it to 10-30 seconds, so you don’t have to wait so much. If mounted automatically (with autofs, for example), you can configure this option. If mounted manually, see how you can add this option to the mounting command.
Corruption has two hands: the Right and the Left. Don't let them squeeze you.
October 9, 2025 at 3:09 pm #187180fanantix
MemberMounted manually as a share:
sudo mount -t cifs //[x.x.x.x]/Users/ /media/xxx/xxxx -o username=xxx -o password= -o gid=1000 -o uid=1000Can I use remount to reconnect immediately?
October 9, 2025 at 4:05 pm #187184abc-nix
MemberYou could first try it manually with remount, and if it works, add it to /etc/pm/sleep.d/50cifs-remount (or some other name)
#!/bin/sh case "$1" in resume) sleep 3 && mount -o remount /media/xxx/xxxx ;; esacIf it doesn’t work, see if you can find a simple command to remount without having to give the password again.
Corruption has two hands: the Right and the Left. Don't let them squeeze you.
October 10, 2025 at 4:56 pm #187260fanantix
MemberThanks, abc-nix. I was unable to get the remount option to force an near-immediate reconnect on the CIFS share; as you suggested, I reduced the echo_interval (from 60 seconds, apparently) to 10 seconds so that dmesg now reports:
CIFS VFS: Server [x.x.x.x] has not responded in 30 seconds. Reconnecting...This delay and the additional network consumption is bearable. The share mount script now contains:
sudo mount -t cifs //[x.x.x.x]/Users/ /media/xxx/xxxx -o username=xxx,password=,gid=1000,uid=1000,echo_interval=10Thanks again.
- This reply was modified 11 months, 3 weeks ago by fanantix.
-
AuthorPosts
- You must be logged in to reply to this topic.