I have done a lot of searching and can’t find any mention of anyone else suffering from this problem…
I have a problem with a Samba share from an exFAT drive.
Other drives/folders attached to the pi are accessible from my other computers, it is only this exFAT drive that is the problem.
I have installed samba from the OSMC app store.
Only the EFI partition of the drive is automounted in Samba, not the main partition with all the actual files.
The main partition is mounted and the files read fine from Kodi/OSMC, it is just not being shared via Samba.
I have tried to manually add the drive to /etc/samba/smb-shares.conf using the automount template:
browseable = yes
read only = no
valid users = osmc
path = media/billymedia
comment = exFAT videos drive
This didn’t work either.
(I have not edited the original smb.conf file)
I had previously set up a samba share through apt-get, and mounted through fstab, but this was causing the pi to fail to boot when the drive wasn’t connected, so I deleted the lines from fstab. Could this be causing some kind of conflict in my shares?
Any ideas? I would be very grateful for some help, I am very much a novice at Linux….
Suggest to remove /etc/samba/smb-shares.conf then reboot.
Also post your smb.conf via paste-log /etc/samba/smb.conf and share the URL
Last install smbutils sudo apt-get install smbutils and run smbutils -L localhost and show output
Sharename Type Comment
--------- ---- -------
osmc Disk OSMC Home Directory
IPC$ IPC IPC Service (Samba 4.5.16-Debian)
8GB REFURB Disk Auto-mount Volume
EFI Disk Auto-mount Volume
ED30-9BB2 Disk Auto-mount Volume
Ok, the EFI partition could be your issue. As I doubt you will boot from a media drive suggest to remove that partition. If you can store the data somewhere else in between and repartition the drive to a single partition would be best.
BTW fdisk -L or lsblk will tell you which partition on which drive
Just a heads up there are issues with Windows and exFAT partitions shared over SMB from OSMC. Large file transfers from Windows will fail and they will corrupt the partition in the process. Both a failed transfer or just deleting a file over the network from Windows will not recover the disk space the file used. This corruption is not able to be repaired by either exfatfsck in Debian or chkdsk in Windows.
If you are only reading from the Windows machines then it should work fine. Setting the share as read only may be a good idea.
Drives formatted as NTFS, FAT32, or ext4 do not have these issues and can be used without restriction.
Oh wow, that is a very important nugget of information! Thanks @darwindesign.
I will format to NTFS then, I had used exFAT to allow me to use either my windows or mac machines with the drive. The risk of destroying the partition is much greater than the convenience of accesss across platforms. I think you just saved me from some enormous headaches and stress in the future.
If you are going to reformat, EXT4 would be the best choice for performance. But then it would only be readable on a linux system. If you don’t plan on using the drive on Windows or Mac, then go with EXT4. If you do think you will need to use Windows, then go with NTFS.
If the drive is EXT4 you will still be able to access it via SMB from Windows.
If you were only writing from your Mac over the network then that might work (I would test it first on a drive you don’t mind formatting if it fails). Someone else tested it from a Debian PC and the issue didn’t happen. It seems to be specific to Windows.
just have had a quick look to this: I’m missing the section name in first line (which will be the sharename afterwards) and there is a missing slash in the path. So, can you try /etc/samba/smb-shares.conf with content:
browsable = yes
read only = no
valid users = osmc
path = /media/billymedia
force user = osmc
comment = Deprecated (Please use the Auto-mount Volume shares)
hide files = /$RECYCLE.BIN/System Volume Information/desktop.ini/thumbs.db/
(last 3 lines just as it is configured on my OSMC devices)
sudo systemctl restart sambaor even a reboot of the OSMC device to make that active.