Hi all,
Feels funny to be back here. Been mostly lurking for the last ~15 years and judging by my SSO username it seems like at some point my old one got lost...
I'm having some trouble with a server that seems to be lying to me. Or rather I think it is confused.
In a nutshell, this is my problem:
Code:
root@muchmuch ~ # cd ~syncthinger/.config
root@muchmuch /home/syncthinger/.config # ls -a
. ..
root@muchmuch /home/syncthinger/.config # mkdir syncthing
mkdir: cannot create directory ‘syncthing’: File exists
root@muchmuch /home/syncthinger/.config # rm -r syncthing
rm: cannot remove 'syncthing': No such file or directory
For context:
I've been running this Ubuntu VPS for a few years now, and it started out with 16.04.
Yesterday I dragged it to 18.04, then 20.04, and overall the upgrades went butter smooth.1
This VPS mounts a CIFS drive to extend the storage for my syncthing install, and it is this network drive that I seem to be having trouble with.
Syncthing has (had? I can't find the docs I went with at the time...) a bit of a special requirement that the database/indexes can't live on a network drive. I only found that out when the local storage ran out, and I had started all my shares in the ~syncthinger folder.
The data can live on CIFS without problem though. So my solution was to keep the contents of ~syncthinger/.config/syncthing on the local drive (it's small anyhow) and bind-mount them into their expected location.
Now I cannot bind-mount this anymore, because the folder doesn't exist, but I also cannot create it because it does exist. Kind of a Schroedinger's folder type of situation.
Things I've tried:
1. Reboot (multiple times for the upgrades, and a few times after that)
2. Nuke the whole .config folder via rm -rf. Didn't work, folder can't be removed because it isn't considered empty.
3. Enable the CIFS debugging via
Code:
echo 3 > /proc/fs/cifs/cifsFYI
and watched with dmesg -w as I tried to do the steps shown above, but the output really just reflects what the commands already say:
Code:
[34344.005454] Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
[34344.009907] Status code returned 0xc0000035 STATUS_OBJECT
4. One thing that may be important: two prefixes of this CIFS are mounted in two different places, to serve different storage needs:
Code:
root@muchmuch ~ # mount | grep cifs
//cifs-box/backup/camera on /mnt/backup/camera type cifs (rw,relatime,vers=3.1.1,cache=strict,username=<username>,uid=1004,forceuid,gid=1003,forcegid,addr=<ipv6-addr>,file_mode=0660,dir_mode=0770,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1)
//cifs-box/backup/syncthinger_home on /home/syncthinger type cifs (rw,relatime,vers=3.1.1,cache=none,username=<username>,uid=1000,forceuid,gid=1000,forcegid,addr=<ipv6-addr>,file_mode=0660,dir_mode=0770,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1)
I have unmounted the other mount for the time being to see if that helps. It doesn't.
So now I'm wondering if this is an issue with my cifs config, or what I can do about this. The CIFS host is a paid-for service (hetzner hosting) that I can't administer, so debugging server-side would mean talking to them. Before I do that I'd just want to make sure it's not a problem on my side (which... I find much much more probable, given that I don't make my money setting up cifs, and they do )
Are there any further debugging steps I could take? Google et al. have been supremely un-useful here, all results seem to be related to not being able to delete a file that does exist...
Also, if there is a simple way to make this work more cleanly, avoiding the whole bind-mount stuff and such, I'm all ears.
Thanks for reading all my rambling, stay safe everyone
1The only hiccup was this bug which was annoying because I wanted to go to bed, but not so bad.
Bookmarks