From owner-freebsd-questions@freebsd.org Thu Aug 20 17:23:39 2020 Return-Path: Delivered-To: freebsd-questions@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 E2F543C4199 for ; Thu, 20 Aug 2020 17:23:39 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4BXWhW1JL9z3TPs for ; Thu, 20 Aug 2020 17:23:39 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by mail-wm1-x333.google.com with SMTP id 3so2336209wmi.1 for ; Thu, 20 Aug 2020 10:23:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qOAjq1a0P1kcKDYiI62CB50Gc5YpFVShvA2dqRTbFDA=; b=LMi7b3XdE3qprXldQ4zLfG1cGLdzYwxV1LA8rMtuNoPSVLezjpgIhJNTbAFzihDJHu vnH6+oddTrOa9MyMa27DDqwx95GpRsNGzigLu85xbz/oEAFsU/ag/SsHXn8N52cATG80 L9aPD3Tu+XGLefFmfW7uuL1eCFTInMcQWssdsVg0ZoRpCKxNiUjlfE5YPEBtgGCioiKs iBs9SUFDpC/Wt7ypB/MKjZz2WRHiBOJr1LpaRCdfsSCFCe9TNg7aZ34JGQ+oTsidFVb+ HjAYeausCg51iIggTy+0+k0c12W+z0ZrnuzilOTrn57/tU/tJvzd+qONYIeFRv2X3ECS 6ADA== X-Gm-Message-State: AOAM532X4HpR6x33FWaE9nKS76QrnnmL+lRsvXd0SO2VbR3+B77exeu4 JQsMehlVH88RH3adCAVhrcDWlOLFB5A= X-Google-Smtp-Source: ABdhPJy1iAI2ProJt4N6gAsKvV6dvoFQIbr+IQl61nXlRSGe6lMtNPCkBvRSwi465KUaCJjCDn/QUw== X-Received: by 2002:a7b:c105:: with SMTP id w5mr4447202wmi.146.1597944217372; Thu, 20 Aug 2020 10:23:37 -0700 (PDT) Received: from gumby.homeunix.com ([2.217.224.242]) by smtp.gmail.com with ESMTPSA id 15sm4986689wmo.33.2020.08.20.10.23.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2020 10:23:36 -0700 (PDT) Date: Thu, 20 Aug 2020 18:23:35 +0100 From: RW To: freebsd-questions@freebsd.org Subject: Re: Correct way to disconnect/eject an USB hard disk ? Message-ID: <20200820182335.4f2048c6@gumby.homeunix.com> In-Reply-To: <20200820044352.678a588e.freebsd@edvax.de> References: <20200819142952.3686baa8.freebsd@edvax.de> <20200820044352.678a588e.freebsd@edvax.de> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; amd64-portbld-freebsd12.1) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BXWhW1JL9z3TPs X-Spamd-Bar: / X-Spamd-Result: default: False [-0.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[googlemail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[googlemail.com:+]; DMARC_POLICY_ALLOW(-0.50)[googlemail.com,quarantine]; NEURAL_HAM_SHORT(-0.01)[-0.012]; RECEIVED_SPAMHAUS_PBL(0.00)[2.217.224.242:received]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[googlemail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; DWL_DNSWL_NONE(0.00)[googlemail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.49)[-0.489]; R_DKIM_ALLOW(-0.20)[googlemail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::333:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Aug 2020 17:23:39 -0000 On Thu, 20 Aug 2020 04:43:52 +0200 Polytropon wrote: > The USB controller accepts and confirms the last > chunk of data, reports back "Got it, everything is fine." > Now the umount command does what it says on the can, it > unmounts the medium, and returns control to the user. > Now _internally_ the USB stick is still busy _actually_ > writing the last chunk of data to its storage, ... > The idea of "just give it a few seconds after you physically > remove the USB stick" relies on the assumption that such > kind of activity takes place outside the control of the OS, > and the OS has no real way of discovering what's really > happening at that point. I'm wondering how "now safe to remove" notifications work in windows and other operating systems. And is shutting down or suspending to disk just guesswork? I don't know, but I'd be surprised if there aren't mechanisms in sata, usb etc, to ensure data has been committed to non-volatile storage.