- 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
1.6 KiB
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) andtapedevices. - Parses output to extract SCSI ID, Type, Vendor, Model, and Device Path.
- Returns JSON structure.
- Executes
3. Frontend (script.js)
- Implement
loadDeviceMapping()function. - Fetches data from
device_mappingAPI. - 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.
- SCSI ID (e.g.,
✅ Verification
- The feature relies on
lsscsibeing available (which is standard in this environment). - The
vtlCLI tool also uses similar logic. - The UI now clearly shows which
/dev/sgXpath 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/.