Where no hard limit is possible (a host folder mounted into the VM/LXC,
an LXC's own disk), a share can get a soft limit:
- Sharestead measures the folder (as for personal folders); a full share
is read-only over SMB for everyone through a second trailing include
(/etc/samba/sharestead/share-limits.conf) that repeats it with
read only = yes. Verified first on CT 151: a share-section include
with %S does NOT work (Samba doesn't substitute it there), a trailing
global include does, also against an explicit write list.
- Connections to a share whose state changes are closed (smbcontrol all
close-share) so it applies at once; dfree reports the space left in
the limit inside the share.
- Existing setups get the second include when the first share limit is
set; KeepLimitsLast keeps both last.
- PUT /api/v1/shares/{name}/limit; limits of deleted shares are dropped;
"Share X is full" on Problems.
- UI: "Size limit" card on the share page: a hard limit set outside is
shown (with a soft one too, if set); otherwise a soft limit with bar,
"full — read-only over SMB" and what isn't stopped; greyed with the
reason for shares not on SMB; personal folders point to their own
limits. Share list and dashboard show limit and "full".
- Problems page checks fresh when opened (it showed the last background
check, up to a minute old); saving a limit refreshes problems.
- The label's accessible name is just "Soft limit" (FieldLabel; it read
"Soft limit soft What is …?").
Verified on VM 152 with smbclient: Media (ext4, 126 MB, limit 100 MB)
refuses uploads, downloads work, clients see 1 KB free; HostData
(virtiofs) and Family (XFS) below their limits accept uploads. e2e on
CT 151 (desktop + phone), axe on both instances. Tests: domain, service,
API.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>