Date: Mon, 28 Oct 2019 20:57:15 -0600 From: Alan Somers <asomers@freebsd.org> To: Thomas Mueller <mueller6722@twc.com> Cc: FreeBSD Net <freebsd-net@freebsd.org> Subject: Re: Umounting an NFS-mounted share after connection is lost? Message-ID: <CAOtMX2iUNBW74-aDGuO71qwKCj2FSfj3u6BtXMd8WRd7Bmwqeg@mail.gmail.com> In-Reply-To: <5db7a997.1c69fb81.febc8.0d1cSMTPIN_ADDED_MISSING@mx.google.com> References: <5db7a997.1c69fb81.febc8.0d1cSMTPIN_ADDED_MISSING@mx.google.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 28, 2019 at 8:53 PM Thomas Mueller <mueller6722@twc.com> wrote: > How do you umount a file system that has been mounted with mount_nfs when > the connection is lost? > > Server can crash, cable modem could quit and not hold power, or a change > in cable modem or router could change 192.168.0.1 to 192.168.1.1 . > > Running umount hangs the terminal session. Is there a way out short of > rebooting? > > In the case of a server crash, I could reboot the server, mount the > desired partition, run "/etc/rc.d/mountd restart", and be good again. > > But last weekend, the cable modem-router lost power, could be restored by > unplugging and replugging, but would only hold for maybe a half minute > before going dark again. > > Charter Spectrum support told me that I could get a free replacement, > which I did, cable modem and router were two separate pieces this time. > > I was able to install the equipment successfully but noticed that the > router address was 192.168.1.1 rather than the old 192.168.0.1 . > > I was left with /homeawayfromhome that I couldn't unmount except by > rebooting. > > Tom > If you mount your NFS share with the -o intr option, then you can forcibly unmount it when the server is unavailable. However, that's not generally recommended. A lot of applications can't gracefully handle an error in read(2) or write(2). -Alan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2iUNBW74-aDGuO71qwKCj2FSfj3u6BtXMd8WRd7Bmwqeg>