alex
2023-Jul-30 18:05 UTC
[Samba] Mac Cannot unmount Disk Images that are mounted from Samba Shares
I am on a Mac OS 12.6.8.
I have gotten Samba to work great with TimeMachine and general sharing of
directories off the server which is running FreeBSD 13.2 with Samba Version
4.16.10.
The one issue I am seeing is that when I have a Mac Disk Image mounted from a
Samba share it will not unmount unless I hit the force eject option.
When I run ?sudo smbstatus? on the server I see the mounted disk image is
locked:
Locked files:
Pid User(ID) DenyMode Access R/W Oplock
SharePath Name Time
--------------------------------------------------------------------------------------------------
25419 1001 DENY_NONE 0x20087 RDWR NONE
/usr/home/alex test.dmg Sun Jul 30 13:36:02 2023
25419 1001 DENY_NONE 0x100081 RDONLY NONE
/usr/home/alex . Sun Jul 30 13:36:16 2023
I don?t have any issues with TimeMachine which in theory mounts a disk image
from the share and then unmounts it cleanly when it is done with it. Only when I
mount a disk image from my home directory. I also tried to make a specific entry
in smb.conf to a specific directory with the disk image and saw the same
behavior. My conf file is below. Let me know if any other info is needed:
# We want Samba to only log to /var/log/samba/log.{smbd,nmbd}.
# Append syslog at 1 if you want important messages to be sent to syslog too.
logging = file
# Do something sensible when Samba crashes: mail the admin a backtrace
# panic action = /usr/share/samba/panic-action %d
allow insecure wide links = yes
unix extensions = no
#======================= Share Definitions ======================
[TimeMachineLB]
# Load in modules (order is critical!)
vfs objects = catia fruit streams_xattr
fruit:time machine = yes
fruit:time machine max size = 350G
comment = Time Machine Backup
path = /storage/TimeMachineLB
available = yes
valid users = alex
browseable = yes
guest ok = no
writable = yes
[TimeMachine2]
# Load in modules (order is critical!)
vfs objects = catia fruit streams_xattr
fruit:time machine = yes
fruit:time machine max size = 300G
comment = Time Machine Backup Nat
path = /storage/TimeMachine2
available = yes
valid users = natalie
browseable = yes
guest ok = no
writable = yes
[homes]
comment = Home Directories
valid users = %S
read only = No
create mask = 0700
directory mask = 0700
browseable = yes
#veto files = /*.*/
follow symlinks = yes
wide links = yes
Regards,
Alex
Sent from my iPhone
