Skip to main content

SAMBA/CIFS

Note: I noticed today that I get a high amount of traffic to this link I had posted to a guide pre disaster event where I had a total loss of my server. I feel guilt that you guys are searching issue related topics I documented the solution for in the past. As a direct result I am working on documenting this issue for us all once more. (It is not in any of my local data or notes, nor in wayback archive :< )

image.png

I found solutions for this issue involving either kernel patching or changing the cifs settings. I recommend the latter currently as it will cause the least issues. However downgrading the cifs protocol used could degrade security perhaps vs version 3. I am unsure. Do research further if this will be a concern. 

Kernel Patching (not currently recommended):

Warning: using this solution broke nvidia-smi in a host with most of its workload being GPU accelerated docker/docker-compose. Updating the kernel may cause other issues but it did resolve this issue without changing the cifs settings and I am certain that the issue can be resolved with a kernel patch but I don't remember what method I used previously.

apt-get install linux-generic-hwe-22.04

Replace the (22.04) with your distro. I do not anticipate you should be here if you are running 24.04. My testing is with Ubuntu 22.04.

CIFS Settings (Recommended):

Without changing the kernel patch I found you can also get rid of the issue by adding the ,vers=2.1 option in the fstab mount or docker-compose cifs mount.

Examples:

volumes:
  plex_config:
    driver: local
    driver_opts:
      type: cifs
      o: "iocharset=utf8,username=<username>,password=<somepass>,vers=2.1,rw,uid=<changethistotheproperuid>,file_mode=0777,dir_mode=0777"
      device: "//192.168.1.1/<sharename>"

//192.168.1.1/<sharename> /mnt/path cifs username=<username>,password=<password>,uid=1000,gid=www-data,file_mode=0777,dir_mode=0777,noperm,vers=2.1 0 0



If you discover a more viable solution please feel free to reach out by any method available and I will update this information.