Skip to main content
PUT
Mount a volume on a running Sailbox

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

sailbox_id
string
required

Id of the Sailbox, as returned by create. It is sb_ followed by a UUID.

Body

application/json
volume_id
string
required

Id of a volume you created earlier.

Minimum string length: 1
Pattern: \S
mount_path
string
required

Absolute path inside the Sailbox where the volume appears. Repeated slashes and ./.. segments are resolved first, and the result cannot be /. Two mounts in one request cannot nest inside each other. A new mount requires an absent or empty directory, including in the image. See the volume guide.

Pattern: ^\s*/.
Example:

"/mnt/shared"

read_only
boolean
default:false

Mount the volume read-only, fixed for the Sailbox's life. Writes through the mount fail with EROFS, even as root. One Sailbox cannot mount the same volume both read-only and writable. See Volumes.

cache_seconds
integer
default:0

How long, in seconds, this mount may reuse what it has already read about the volume before checking for changes. Files and their contents on this mount can lag changes made through other mounts by up to about twice this value. Only time the Sailbox is running counts, so after it resumes from being paused or asleep the mount can show older files for as long as was left when it stopped. After more than a day paused or asleep, reading a file that changed in the meantime can fail for that same remaining time. Longer values make repeated reads faster. Requires read_only: true. The default, 0, picks up changes within about a second.

Required range: 0 <= x <= 3600

Response

The volume is mounted.

The response is of type object.