Archil disks can be shared between multiple servers simultaneously
--shared
flag on each server.
Every file or folder on an Archil disk can always be read from multiple servers simultaneously. However, to support local-like
performance, only a single Archil client can edit any particular file or folder — including file creation, renaming, or deletion —
at a time.
Archil disks introduce the concept of “ownership” to track which Archil client has exclusive access to a particular file or folder.
By default, when a client mounts an Archil disk, it requests ownership of the entire disk, and other clients cannot perform the
same mount. When you mount with the --shared
flag, the Archil client does not request ownership of the entire disk, allowing
multiple clients to mount the same disk. You can then use the granular checkout
and checkin
commands, as detailed below, to
track which Archil clients have exclusive access to which files and folders.
/group/models
directory, then it also owns all files and subdirectories within /group/models
.
Conversely, no client can have ownership of the /
or /group
directories, as this would conflict with the first client’s ownership
claim on /group/models
.
archil unmount
, the client automatically releases all of its ownership claims on the file system, to allow
another server to use the disk.checkout
and checkin
.
checkout
checkout
command:
checkin
mkdir
mkdir
in a directory that is not owned by any client,
the Archil server will create the directory (if no conflicting directory exists) and grant
ownership to the client.
Using our earlier example, any client can create a new directory in /
, /group
, or /data
and
receive ownership over the new directory.
delegations
command.
checkout
command with the --force
flag.
--force
flag, the Archil server will revoke ownership from other clients immediately. If those clients have outstanding
writes which have not yet been fsync
ed to the disk, then those writes will be lost, and the eventual call to fsync
will fail with EIO
.