Walt Mankowski via plug on 22 Oct 2020 13:19:55 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Linux mount of Windows share keeps dropping


On Thu, Oct 22, 2020 at 03:52:47PM -0400, Keith via plug wrote:
> On 10/22/20 2:37 PM, Walt Mankowski via plug wrote:
> > Hi,
> > 
> > At work my desktop runs ubuntu 18.04.5. We're encouraged to keep most
> > of our work on a Windows share (the "H drive") because it's
> > automatically backed up and can be mounted anywhere.
> > 
> > I mount the share with the following command (with obvious changes):
> > 
> >    sudo /sbin/mount.cifs //path/to/share ~/H_drive/ -o
> >    username=<username>,dom=<dom>,uid=$USER,forceuid,gid=$USER,forcegid,dynperm,nobrl,vers=1.0
> > 
> > This worked fine for about a year, but lately it's been disconnecting
> > constantly after just a short period of idle. As you can imagine it's
> > quite frustrating and disruptive having to constantly umount and
> > re-mount the drive many times a day.
> > 
> > I've opened a ticket with our IT department, but since we're primarily
> > a Windows shop there's a good chance they won't know the answer. (Plus
> > there's a 3 day turnaround for help tickets!)
> > 
> > In the meantime I was wondering if anyone might have run into this
> > problem and if they have any ideas for fixes.
> > 
> > Thanks.
> > 
> > Walt
> > 

Thanks, Keith,

> I haven't run into that in a awhile and I would have to know more about the
> environment but typically with Windows I end up using "broad sword"  and
> inelegant tactics because root cause solutions are often not available (or
> definitive).  For the record, the last time I saw this happening, it
> actually was a network issue. Windows is a bit sensitive in that regard so
> this could be a server side issue.  There are a couple of registry settings
> I had to roll out to my Windows 10 users last year to address a similar
> issue (Windows 10 clients losing their network connections to a Samba 4
> server).  As a I recall that mostly was a compliant about performance issues
> (e.g. why is the network so slow?) and not an outright disco.

Obviously registry changes aren't an option since I'm running
Ubuntu. :) I have no visibility to what IT's server settings are, and
between the pandemic and their general lack of Linux chops I'm not
anticipating much help from their end.

> What I would ask/suggest is have you tried cron'ing or doing an infinite
> loop script to remount for your share shorter than your observed disconnect
> time?

The only thing I've tried is using different version numbers. The
"vers=1.0" looks like a red flag, right? Well, I didn't used to have
that. Then one day after an Ubuntu update, every time I tried to
access any files on the share it failed with a "stale file handle"
error. Google searches suggested adding "vers=1.0" and that fixed it
for at least 6 months until this started happening. I tried newer
versions again this morning, but the stale file handle error is still
there.

I'm nervous about doing any automatic umount/mount because I edit
files and run scripts from that share, and I'm worried it would cause
failures.

Walt

Attachment: signature.asc
Description: PGP signature

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug