Skip to content

Conversation

@alex001x
Copy link

@alex001x alex001x commented May 23, 2025

A comprehensive extension for OpenDCIM, named feature_HDD, which adds hard-drive (HDD) management with HDD reporting and rights management.

hdd006 hdd-003 hdd003 hdd005 hdd-006 hdd-001 hdd-002 hdd-005 image

This PR introduces a new HDD-management module to openDCIM, enabling full lifecycle tracking for hard disks associated with devices. The key components are:

  • New configuration parameters to enable/disable HDD management and logging.
  • New PHP controller page managementhdd.php for HDD operations per device — creation, update, status change, destruction.
  • Enhanced device model: HDDs can now be linked to devices without impacting existing device management.
  • CSV import script (import_hdd_csv.php) audit — includes detection of already processed destroyed HDD IDs, optional shared proof document upload, automatic assignment of status + dates, and generation of a downloadable log.
  • Comprehensive logging via existing logging subsystem (logging.inc.phpfac_GenericLog) for all critical actions: CSV batch import, manual “Destroy Selected”, audit certification, etc.
  • UI component hdd_log_view.php to display HDD activity history in the web interface (viewable only if HDD management is enabled).
  • Conditional integration of HDD report in UI — visible only when module is activated.
  • Internationalization support: added French translations for all new UI strings, integrated in locale infrastructure.
  • Backward-compatible design: if HDD module is disabled, the existing openDCIM functionality remains unchanged.

Database / Data Model
(If applicable) this PR includes the necessary schema modifications to store HDD metadata (serial, status, destruction date, import audit fields, etc.). Please refer to the included SQL migration script.

Security and Permissions
HDD management and destruction features respect existing user rights / role definitions. Only users with appropriate permissions can view or manage HDDs.

Usage / Workflow

  1. Enable HDD management via configuration.
  2. Associate HDDs to devices (futur avec ocs inventory).
  3. Use the “HDD Inventory” UI to view disks.
  4. When a disk must be destroyed: select it, trigger “Destroy Selected” → status and destruction date updated, log entry created, optional proof document upload.
  5. Use “HDD Activity Log” view to audit events or export logs.

Motivation / Use Cases
Many datacenters require traceable HDD lifecycle management for compliance, data destruction policies, and asset tracking. This module fills a gap in openDCIM by adding disk-level traceability. It enables: maintenance planning, secure destruction workflows, audit trails, and compliance with data-security standards.

Backward-Compatibility & Impact
No changes to existing core functionality if module disabled. The new module is fully opt-in, with no effect on users who do not enable it.

Testing & Quality Assurance

  • CSV import tested on multiple sample inventories (duplicate detection, status update, log export).
  • Manual HDD life-cycle (creation → destruction) tested on devices with and without HDDs; UI and logs verified.
  • English + French UI strings checked.

Reviewers are welcomed for code layout, security review, potential performance issues on large inventories, and suggestions for improvements (bulk delete safety, pagination, UI refinements, etc.).

@alex001x alex001x marked this pull request as draft May 23, 2025 10:34
@alex001x
Copy link
Author

To finalize, the Add Proof of Destruction button is missing.
Planned future addition.

@alex001x alex001x marked this pull request as ready for review November 28, 2025 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant