From owner-freebsd-questions@freebsd.org Thu Jun 11 23:14:17 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 21F43344D00 for ; Thu, 11 Jun 2020 23:14:17 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from outgoing.tristatelogic.com (segfault.tristatelogic.com [69.62.255.118]) by mx1.freebsd.org (Postfix) with ESMTP id 49jfnN0gWLz4YYc for ; Thu, 11 Jun 2020 23:14:15 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: by segfault.tristatelogic.com (Postfix, from userid 1237) id 46F7E4E751; Thu, 11 Jun 2020 16:14:09 -0700 (PDT) From: "Ronald F. Guilmette" To: freebsd-questions@freebsd.org Subject: Bug or Feature? -- Disappearing /dev/ nodes after mount MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <86545.1591917248.1@segfault.tristatelogic.com> Date: Thu, 11 Jun 2020 16:14:09 -0700 Message-ID: <86546.1591917249@segfault.tristatelogic.com> X-Rspamd-Queue-Id: 49jfnN0gWLz4YYc X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rfg@tristatelogic.com designates 69.62.255.118 as permitted sender) smtp.mailfrom=rfg@tristatelogic.com X-Spamd-Result: default: False [-1.21 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.58)[-0.584]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[tristatelogic.com]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.65)[-0.647]; NEURAL_SPAM_SHORT(0.32)[0.320]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14051, ipnet:69.62.128.0/17, country:US]; SUBJECT_HAS_QUESTION(0.00)[] 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, 11 Jun 2020 23:14:17 -0000 If a disk device which has been partitioned using GPT partitioning exists and is powered on and is installed in a given system, and if there exists on that disk device a GPT partition which had been given the GPT partition name `partname' then a character special device node representing that specific partition will normally appear, automagically, underneath the /dev/gpt/ directory. The node in question will have the name `/dev/gpt/partname' Interestingly, as I have just learned, when and if the user subesquently mounts the relevant partition, the corresponding `/dev/gpt/partname' node will, rather unexpectedly and magically, disappear until such time as the relevant partition is unmounted, whereupon it will reappear. Despite having looked over several of the arguably relevant man pages, I have not found any place where this specific bit of automagical kernel behavior is documented. Thus, I am left with questions: 0) Am I the only one who has observed this specific behavior? 1) Is this behavior documented somewhere that I just failed to look at? If so, where? 2) Is there a consensus that the magical disappearance of /dev/gpt/ device nodes during times when the corresponding partition is mounted represents a feature, rather than a bug? Regards, rfg P.S. Despite the occasional disappearance of /dev/gpt/ device nodes, as described above, a complete listing of all of the GPT partitions, irrespecitive of their mount status, along with their respective labels, is still always available via `gpart show -l '. The `glabel list' command also shows all relevant partitions and their GPT lables, once again, irrespective of the mount status of any of the relevant partitions. P.P.S. I have not checked, but it is my assumption that this disappearing /dev/ node "feature" likely also affects device nodes that get automagically created underneath any of the other /dev/ subdirectories listed in the glabel(8) man page.