diff --git a/dist/adastra-vtl-installer-1.0.0.tar.gz b/dist/adastra-vtl-installer-1.0.0.tar.gz index 6de9161..fcbeead 100644 Binary files a/dist/adastra-vtl-installer-1.0.0.tar.gz and b/dist/adastra-vtl-installer-1.0.0.tar.gz differ diff --git a/dist/adastra-vtl-installer/VERSION b/dist/adastra-vtl-installer/VERSION index 0c041be..884a96b 100644 --- a/dist/adastra-vtl-installer/VERSION +++ b/dist/adastra-vtl-installer/VERSION @@ -1,4 +1,4 @@ Adastra VTL Installer Version: 1.0.0 -Build Date: 2025-12-09 18:33:03 +Build Date: 2025-12-10 12:05:52 Build Host: vtl-dev diff --git a/dist/adastra-vtl-installer/web-ui/api.php b/dist/adastra-vtl-installer/web-ui/api.php index f15763f..45dd8e8 100644 --- a/dist/adastra-vtl-installer/web-ui/api.php +++ b/dist/adastra-vtl-installer/web-ui/api.php @@ -325,11 +325,18 @@ function addLun($params) { return; } + // Determine backing store type + $bstypeParam = ''; + if (strpos($device, '/dev/sg') === 0) { + $bstypeParam = '--bstype sg'; // Use sg (passthrough) for generic scsi devices + } + $command = sprintf( - 'sudo tgtadm --lld iscsi --mode logicalunit --op new --tid %d --lun %d --backing-store %s 2>&1', + 'sudo /usr/sbin/tgtadm --lld iscsi --mode logicalunit --op new --tid %d --lun %d --backing-store %s %s 2>&1', $tid, $lun, - escapeshellarg($device) + escapeshellarg($device), + $bstypeParam ); $output = []; diff --git a/web-ui/api.php b/web-ui/api.php index f15763f..45dd8e8 100644 --- a/web-ui/api.php +++ b/web-ui/api.php @@ -325,11 +325,18 @@ function addLun($params) { return; } + // Determine backing store type + $bstypeParam = ''; + if (strpos($device, '/dev/sg') === 0) { + $bstypeParam = '--bstype sg'; // Use sg (passthrough) for generic scsi devices + } + $command = sprintf( - 'sudo tgtadm --lld iscsi --mode logicalunit --op new --tid %d --lun %d --backing-store %s 2>&1', + 'sudo /usr/sbin/tgtadm --lld iscsi --mode logicalunit --op new --tid %d --lun %d --backing-store %s %s 2>&1', $tid, $lun, - escapeshellarg($device) + escapeshellarg($device), + $bstypeParam ); $output = [];