diff --git a/doc/CONFIGURATION.md b/doc/CONFIGURATION.md index c390f11b1..c20c15d32 100644 --- a/doc/CONFIGURATION.md +++ b/doc/CONFIGURATION.md @@ -201,6 +201,32 @@ In its default configuration, there is no maximum on the size of objects Mountpo To increase the maximum object size for writes, use the `--part-size` command-line argument to specify a maximum number of bytes per part, which defaults to 8 MiB. The maximum object size will be 10,000 multiplied by the value you provide for this argument. Even with multipart upload, S3 allows a maximum object size of 5 TiB, and so setting this argument higher than 524.3 MiB will not further increase the object size limit. +### Automatically mounting an S3 bucket at boot + +Mountpoint does not currently support automatically mounting a bucket at system boot time. +A tracking issue is open for `fstab` support: [#44](https://github.com/awslabs/mountpoint-s3/issues/44). + +Until this support is implemented, we recommend using a service manager like systemd to manage the mount process and mount during boot. +Below is an example of a systemd unit that launches Mountpoint at boot time. +Replace `/home/ec2-user/s3-bucket-mount` and `DOC-EXAMPLE-BUCKET` with your mount directory and S3 bucket. + +```ini +[Unit] +Description=Mountpoint for Amazon S3 mount +Wants=network.target +AssertPathIsDirectory=/home/ec2-user/s3-bucket-mount + +[Service] +Type=forking +User=ec2-user +Group=ec2-user +ExecStart=/usr/bin/mount-s3 DOC-EXAMPLE-BUCKET /home/ec2-user/s3-bucket-mount +ExecStop=/usr/bin/fusermount -u /home/ec2-user/s3-bucket-mount + +[Install] +WantedBy=remote-fs.target +``` + ## Logging By default, Mountpoint emits high-severity log information to [syslog](https://datatracker.ietf.org/doc/html/rfc5424) if available on your system. You can change what level of information is logged, and to where it is logged. See [LOGGING.md](LOGGING.md) for more details on configuring logging.