From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 12 12:00:08 2022 Received: (at submit) by debbugs.gnu.org; 12 Jan 2022 17:00:08 +0000 Received: from localhost ([127.0.0.1]:58840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7gyl-0005BA-Jg for submit@debbugs.gnu.org; Wed, 12 Jan 2022 12:00:07 -0500 Received: from lists.gnu.org ([209.51.188.17]:35118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7gyh-0005Aw-MF for submit@debbugs.gnu.org; Wed, 12 Jan 2022 12:00:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7gyb-0000Vw-DW for bug-coreutils@gnu.org; Wed, 12 Jan 2022 11:59:59 -0500 Received: from smtp02-ext3.udag.de ([62.146.106.33]:56350) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7gyZ-0002fz-Na for bug-coreutils@gnu.org; Wed, 12 Jan 2022 11:59:57 -0500 Received: from a2021.localnet (unknown [79.97.148.125]) by smtp02-ext3.udag.de (Postfix) with ESMTPA id AB234E041F; Wed, 12 Jan 2022 17:59:53 +0100 (CET) From: Joachim Wagner To: bug-coreutils@gnu.org Subject: feature request: mount option to specify the device number Date: Wed, 12 Jan 2022 16:59:52 +0000 Message-ID: <3410291.iIbC2pHGDl@a2021> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Authentication-Results: smtp02-ext3.udag.de; auth=pass smtp.auth=mqzmail-eu-0005 smtp.mailfrom=jo2l@mqzmail.eu Received-SPF: none client-ip=62.146.106.33; envelope-from=jo2l@mqzmail.eu; helo=smtp02-ext3.udag.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Not sure whether this is coreutils or kernel. Maybe both. A filesystem's device number such as reported by `stat` can be derived from major and minor of the underlying block device, e.g. xfs, or be allocated at mount time, e.g. btrfs. Even in the former case, the device number can change between restarts, e.g. when multiple dm-crypt devices are created in different order. Changing device numbers cause trouble for applications that use the device number to identify a filesystem across restarts, e.g. KDE's baloo file indexer. A mount option to specify the device number would fix this trouble without requiring applications to move to alternative ways of identifying filesystems, e.g. based on UUIDs. This option could be general, i.e. the device number can be set for any filesystem, including those that normally derive it from major and minor of their block device(s). The implementation would probably be simplified if the specified device numbers must come from a reserved pool. Otherwise, care must be taken that the numbers do not collide with automatically assigned device numbers, including those allocated later. Replaces bug #53209 References: https://bugs.kde.org/show_bug.cgi?id=402154 https://bugs.kde.org/show_bug.cgi?id=404057 https://bugs.kde.org/show_bug.cgi?id=413694 https://unix.stackexchange.com/questions/345220/btrfs-how-to-get-real-device-id https://stackoverflow.com/questions/4309882/device-number-in-stat-command-output/4309947 From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 12 12:46:44 2022 Received: (at 53212) by debbugs.gnu.org; 12 Jan 2022 17:46:44 +0000 Received: from localhost ([127.0.0.1]:58985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7hhr-0004Hs-Nh for submit@debbugs.gnu.org; Wed, 12 Jan 2022 12:46:44 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:41327) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7hhp-0004C1-Er; Wed, 12 Jan 2022 12:46:42 -0500 Received: from [192.168.101.10] ([93.218.103.209]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MZkxj-1msfNd1gSF-00WkSo; Wed, 12 Jan 2022 18:46:34 +0100 Message-ID: Date: Wed, 12 Jan 2022 18:46:33 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: bug#53212: feature request: mount option to specify the device number Content-Language: en-US To: Joachim Wagner , 53212@debbugs.gnu.org References: <3410291.iIbC2pHGDl@a2021> From: Bernhard Voelker In-Reply-To: <3410291.iIbC2pHGDl@a2021> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:jeBbZZdJF+LZEjRZRWjBOUIv8oYSsm+tWjeJKsgyOCgv9UPrSWz xX8ecDPaOBWYJpwKhSVh+JioJjle7Dd52BVRLWRJmaxOOK0RZwCvz8gldifwRB9b7qcsl70 QD2PcTv2WZhI5ke5wv+8HFxG7Q6Z6SCDYd73xgTDyJbGSHa16YR4e5m/bUjwz+Rp8eR2hsB w4RN/m3ecE48/9RCTbhhA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:m4L8PjqM0I8=:82q2b9D/ZeZ5si4KxublPE eapjzRVEhvcntF/fYvA7fWD4/UtpDKXgaaZEGdadPfuDQXYz+YcatGqxgoJpXsMZquFfPGLnZ wRrZAhAiyRF78Sdy1wa4BMw1vsFXlgIU0rHavJ1G9L+LADEMuZ6g9LzsZk1eQs1+Xfnp4FWAo TdAreS/80p2SoYeJwGklBzP5Xhtcwrd8beiiA5PYUCSvUnkwE6mvYLKwybiiHxHmICu2YdVVm NUy2OVlu3OZpHT76NWiBy5SUxbyUBQp1iDvhHCOAoNBhFfX/jjU50DdvlBOR1L5ZbOmprd+Nt jlNcAtxAdD7MJelJCyR4118hmiC4adZzeGVPUmUlJBLQHV9eGkkFcS9/I41HIroH9sOUnmf+H zFrmTEme1oX/IAKXQChaNDPJlEum4scJXFxEjdq1LZovTOqVcgEGcOQAieGnzC/Vr17aCeocb Zi2D8m0OV+2150jtSFnCEM8lro8qnwHp98bTRRlN3bhl8YOnT9Nz1JR3U8DxWlO7S8ZuOMyLs H9JbFxE7+Ynp48WADD9BrSNibKYvq4uvn6iKR3u0eENaXZXZy/BKn8rZCwutRokVPIVFuD/jp +j2Opc+DzLyXtiE7M9F+NmkQMFmA0+zF13W8jfMt1/mry9qxUpptv9Y3vaCSJyyKUr06y4Iq8 QEeh/y3ccTv/rTABzTqOS7cEms+zNlGvmxe4LTHpi/ePY5gd33r9jIRm807NWEIbjnT5VAj/N V78fYmKbTq9Qjc6e X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 53212 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) tag 53212 notabug close 53212 stop On 1/12/22 17:59, Joachim Wagner wrote: > Not sure whether this is coreutils or kernel. Maybe both. > > A filesystem's device number such as reported by `stat` can be derived from > major and minor of the underlying block device, e.g. xfs, or be allocated at > mount time, e.g. btrfs. Even in the former case, the device number can change > between restarts, e.g. when multiple dm-crypt devices are created in different > order. Changing device numbers cause trouble for applications that use the > device number to identify a filesystem across restarts, e.g. KDE's baloo file > indexer. > > A mount option to specify the device number would fix this trouble without > requiring applications to move to alternative ways of identifying filesystems, > e.g. based on UUIDs. This option could be general, i.e. the device number can > be set for any filesystem, including those that normally derive it from major > and minor of their block device(s). > > The implementation would probably be simplified if the specified device > numbers must come from a reserved pool. Otherwise, care must be taken that the > numbers do not collide with automatically assigned device numbers, including > those allocated later. > > Replaces bug #53209 > > References: > https://bugs.kde.org/show_bug.cgi?id=402154 > https://bugs.kde.org/show_bug.cgi?id=404057 > https://bugs.kde.org/show_bug.cgi?id=413694 > https://unix.stackexchange.com/questions/345220/btrfs-how-to-get-real-device-id > https://stackoverflow.com/questions/4309882/device-number-in-stat-command-output/4309947 mount is a command from the util-linux package, hence you'd be better off asking on their mailing list . FWIW: mount already knows quite a list of alternatives how to specify the source device: mount --help | sed -n '/^Source:/,/^$/p' Source: -L, --label