From owner-freebsd-net@freebsd.org Tue Oct 29 02:57:28 2019 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E9867167313 for ; Tue, 29 Oct 2019 02:57:28 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 472GTg5pklz3MCL for ; Tue, 29 Oct 2019 02:57:27 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f169.google.com with SMTP id y194so3169485oie.4 for ; Mon, 28 Oct 2019 19:57:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y5QOal+e7RrGnXsaPQ99WMAHZlul9QX1cX5z5xnRRI0=; b=UWT/WmXx110qfjV71P4DgpqGAPg5fkSCgq7eKNuXUHr3kOagvx2sSRlEaFDKSY/bo2 IyCljYokSuCyHzwdmi5IOjxBhOaRTh0rRLaaDwVKEa4rLkGuUHCScs8K2K4Qu3I2GUox 8pvgBTzTc5R+Mqk68bCG9/rU3hFG2ZTzyy7/Tx1VItcfz9WRaHKaUFbbmKdpqud9KAeV XfAJuUYaqeZLKtGLQ2caFh1AIdov2W55FqiGB1Iw18djg0gdlLgugadfOqM0QhHhEF1K yKhRzop2gwErwStCnmoKRGebrhjZWle1Hhy2mcYpz6FvPZbwDpCF4Ht8C6Qtaglil6CF RdgA== X-Gm-Message-State: APjAAAWf+abk2rgD2F/EsXgX6M3I1ZHJT1bK1x+dR7mrcd5w2nGf70Uk bh6lvA/aHDa5UXXVMPt3KSP9mMYUjb3wCaxBSIw= X-Google-Smtp-Source: APXvYqyHAoEVDLaay89U+naQzAKdfTnwsct/mnqFpQP1HpS3qGOah3OcZZHOJs4KOQigLCK/KrnyLbolCexqJhCpkEQ= X-Received: by 2002:a05:6808:6d8:: with SMTP id m24mr2012917oih.73.1572317846332; Mon, 28 Oct 2019 19:57:26 -0700 (PDT) MIME-Version: 1.0 References: <5db7a997.1c69fb81.febc8.0d1cSMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: <5db7a997.1c69fb81.febc8.0d1cSMTPIN_ADDED_MISSING@mx.google.com> From: Alan Somers Date: Mon, 28 Oct 2019 20:57:15 -0600 Message-ID: Subject: Re: Umounting an NFS-mounted share after connection is lost? To: Thomas Mueller Cc: FreeBSD Net X-Rspamd-Queue-Id: 472GTg5pklz3MCL X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.169 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.15 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[169.167.85.209.list.dnswl.org : 127.0.5.0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(-1.15)[ip: (-0.41), ipnet: 209.85.128.0/17(-3.22), asn: 15169(-2.05), country: US(-0.05)]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; FREEMAIL_TO(0.00)[twc.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[169.167.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Oct 2019 02:57:29 -0000 On Mon, Oct 28, 2019 at 8:53 PM Thomas Mueller 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