Files
vtl-appliance/docs/DEVICE_MAPPING_FEATURE.md
Othman H. Suseno 01080498af feat: Major VTL System Upgrade (Auth, Monitoring, CLI, Installer)
- Web UI:
  - Added secure Authentication system (Login, 2 Roles: Admin/Viewer)
  - Added System Monitoring Dashboard (Health, Services, Power Mgmt)
  - Added User Management Interface (Create, Delete, Enable/Disable)
  - Added Device Mapping view in iSCSI tab (lsscsi output)
- Backend:
  - Implemented secure session management (auth.php)
  - Added power management APIs (restart/shutdown appliance)
  - Added device mapping API
- CLI:
  - Created global 'vtl' management tool
  - Added scripts for reliable startup (vtllibrary fix)
- Installer:
  - Updated install.sh with new dependencies (tgt, sudoers, permissions)
  - Included all new components in build-installer.sh
- Docs:
  - Consolidated documentation into docs/ folder
2025-12-09 18:15:36 +00:00

1.6 KiB

📝 Added Device Mapping to iSCSI Tab

📅 December 9, 2025

📋 Request

The user requested to display the current SCSI device mapping (lsscsi -g output) on the iSCSI management tab in the Web UI. This allows for easier identification of which "sg" device corresponds to which tape drive or library.

🛠️ Changes Implemented

1. Web UI (index.html)

  • Added a "Device Mapping" card at the top of the iSCSI section.
  • Included a "Refresh" button for this specific section.

2. Backend (api.php)

  • Added a new API action device_mapping.
  • Implemented getDeviceMapping() function:
    • Executes lsscsi -g.
    • Filters output for mediumx (library) and tape devices.
    • Parses output to extract SCSI ID, Type, Vendor, Model, and Device Path.
    • Returns JSON structure.

3. Frontend (script.js)

  • Implement loadDeviceMapping() function.
  • Fetches data from device_mapping API.
  • Renders a table with:
    • SCSI ID (e.g., [3:0:0:0])
    • Type (e.g., mediumx, tape)
    • Vendor/Product (e.g., ADASTRA HEPHAESTUS-V)
    • Device Path (e.g., /dev/sg6) - Highlighted as this is crucial for LUN mapping.

Verification

  • The feature relies on lsscsi being available (which is standard in this environment).
  • The vtl CLI tool also uses similar logic.
  • The UI now clearly shows which /dev/sgX path to use when creating iSCSI LUNs.

📁 Files Modified

  • /builder/adastra-vtl/web-ui/index.html
  • /builder/adastra-vtl/web-ui/api.php
  • /builder/adastra-vtl/web-ui/script.js

🚀 Status

Feature deployed to /var/www/html/mhvtl-config/.