Sudden samba failure

Suddendly, the samba daemon fails to start and I cannot reach my shares anymore.
My setup is the latest OSMC on a Raspberry Pi 3, with two USB disks mounted under /disks, that were shared using the OSMC app store samba.
Everything worked fine for a couple of years, but since yesterday the samba service is not working.

Here is the log file:
https://paste.osmc.tv/devikiname

I really don’t know what to check, it stopped working and now I cannot access my media library anymore.

Also, Kodi seems to have been reset and forgot all my customization and my whole media library. I have a MySQL setup, and my movie and tv series library is now empty. The files are still on the filesystem, saved on the two external disks.
I am really confused.

Thanks for any help.

Hi,

Looks like a similar issue, to this topic:

I would try the steps advised by JimKnopf.

Also one of the drives is showing as full:

/dev/sda1 2,7T 2,6T 13G 100% /disks/3TB

Thanks Tom.

Thank you for the suggestion!
Unfortunately, I tried to empty the samba cache directory and to restore an original samba conf file, without success.

Here is the log of sudo nmbd -i -S -d 10:
https://paste.osmc.tv/zadanavahi

And the log of sudo smbd -i -S -d 10:
https://paste.osmc.tv/amedazuzug

It seems that samba tells that some lockfile cannot be created because of a non existing directory.

And yes, I know that one of the disks is almost full, it is the main storage for the Kodi video library.

Hi,

Did you also complete these steps:

Thanks Tom.

Is your MySQL library and files on the same Pi? That’s what it looks like to me. If so, your settings are a bit odd. Like your media sources being accessed via SMB on the Pi they are connected to?

Yes Tom, all the samba config are now the default one.

I have two Pis at home, the main one has MySQL on it and the usb disks attached, shared with smb, to let the second one to access the video library.

Hi,

I would backup your settings and reinstall osmc and restore. If the issue still persists, try a fresh sd card.

Thanks Tom.

Might be a stupid suggestion, I’m sure you’ve checked it; but have you confirmed pi IP addresses have not changed? It has happened to me before and was pulling my hair out for ages. Kicked myself when I realised I’d missed it.

Is the Pi that is having the problem the Pi with the database and drives?

Yes, it is the problematic one.

The ip is still the same, it is assigned by static DHCP by the router. For example, I can access the Transmission web interface running on that Pi without issues.

I was afraid I had to reinstall. Still curious about the root of the issue though.

Hi,

Sorry can’t answer that, but I’m glad to hear you’re back up and running again.

Thanks Tom.

1 Like

Well, before you reinstall the whole system, try a partial installation of samba first. I understood your situation that way that your samba service is still not starting anymore

  1. backup /etc/samba/smb.conf, /etc/samba/smb-local.conf, /etc/samba/smb-shares.conf and /etc/samba/smb.conf.distributed somewhere and delete these files
  2. sudo systemctl disable samba
  3. sudo rm -R /var/cache/samba
  4. sudo apt-get update
  5. sudo apt-get remove samba and confirm the removal
  6. sudo apt-get install samba smb-app-osmc
  7. reboot

This should give you a virgin samba installation.

1 Like

Thank you, I will try this!

I tried, and it worked!
Samba is working again, and I can access my shares!

Now I have another issue, but I will open a new thread.

Thanks!