Tuesday, August 11, 2020

Mounting OCI Object Storage Bucket as a File System on Exadata Cloud Service

My environment:

  • ExaCS running Oracle Linux 7.7

Step 1:  Install s3fs-fuse rpm

yum install https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/s/s3fs-fuse-1.86-2.el7.x86_64.rpm --nogpgcheck

Step 2A:  Create file with credentials in the format access key:secret key

[root@vm1 bucket1]# cat /root/.passwd-s3fs
a4dzaa8049cbb6e1300b0a9170ff35ddebd50bfc:fYtbmNmp++lomv4z11YX4PuqR9gPbVEe4ZXB00TKUBA=

Step 2B: Change file permissions to 600 

chmod 600 /root/.passwd-s3fs

Step 3: Create directory for mount

mkdir /bucket1

Step 4:   Run the s3fs command

s3fs gregf1 /bucket1 -o endpoint=us-phoenix-1  -o passwd_file=/root/.passwd-s3fs -o url="https://yourtenancyhere.compat.objectstorage.us-phoenix-1.oraclecloud.com" -o nomultipart -o use_path_request_style

Example:

[root@exacsx7phx-023jw2 ~]# s3fs gregf1 /bucket1 -o endpoint=us-phoenix-1  -o passwd_file=/root/.passwd-s3fs -o url="https://yourtenancynamehere.compat.objectstorage.us-phoenix-1.oraclecloud.com" -o nomultipart -o use_path_request_style
[root@exacsx7phx-023jw2 ~]# df
Filesystem                      1K-blocks       Used    Available Use% Mounted on
devtmpfs                        371297736          0    371297736   0% /dev
tmpfs                           742617088    1262064    741355024   1% /dev/shm
tmpfs                           371308876       3044    371305832   1% /run
tmpfs                           371308876          0    371308876   0% /sys/fs/cgroup
/dev/mapper/VGExaDb-LVDbSys1     24639868   11840312     11524884  51% /
/dev/xvda1                         499656      52724       420720  12% /boot
/dev/xvdi                      1135204408  112486384    965029960  11% /u02
/dev/mapper/VGExaDb-LVDbOra1    154687468    6198624    140608140   5% /u01
/dev/xvdb                        51475068   13514280     35322964  28% /u01/app/19.0.0.0/grid
tmpfs                            74261776          0     74261776   0% /run/user/0
/dev/asm/acfsvol01-131          838860800  139691116    699169684  17% /acfs01
/dev/asm/upload_vol-131        8388608000 4577187480   3811420520  55% /scratch
tmpfs                            74261776          0     74261776   0% /run/user/2000
s3fs                         274877906944          0 274877906944   0% /bucket1
tmpfs                            74261776          0     74261776   0% /run/user/1001
[root@exacsx7phx-023jw2 ~]# ls /bucket1
fish121.dmp  fish.dmp  FISH_EXPDAT.DMP

 

Step 5:  Make mount permanent

 

Additional Information:




No comments:

Post a Comment