[collectd] [PATCH] Persistent names for linux's device mapper disks.

Simone Gotti simone.gotti at gmail.com
Sun Mar 13 17:54:30 CET 2011


On 02/04/2011 09:34 PM, Florian Forster wrote:
> Hi Simone,
>
> thank you very much for your patch :)
Hi Florian,

sorry for the long delay but I've been very busy.

> On Fri, Feb 04, 2011 at 05:41:29PM +0100, Simone Gotti wrote:
>> One thing that can be done and will be quite useful are persistent and
>> meaningful names for device mapper devices.
> Sounds great to me.
>
>> […], a config option to the disk plugin should be added to activate
>> it. I'll add it if you like this patch.
> I think that'd be a good idea. The HDDTemp plugin used the name
> "TranslateDevicename" for a similar option in the version 4 line of
> collectd. The option has since been removed, but I guess we can recycle
> the name of the option ;) The option should be handled regardless
> whether or not libdevmapper was available at compiile time – an
> appropriate error message should be logged if it wasn't.
>
> Please also document the option in src/collectd.conf.pod (see
> perlpod(1) for a description of the syntax) and src/collectd.conf.in
> (from which the default config file is generated).

Ok. I'll use that option name.

>> +			if (!(dmt = dm_task_create(DM_DEVICE_INFO)))
>> +	                	goto dmout;
> Can you please remove that "goto" from your code? If you need many exit
> paths for error checking, please put the code into a separate function.

Yes, I used the goto to handle many exit paths in the same way as done
in dmsetup and other device mapper's functions. If you're ok I'll put
this code in a separate function.

> Best regards,
> —octo

Thank!
Bye!


--
Simone Gotti



More information about the collectd mailing list