forked from milouk/docker-smb-opl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
smb.conf
98 lines (88 loc) · 2.96 KB
/
smb.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# This setup works pretty well for OPL with a network link that travels through
# two UniFi switches and connects to a Samba server running inside Docker. The
# host OS is Debian with a ZFS filesystem and the container OS is also Debian.
# Latest Samba (4.11+).
[global]
# ======================
# General Samba settings
# ======================
log level = 1
workgroup = WORKGROUP
server string = PS2 Samba Server
server role = standalone server
log file = /dev/stdout
max log size = 0
# Disable printers.
load printers = no
printing = bsd
printcap name = /etc/printcap
printcap cache time = 0
disable spoolss = yes
pam password change = yes
map to guest = bad user
usershare allow guests = yes
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
force user =
force group = users
# ===========================
# PlayStations 2 OPL settings
# ===========================
# Lower the minimum protocol to NT1 (a SMB1 dialect), this is required since
# Samba 4.11 changed the default and deprecated SMB1.
# See https://github.com/ifcaro/Open-PS2-Loader/issues/86 and
# https://github.com/ps2dev/ps2sdk/issues/72 for future SMB2 support.
server min protocol = NT1
server signing = disabled
smb encrypt = disabled
# Tweak socket options for lower delay. We also set TCP_KEEPIDLE to 20s which is
# about what it takes to reset the console and launch OPL, this avoids keeping
# file locks around for too long. We could try to optimize socket buffer sizes
# but Linux should do this automatically.
# TODO(mafredri): Do more testing with TCP_QUICKACK.
socket options = TCP_NODELAY TCP_KEEPIDLE=20 IPTOS_LOWDELAY SO_KEEPALIVE
# Disable keepalive to avoid hanging onto locks. Should not be needed
# due to SO_KEEPALIVE and helps with FMV audio stutter.
keepalive = 0
# ------------------------------------
# Attempt to speed up reads and writes
# ------------------------------------
# This setting only works for oplocked files but OPL doesn't oplock.
write cache size = 0
# Speed up directory listings.
getwd cache = yes
# Remove audio stutter in FMVs.
large readwrite = yes
# Disable asynchronous reads and writes.
aio read size = 0
aio write size = 0
# This might help with performance as the system doesn't need to check locks.
# OPL is the only client so we don't care about locks anyway.
strict locking = no
# ----------
# ZFS tuning
# ----------
# Don't listen to client requests for sync.
strict sync = no
# ZFS does not support preallocation (copy-on-write FS).
strict allocate = no
# Disable low-latency file operations for better performance.
read raw = no
write raw = no
# ----
# Misc
# ----
# Allow symlinks, useful for symlinking saves for multi-disk games.
follow symlinks = yes
[PS2SMB]
comment = PlayStation 2
path = /mnt/ps2smb
browsable = yes
guest ok = yes
public = yes
available = yes
read only = no
veto files = /._*/.apdisk/.AppleDouble/.DS_Store/.TemporaryItems/.Trashes/desktop.ini/ehthumbs.db/Network Trash Folder/Temporary Items/Thumbs.db/
delete veto files = yes