Files
vtl-appliance/SERVICE_STATUS.md

2.2 KiB

Adastra VTL Service Status

Service Fixed!

The mhvtl systemd service has been fixed and is now working correctly.

Service Status

systemctl status mhvtl
● mhvtl.service - mhvtl Virtual Tape Library
     Active: active (exited)

What Was Fixed

  1. Queue Number Issue: vtltape requires -q <number> argument, not just -q
  2. Lock File Cleanup: Added automatic cleanup of stale lock files in /var/lock/mhvtl/
  3. Error Handling: Script now handles errors gracefully without failing the service
  4. Process Detection: Checks if daemons are already running before starting

Current Warnings (Expected)

The service shows warnings about:

  • Kernel module not found: This is normal if mhvtl kernel module isn't compiled for your kernel
  • vtllibrary config errors: This is normal until library.conf is properly configured

These warnings don't prevent the service from starting successfully.

Service Files

  • Start Script: /opt/adastra-vtl/scripts/start-mhvtl.sh

    • Cleans lock files
    • Loads kernel module (if available)
    • Starts all configured drives and libraries
  • Stop Script: /opt/adastra-vtl/scripts/stop-mhvtl.sh

    • Stops all vtltape and vtllibrary processes
    • Cleans lock files
    • Unloads kernel module
  • Systemd Service: /etc/systemd/system/mhvtl.service

    • Type: forking
    • Restart: on-failure
    • User: root

Usage

# Start service
systemctl start mhvtl

# Stop service
systemctl stop mhvtl

# Restart service
systemctl restart mhvtl

# Enable on boot
systemctl enable mhvtl

# Check status
systemctl status mhvtl

# View logs
journalctl -u mhvtl.service -f

Next Steps

To fully configure mhvtl:

  1. Configure devices: Edit /etc/mhvtl/device.conf
  2. Configure library: Edit /etc/mhvtl/library_contents.10 and .30
  3. Compile kernel module (optional, for better performance):
    cd /usr/src/mhvtl-*
    make
    make install
    
  4. Restart service: systemctl restart mhvtl

Web UI

Access the configuration web UI at:

http://[SERVER-IP]/mhvtl-config

The web UI provides a graphical interface to configure mhvtl devices and libraries.