Mounting from an Amazon EC2 instance
You can mount your cache from an Amazon EC2 instance.
To mount your cache from Amazon EC2
-
Connect to your Amazon EC2 instance.
-
Make a directory on your cache for the mount point with the following command.
$ sudo mkdir -p /mnt
-
Mount the cache to the directory that you created. Use the following command and replace the following items:
Replace
with the actual file cache's DNS name.cache_dns_name
Replace
with the cache's mount name. This mount name is returned in themountname
CreateFileCache
API operation response. It's also returned in the response of the describe-file-caches AWS CLI command, and the DescribeFileCaches API operation.
sudo mount -t lustre -o relatime,flock
cache_dns_name
@tcp:/mountname
/mntThis command mounts your cache with these options:
-
relatime
– Maintainsatime
(inode access times) data, but not for each time that a file is accessed. With this option enabled,atime
data is written to disk only if the file has been modified since theatime
data was last updated (mtime), or if the file was last accessed more than a certain amount of time ago (one day by default).relatime
is required for automatic cache eviction to work properly. -
flock
–Enables file locking for your cache. If you don't want file locking enabled, use themount
command withoutflock
.
-
Verify that the mount command was successful by listing the contents of the directory to which you mounted the cache,
/mnt
by using the following command.$
ls /mnt
import-path lustre $You can also use the
df
command.$
df Filesystem 1K-blocks Used Available Use% Mounted on devtmpfs 1001808 0 1001808 0% /dev tmpfs 1019760 0 1019760 0% /dev/shm tmpfs 1019760 392 1019368 1% /run tmpfs 1019760 0 1019760 0% /sys/fs/cgroup /dev/xvda1 8376300 1263180 7113120 16% / 123.456.789.0@tcp:/mountname
3547698816 13824 3547678848 1% /mnt tmpfs 203956 0 203956 0% /run/user/1000The results show Amazon File Cache mounted on
/mnt
.