Mounting point problems after pc crash/power cut

Hi,

We use rclone in combination with a local FTP server on a local network. The FTP server acts like a fileserver (instead of filesharing using a domain controller). We mount some FTP folders as local drives and some as folders on our Windows 10 clients. All works perfect (mounting and unmounting using batch files/scripts) until we have a power cut (which happens once week here in Vietnam). The mounted drives no problem, but the mounted folders are still there and they give an error if you try to open them. I can remove them manually and everything is OK again. But programmatically not. For example using a vbs script - it can locate the mounting point (mounted folder FSO.FolderExists(path2folder)), but FSO.DeleteFolder(path2folder) results in an error ("Path not found"). Of course we don't want our users to delete the mounting point manually. An ugly work around is to move the folder containing the mounting point to the temp folder (where it sits until you empty the temp folder manually) and recreate the folder that was just moved. Any suggestions?

Thanks

Can you kill and restart rclone - that should help.

Thanks Nick, but that doesn't work. Rclone is already killed due to the power cut, the mounting point just can not be removed programmatically as it is corrupted (I suppose). Logging off or shutting down the Windows machines without proper unmounting is no problem, but a machine crash (due to a power cut) is. Some more details: we have some folders our users need to access, but we don't want them to see them. We mount them in a (hidden) folder in "C:\ProgramData\Path2Folder" as "System" , so we get "C:\ProgramData\Path2Folder\System". The workaround is to move "Path2Folder" (including "Sytem") to the temp folder (or whatever we chose) en create "C:\ProgramData\Path2Folder" again.

hello and welcome to the forum,

i am not clear about your use-case, perhaps this will spark an idea?

whenever i create a VSS snapshot to be used with rclone
or when creating a rclone mountpoint, i always add a timestamp.
for example, rclone mount remote: b:\rclone\mount\remote\20210510.183747

this also allows my script to spawn as many VSS snapshots and sub processes at the same time.
each process has it own date.time stamp for all folder operations.

This sounds like more of a Window problem than an rclone problem.

Let me see if I understand you

  • you run rclone mount to mount an FTP server
  • then a power cut occurs on the client machine
  • after the power cut the mount points are no longer accessible
  • they can't be deleted except with a "Path not found" error

So it looks like the OS still thinks it is mounted when it isn't. Did you try net use /delete? That might work for unmounting the path.

Hi Nick,

Yes, I am also getting convinced it's an OS problem. Again: your suggestion did work :weary: Just found out that .NET applications can delete the mounding point by handling it as a "normal" folder. So I will do some coding and hope it is solved then.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.