--- /dev/null
+# Using ID_SERIAL attribute for naming disks in collectd results in
+# data about the whole disk and each partition being mixed together
+# incorrectly, see: https://github.com/collectd/collectd/issues/823
+#
+# The rules below provide a ID_COLLECTD attribute instead, which
+# differentiates between the whole disk and its particular partitions.
+
+ACTION=="remove", GOTO="collectd_end"
+
+SUBSYSTEM!="block", GOTO="collectd_end"
+
+ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", ENV{ID_COLLECTD}="$env{ID_SERIAL}-disk"
+ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", ENV{PARTN}=="?*", ENV{ID_COLLECTD}="$env{ID_SERIAL}-part$env{PARTN}"
+
+LABEL="collectd_end"
UdevNameAttr "DM_NAME"
+Please note that using an attribute that does not differentiate between the
+whole disk and its particular partitions (like B<ID_SERIAL>) will result in
+data about the whole disk and each partition being mixed together incorrectly.
+In this case, you can use B<ID_COLLECTD> attribute that is provided by
+I<contrib/99-storage-collectd.rules> udev rule file instead.
+
=back
=head2 Plugin C<dns>