[OCI] Mount a Bucket as a FS
![[OCI] Mount a Bucket as a FS](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fuploads%2Fcovers%2F65605419d28f19cc44df7ef1%2F4dc1fa32-8048-442d-a214-b279e7730939.png&w=3840&q=75)
If you prefer to read in Spanish Spanish version.
Today, we are going to talk about how to mount an OCI Bucket as a FS into DB System in OCI. This can be very useful for our daily tasks.
Our DB System is running Oracle Linux Server 8.
[root@~]$ grep ORACLE_* /etc/os-release
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"
ORACLE_BUGZILLA_PRODUCT_VERSION=8.8
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=8.8
For Oracle Linux 8 onwards, we use OCIFS.
So, before kicking off, we should make sure that we have the following points:
We have a Bucket in our tenancy.
We need to have enough space in disk in order to be used as the cache for the OCIFS utility.
By default, OCIFS uses API key-based authentication in order to autenticate. For this reason, we need to set up the OCI Cli on our machine. Below, you can see how to do it.
[OCI] OCI-cli y su configuración
Let's set up OCIFS as root user on our machine:
[root@~]$ dnf install ocifs -y
...
Last metadata expiration check: 2:19:05 ago on Sun 08 Mar 2026 12:38:39 PM UTC.
Dependencies resolved.
...
Installed:
fuse-2.9.7-19.0.1.el8.x86_64
fuse-common-3.3.0-19.0.1.el8.x86_64
ocifs-1.2.0-6.el8.x86_64
...
...
Complete!
Great! Next, let's check the disk space in order to know where we can create a folder. This folder will be used as the OCIFS cache.
[root@~]$
df -h --output=source,size,used,avail,pcent,target | (read -r h; echo "$h"; sort -k2,2hr) | head -4
Filesystem Size Used Avail Use% Mounted on
/dev/sdg 196G 26G 161G 14% /u01
/dev/mapper/vg00-opt 33G 6.0G 26G 19% /opt
devtmpfs 16G 0 16G 0% /dev
As we can see, /u01 has enough space.
[root@~]$ mkdir /u01/tmp
Let's check the name of the Bucket that we're going to mount as a FS on our machine.
After that, we use the ocifs command in order to mount it:
[root@~]$ mkdir /mybucket
[root@~]$ ocifs --cache=/u01/tmp <name_bucket> /mybucket
[root@~]$ df -h /mybucket
Filesystem Size Used Avail Use% Mounted on
<name_bucket> 0 0 0 - /mybucket
[root@l23ai ~]# grep mybucket /proc/mounts
<name_bucket> /mybucket fuse.ocifs rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions 0 0
Now, we can see our Bucket as a FS. Moreover, we can see a new line in /proc/mounts file.
Lastly, let's create a file with some sample content:
[root@~]$
touch /mybucket/passwd.bck && cat /etc/passwd > /mybucket/passwd.bck
Below, you can see that the file is correctly stored in our Bucket :
Looking forward to seeing you in the next article :)
![[26ai] Hybrid Read-Only Mode PDB](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fuploads%2Fcovers%2F65605419d28f19cc44df7ef1%2F23e8f92e-f89b-4746-930e-98156e3a1ec4.png&w=3840&q=75)
![[26ai] ALERT_LOG_MAX_SIZE](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fuploads%2Fcovers%2F65605419d28f19cc44df7ef1%2Fdad5c53e-425c-4e82-9bbb-e0ccec6e9a4e.jpg&w=3840&q=75)
![[26ai] ConnStr Tool](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fuploads%2Fcovers%2F65605419d28f19cc44df7ef1%2F8316641c-ac22-45c3-a59d-4a8a7dfd9de5.png&w=3840&q=75)
![[26ai] Install Oracle AI Database 26ai on Linux 9](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fuploads%2Fcovers%2F65605419d28f19cc44df7ef1%2F243000b4-ccef-4cab-97db-f9b47328159f.png&w=3840&q=75)