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);
}
yes, the shares must be controlled my lmce, thats kinda the point. unless I am missing what you are saying.
how are these storage devices configured that are not being used?
it is a nas device, on the internal network correct?
it was detected by lmce and you chose to use lmce dir structure correct?
Yes, it was detected automatically, and I chose to use automatically and use lmce's dir structure. All the links etc are made.
The script simply does not pick that up as a valid share. I wondered if it is because the parent device of the share is the NAS itself, and not LMCE? If I remove the check on ControlledVia then it works fine.
Is this your script btw? I found another issue ;-)
Chris
I suppose it probably is now. I ported it from a bash version and then pretty much rewrote the whole thing.
if you find problems, please create trac tickets.