[Bug]: File synchronization exception in shared folder
Operating system
archlinux
Description
I generated an Excel file in the Java program of the podman container on the host computer and placed it in the/home/example directory. This directory corresponds to the \ \ host.lan \ Data directory, but sometimes it can be synchronized quickly or slowly in the \ \ host.lan \ Data path inside the Windows container. I tried refreshing it by pressing F5 in the \ \ host.lan \ Data directory, but the corresponding file did not appear until after a while, about 1-2 minutes
Docker compose
sudo podman run --rm -it --name windows \
--net=bridge \
--cap-add=NET_ADMIN \
--cap-add=NET_RAW \
--device=/dev/kvm \
--device=/dev/net/tun \
--sysctl net.ipv4.ip_forward=1 \
-v "${PWD:-.}/windows:/storage" \
-v /home/example:/data \
-p 8006:8006 \
-p 8000:8000 \
--stop-timeout 120 \
dockurr/windows
Docker log
sudo podman run --rm -it --name windows \
--net=bridge \
--cap-add=NET_ADMIN \
--cap-add=NET_RAW \
--device=/dev/kvm \
--device=/dev/net/tun \
--sysctl net.ipv4.ip_forward=1 \
-v "${PWD:-.}/windows:/storage" \
-v /home/example:/data \
-p 8006:8006 \
-p 8000:8000 \
--stop-timeout 120 \
dockurr/windows
Screenshots (optional)
I have also encountered the same problem. Have you solved it?
Try with version v5.00 of the container, it has a bit newer version of Samba, maybe that fixes the issue.
Pissed me off too...
Solved by adding a key in the Windows container registry:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"DirectoryCacheLifetime"=dword:00000000
References: https://woshub.com/slow-network-shared-folder-refresh-windows-server/ https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-7/ff686200(v=ws.10) https://learn.microsoft.com/en-us/windows-server/administration/performance-tuning/role/file-server/
The default value is said to be 10 seconds, but it's definitely not the case (somebody at MS mixed up seconds and minutes ?). However, with the value set to 0, we now get instant updates.
Would be great to see this included within the unattended install xml.
Edit : The new files took minutes to appear in a Tiny11 23H2 container, which led me to investigate and test the abovementioned registry setting with success. But, on Tiny11 25H2, the new files appear quickly out of the box. (Seems that the default 10 seconds value is properly applied here)