From: Alasdair G Kergon Subject: Re: dm: expose dm_copy_name_and_uuid() Date: Fri, 7 Feb 2020 01:24:33 +0000 Message-ID: <20200207012432.GA23327@agk-dp.fab.redhat.com> References: <20200201005524.23405-1-jdorminy@redhat.com> <20200203165402.GA11874@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com Content-Disposition: inline To: John Dorminy Cc: device-mapper development , Alasdair G Kergon , Mike Snitzer List-Id: dm-devel.ids On Thu, Feb 06, 2020 at 07:28:04PM -0500, John Dorminy wrote: > To be clear, I care more about getting the name in kernelspace than > about getting the UUID in kernelspace. (253:0) is a unique name for From the kernel's point of view, it is THE unique and definitive name for the lifetime of the device. It's the one thing userspace can rely upon (without assuming additional 'good' userspace behaviour) to tie together messages relating to the same device instance. > test-test, and we can get that via dm_device_name() at the moment. But > test-test is often a better name -- it's the name the user provided It can be changed and so processing can't rely on it without trusting both the userspace management code's self-imposed constraints and the sysadmin not to have worked around them. In other words, NEVER report name/uuid without ALSO still reporting dm_device_name alongside it. Also take a look at https://github.com/lvmteam/storage-logger which tackles logging all the relevant device information. Alasdair