Mount a bucket as a local drive
Mounting a bucket lets you open and save files in FPT Object Storage from File Explorer or the Linux file system, like a normal drive. Use TntDrive on Windows or s3fs on Linux.
Prerequisites
- A bucket to mount.
- An Access Key, Secret Key, and the endpoint of the region. See Manage Access Keys.
Mount a bucket on Windows
- Download and install TntDrive.
- Open TntDrive and select Accounts → Add new account.
- Enter the account details, the same as for S3 Browser, and save.
- Click Add New Mapped Drive.
- Enter the drive settings:
- Storage account: the account you added.
- Amazon S3 Bucket: the bucket to mount. Type the name or click the icon to choose it.
- Mapped drive letter: the drive letter for the bucket.
- Click Add new drive. TntDrive shows the status of the mounted drive.
The bucket appears as a drive in File Explorer.
Mount a bucket on Linux
The following steps use s3fs on Ubuntu and mount the bucket bucket-01 at /mnt/bucket-01, so that it mounts again after every restart.
-
Install s3fs:
sudo apt-get install s3fs -
Save the Access Key and Secret Key in a password file that only root can read:
echo YOUR_ACCESS_KEY:YOUR_SECRET_KEY | sudo tee /root/s3-password > /dev/null
sudo chmod 600 /root/s3-password -
Create the mount directory:
sudo mkdir -p /mnt/bucket-01 -
Add the bucket to
/etc/fstab. Replacebucket-01and theurlvalue with your bucket and endpoint:echo "bucket-01 /mnt/bucket-01 fuse.s3fs _netdev,allow_other,passwd_file=/root/s3-password,use_path_request_style,nonempty,uid=0,gid=0,use_cache=/tmp,dbglevel=info,curldbg,url=https://s3-hfx03.fptcloud.com 0 0" | sudo tee -a /etc/fstab -
Mount the bucket:
sudo mount -a -
Check that the bucket is mounted:
df -h /mnt/bucket-01
ls /mnt/bucket-01The output shows the bucket as a
s3fsfile system and lists its objects.