| SWM-TT(8) | System Manager's Manual | SWM-TT(8) |
NAME
swm-tt — time
travel's virtual machine's first process
SYNOPSIS
swm-tt |
DESCRIPTION
swm-tt is /init of
ttvm, and the only program in its initramfs. On dom0, the root monitor
starts ttvm to make a place, to write a copy of a world to its backup place,
and to scrub the copies there.
swmtool(8) starts it to make, list,
open, and restore from a place. On a byol,
ttd(8) starts it for each place job, and
swmtool install starts it for a restore from a
place. The host is the program that starts ttvm.
swm-tt mounts the place's file system in the VM,
never on the host. tt(8) serves the same
commands from a child process on the metal, not from
swm-tt. Nobody runs swm-tt
by hand: it must be process 1, and it powers the VM off when it is done.
swm-tt mounts /dev
and /sys, opens the bus on the lowest-numbered
virtio console port, and serves the host's commands one at a time. When the
host says it is done, when the bus closes, or when a record's header is bad,
it syncs, unmounts the place, and powers off.
The VM's disks come from
swm-vmm(8): the place's disk
read-write, and the point to copy from read-only.
swm-tt tells them apart by
/sys/block/vd*/ro.
A USB place is the file system on the place's disk, or on one of
its partitions, whose UUID the host names; with no UUID, the one file system
on it. swm-tt finds only XFS, ext4, and btrfs. A
network place is reached through the VM's network device: NFS 4.2, soft, or
SMB 3.1.1, at an IP address. swm-tt wipes the SMB
password after the mount. It mounts the place at
/place with nosuid, nodev, and noexec. It opens the
place's directory below the mount, follows no symbolic link, and does not
leave the mount.
Commands
The host sends one command and reads one reply before it sends the
next. While a command runs, swm-tt sends a progress
record each second. The host trusts no byte of a reply.
- MOUNT
- Mount the place, and on the host's word make its directory first, or only
the last directory of its path. Unless the host asks for read-only, also
check that the place's file system keeps sparse files, punches holes,
finds data with
SEEK_DATA, and makes hard links, and refuse it if not; take the lock; remove its own half-written files, and each half of a copy whose other half is gone. - GET, PUT
- Read or write a small file of the place.
- LIST
- List the place.
- UNLINK
- Remove names.
- COPY
- Copy the point into a new copy and its manifest, as files that are not yet published. Refused when it would leave less free space than the smaller of 5% of the place and 64 GiB.
- READ
- Read a range of a file back from the place, with
O_DIRECTwhen the range is aligned to 512 bytes; a place withoutO_DIRECTthen fails the read. - PUBLISH
- Give a copy that COPY wrote its name. Refused, and the copy's files removed, when the lock is lost or a copy appeared that was not there at MOUNT.
- DONE
- Sync, reply, and power off.
A place mounted read-only takes no PUT, UNLINK, COPY, or PUBLISH.
A name is at most 79 bytes of [0-9a-z.], and does
not start with a dot. A copy's name is 32 hex digits; its manifest has the
same name followed by .m.
FILES
- /place
- where the place is mounted
In the place's directory:
- lock
- held with an open file description lock by the one writer
- *.part
- files not yet published
EXIT STATUS
swm-tt does not exit. It powers the VM
off; the host reads a power-off before a reply as a failure.
SEE ALSO
AUTHORS
Marco Peereboom <marco@peereboom.us>
| November 20, 2026 | Void Linux |