Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch brings some of the physical and virtual drive attributes as
custom_fields
to the disks inventory.The goal is to have this information present to ease disks maintenance when a drive becomes unavailable and its attributes can't be read anymore from the RAID controller.
It also helps to standardize the extended disk attributes across the different manufacturers.
As the disk physical identifers were not available under the correct format (hexadecimal format using the
xml
output as opposed asX:Y:Z
format using the defaultlist
format), the command line parser has been refactored to read thelist
format, rather thanxml
one in theomreport
raid controller parser.As the custom fields have to be created prior being able to register the disks extended attributes, this feature is only activated using the
--process-virtual-drives
command line parameter, or by settingprocess_virtual_drives
totrue
in the configuration file.The custom fields to create as
DCIM > inventory item
Text
are described below.In the current implementation, the disks attributes ore not updated: if a disk with the correct serial number is found, it's sufficient to consider it as up to date.
To force the reprocessing of the disks extended attributes, the
--force-disk-refresh
command line option can be used: it removes all existing disks to before populating them with the correct parsing. Unless this option is specified, the extended attributes won't be modified unless a disk is replaced.It is possible to dump the physical/virtual disks map on the filesystem under the JSON notation to ease or automate disks management. The file path has to be provided using the
--dump-disks-map
command line parameter.