Driver directory replication
-
I have a Driver folder in our image directory that is very large, is there a way to set replication to sync only specific drivers to specific sites? I tried setting up an “image” and pointed it to the specific folder (Image Path: Images/Drivers/Optiplex7400) inside the driver folder put it never replicated.
Currently the Driver folder is replicating 110GBs out to all of our sites when only a few folders really need to be copied.
-
@flareimp said in Driver directory replication:
I tried setting up an “image” and pointed it to the specific folder (Image Path: Images/Drivers/Optiplex7400) inside the driver folder put it never replicated.
Please check the log file (
/var/log/fog/fogreplicator.log
) to see why it wouldn’t replicate this particular path.As well let us know the FOG version, LInux OS and version you currently use.
Edit: There is a related topic from 2017, kinda sounds like this was not solved back then: https://forums.fogproject.org/topic/9158/replicating-drivers-across-fog-servers
-
@sebastian-roth Fog Version is 1.5.9, Ubuntu 20.04.03
Below is what the Log says[10-19-22 1:17:26 pm] | Image Name: Drivers Latitude3500
[10-19-22 1:17:26 pm] * Not syncing Image between groups
[10-19-22 1:17:26 pm] | Image Name: Drivers Latitude3500
[10-19-22 1:17:26 pm] | File or path cannot be reached. -
@FlareImp I don’t have a setup to test this kind of replication right now. So I can only go by what I see in the code. It looks like it should be able to find and replicate sub sub directories. Maybe the space in the name is causing a problem?
Can you take a screenshot of the image settings of this driver entry and post here?
-
@sebastian-roth I tried removing the space and just giving it the name of the folder itself. I am still seeing “File or path cannot be reached”.
-
@FlareImp I had another look at the code and found why it’s not replicating. Unfortunately it strips down the image path using a
basename()
call in FOG 1.5.9 (code ref). So if you set image path to (/images/)Drivers/Latitude3500
it actually tries to sync/images/Latitude3500
.I changed this behavior in FOG dev-branch as I think it’s a useful feature to be able to replicate single sub sub directories.
For FOG 1.5.9 you have three options:
- Manually implement the simple fix:
- Edit
/var/www/fog/lib/service/fogservice.class.php
on your server, line 439. - Remove the
basename()
call (don’t forget to remove one of the parentheses at the end as wel). See the change commited to github - only the line 439 change is needed, ignore the rest. - Restart the services (
systemctl restart FOGImageReplicator.service; systemctl restart FOGSnapinReplicator.service
) and check the log file again.
- Edit
- If you are good with bash scripting you can come up with a script to replicate that stuff using
rsync
to match your needs. - Don’t use sub sub directories but instead flat out your drivers directory, e.g. use (/images/)
Latitude3500_drivers
. - Update to FOG dev-branch.
- Wait for FOG 1.5.10 to be release - probably a few more weeks down the road.
- Manually implement the simple fix:
-
@sebastian-roth Thank you for all your help. I will give it a try.
-
The change worked great, Thank you!!!