Repository navigation
Description
Context
NFS's most important operational feature for sysadmins is /etc/fstab integration — mount at boot, survive reboots, declarative configuration. ObjectFS has no equivalent. Without a mount helper binary at /sbin/mount.objectfs, the kernel's mount -t objectfs command fails and _netdev fstab entries don't work.
What to implement
Create cmd/mount.objectfs/main.go following the kernel mount helper calling convention:
mount.objectfs <device> <mountpoint> [-sfnv] [-t type] [-o options]
Parse the -o options string (comma-separated key=value pairs):
config=<path>→ passes--configto objectfs mountuid=<n>→ passes through to objectfsgid=<n>→ passes throughro→ passes--read-onlycache-size=<size>→ passes--cache-sizelog-level=<level>→ passes--log-level
After parsing, exec /usr/bin/objectfs mount [translated flags] <device> <mountpoint> --foreground.
This enables the fstab entry:
s3://my-bucket /mnt/data objectfs _netdev,config=/etc/objectfs/data.yaml 0 0
Add as a second build target in .goreleaser.yaml. Add to DEB/RPM packages at /sbin/mount.objectfs. Update scripts/postinstall.sh to create the symlink if not present.
Acceptance criteria
mount.objectfs s3://bucket /mnt/point -o config=/etc/objectfs/config.yamlworks (callsobjectfs mount ...)mount -t objectfs s3://bucket /mnt/point -o config=/etc/objectfs/config.yamlworks- fstab entry with
_netdevandobjectfstype mounts onmount -a - Binary included in DEB and RPM packages at
/sbin/mount.objectfs
Sequencing
Depends on B1-1 (objectfs mount subcommand must exist first).
Activity
scttfrdmn commentedon Aug 9, 2026
Scoping note before implementation: three of the six
-ooptions this issue specifies map to flags that do not exist.newMountFlagSet(cmd/objectfs/main.go:172-183) declares exactly:--config,--foreground,--mount-point,--log-level,--cache-size,--max-concurrency,--dry-run,--debug.Against the issue's table:
-okeyconfig=<path>--configlog-level=<level>--log-levelcache-size=<size>--cache-sizero--read-onlyuid=<n>gid=<n>internal/vfshas anErrReadOnly, so the concept exists below the CLI, but nothing at the mount boundary turns it on. uid/gid have noyamlfield ininternal/configat all —internal/vfs/attr.goderives ownership fromobjectfs-uid/objectfs-gidobject metadata falling back to the mounting user, which is a different mechanism from a mount-wide override.So a helper written to this table would accept four fstab options and silently drop two of them, plus fail on
ro— androin an fstab line is the one an operator is most likely to expect to be honoured. That is worse than not accepting them: an option that parses and does nothing reads as a working read-only mount.Two ways to resolve, and it is a real choice rather than a detail:
--read-only,--uid,--gidwith config fields behind them), then map all six. Larger, and--read-onlyneeds a decision about where it is enforced — refusing atOpenis not the same as refusing at flush.ro/uid/gidwith a message naming the gap rather than accepting and ignoring them. Smaller, honest, and leaves an fstab line that fails loudly instead of mounting writable when the operator asked for read-only.Also worth noting for the exec line: the issue says exec
objectfs mount ... --foreground. That flag's own help text says foreground "is the only mode ObjectFS has", so passing it is right, but a mount helper that never returns is not whatmount -aexpects — the systemd_netdevpath and the fork/daemonize question need settling as part of this, not after it.Sequenced behind the packaging work (#207/#137), since the helper has to be installed at
/sbin/mount.objectfsby a package for any of it to be reachable.scttfrdmn commentedon Aug 9, 2026
Deferred this round, deliberately. The
-otable above needs--read-only,--uidand--gidto exist before a helper can honour it, and--read-onlyis a design question rather than a flag: refusing atOpenis not the same as refusing at flush, and a mount-wide uid/gid override would be a second authority alongside the per-objectobjectfs-uid/objectfs-gidmetadata thatinternal/vfs/attr.goalready derives ownership from. Two authorities that can disagree is the defect class this project has spent several releases removing.So this waits until that is settled, rather than shipping a helper that accepts six options and honours three.
#149 (full install-to-fstab CI on Rocky Linux 9) is sequenced behind both this and the packaging work — it cannot install a package that does not exist yet, and its
mount -astep needs this helper. Note also that #149's body specifies LocalStack, which this project rules out; see the comment there.fix(install): retry transient HTTP errors on the wget path, and cut 0…
style(mount): suppress the st_dev conversion on both platforms (#136)
docs(mount): point the ro refusal at #532 (#136)
test(mount): set the coverage floor from CI's measurement, 85 → 92 (#136
test(packaging): observe mount(8) resolving -t objectfs on a real ins…