The part in the code below which adds FK_Device_ControlledVia = '$PK_Device' as a condition for the found storage devices means that only storage devices which are controlled by a core or MD are picked up by the script. I have some shares attached to a NAS which are not picked up, as this final constraint does not permit it.
Does anyone know why it's like this? I'm also surprised that nobody else has noticed this, as it would mean they could not record to NAS. Am I doing something odd here?
Thanks,
Chris
## Get a list of storage devices that use the pluto dir structure
if ($CommaSeparatedDeviceList eq '') {
print 'Finding devices in DB';
$sql="
SELECT
Device.PK_Device,
Device.Description
FROM
Device
JOIN Device_DeviceData ON FK_Device = PK_Device
WHERE
FK_DeviceTemplate IN (" . join(",",@TPL_STORAGE_DEVICES) . ")
AND
FK_DeviceData = $DD_USERS
AND
IK_DeviceData LIKE '%-1%'
AND
FK_Device_ControlledVia = '$PK_Device'
ORDER BY PK_Device
";
@results=RunSQL($sql);
foreach $row (@results) {
push(@Devices,$row);
}