SMB share refresh question in debian

More
2 years 3 months ago #305361 by Mecanix
Never had a problem, works everytime. Here's some set-up notes. 
Code:
$ sudo apt install samba $ sudo -s $ mkdir /home/share $ chmod 777 /home/share $ exit $ sudo nano /etc/samba/smb.conf     ###### (Under [global])         unix charset = UTF-8     ###### (Replace with network/machine addresses)     interfaces = 127.0.0.0/8 enp3s0 192.168.10.0/24 wlp1s0 192.168.10.0/24     ######      bind interfaces only = yes     map to guest = Bad User     ###### (Add this at the end of the conf file)     [Share]     path = /home/share     writable = yes     guest ok = yes     guest only = yes     create mode = 0777     directory mode = 0777 $ sudo systemctl restart smbd.service ON WINDOWS, MAP DRIVE or CREATE SHORTCUT e.g. \\192.168.10.100\share

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #305381 by chienMouille
Thank you all for the suggestions!

@cornholio: I did try with both smb and nfs shares, and the problem of refreshing is the same. Changes made on the machine are relfected on the server and other computers on the network instantly, but the reverse isn't. Even the folder up buttons don't work in the GUI, both on the debian file explorer and the Probebasic file explorer. (i think it tries to go up a directory on the server, which it isn't allowed to do). Pressing F5 works in the debian file explorer. 

@mecanix: I have tried many modification to smb.conf, including the ones you suggest. Except, I never tried to have it set as a public folder like you do. I have rwe permissions on everyone except guests who don't have access. I was mounting the share using credentials. Again, I could see and upload files to it so i think permissions are working, It just wouldn't update automatically, just making the day to day workflow pretty tidious. Either a debian bug or lack of feature, or an issue with cache settings, or CIFS notification protocol.

The refreshing issue is identical on the second test device RPi5, running rpios. So I don't think it has anything to do with the linuxcnc real time kernel.

Eventually, I ended up doing an overkill set up, which is now avoiding the problem: I let the folder as an SMB share on the server (so i can access it from the multiple devices I use (the PC being the main one) and installed SYNCTHING in a docker container on the server as well as on the CNC computer. It does watch both folders for changes and updates them accordingly. It is making local copies on both devices, which not only allows the folders to be updated instantly and automatically in both the debian and Probe basic file explorers, but let's me load the gcode from the machine's storage and not through the network, which is a plus. Also, if one of the devices is offline, the changes are just queued and nothing hangs like windows was if the smb folder was mounted but the device disconnected (which sometimes it was doing, freezing the file explorer for several minutes before giving up on the share and marking it "disconnected", aaaah windows).

Anyways, thanks a lot, I wish i had an actual fix to document here for future users, but I only have this overkill workaround.

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #305432 by Cant do this anymore bye all
I just can't replicate the issues you are having.
Even when using a sftp connection from the system file manager I can't replicate these issues.
When you say changes, do you mean changes to the file system, ie adding a new file, or editing a file ie changes to the contents of a file, as that can be a whole different kettle of fish.
When mounting a share on the Linuxcnx box, are you manually mounting it via using mount on the command line or do you have an entry in fstab ? Is that entry auto or noauto?
Another thing to tryis to open the file browser of probe basic, in a second window copy a file to the directory you have open in probe basic and see if you can get that file to show .

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #305554 by chienMouille
By changes I mean adding a new file or deleting one. Actually didn't try modifying the content of an existing one.

I tried both mounting using mount and using fstab.

Any changes made directly on disk will be reflected instantly in the file browser both in debian and in probebasic. So when the folder is hosted on the machine, even as an smb or nfs share, it does work. It doesn't only when it is a remote share. Like, it works, but I have to manually refresh it to see the changes. Either by F5 command or by exiting and re-entering the folder. (which doesn't work well in probe basic).

This also why the syncthing workaround functions. Because a full copy of the folder is hosted on the machine.

I believe the problem is with the remote share notification protocol.

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #305558 by Cant do this anymore bye all
It would seem to be the problem you are describing is an issue with the probe basic file browser.
It would be an idea to make that issue known, especially the difficulty in moving through the directory tree.
Whilst your solution appears to work it would appear to be only slightly better than running rsync every couple of minutes via cron.

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #305577 by chienMouille
Yeah, the watchdog they have in Syncthing seems to loop more often than every couple of minutes. I also almost just wrote a simple watch script in python to monitor the folder and pull any changes. Of course pushing is always more ressources economical. I just assumed the mechanism they implemented in Syncthing would be more efficient than any of my poor man's solutions.

Any idea where I can suggest to Probebasic to implement a REFRESH button?

Please Log in or Create an account to join the conversation.

Time to create page: 0.415 seconds
Powered by Kunena Forum