Date: Thu, 11 Jun 2020 16:14:09 -0700 From: "Ronald F. Guilmette" <rfg@tristatelogic.com> To: freebsd-questions@freebsd.org Subject: Bug or Feature? -- Disappearing /dev/ nodes after mount Message-ID: <86546.1591917249@segfault.tristatelogic.com>
next in thread | raw e-mail | index | archive | help
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 <device>'. 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86546.1591917249>