Installing Storage Gateway

This topic provides instructions for installing the Storage Gateway software.


These instructions assume that you are familiar with the administration and configuration commands of the operating system on your host machine. To install Storage Gateway, your host system must meet certain hardware and software requirements.

Hardware Recommendations and Requirements

To run Storage Gateway, the host machine must meet the following requirements:

  • Two dual-core CPUs or better. Oracle recommends 4-core CPUs.
  • Minimum memory requirements:

    • 16 GB for required for any Storage Gateway file system.
    • 32 GB for file systems up to 50 million files.
    • 64 GB for file systems up to 100 million files.
  • The recommended local storage disk size is 600 GB, which includes 500 GB for the file system cache, 80 GB for metadata storage, and 20 GB for log storage.


    Provision local storage before installing Storage Gateway. For best performance, allocate dedicated local storage file systems for the Storage Gateway cache, the metadata, and the logs. The installation script prompts you for the paths to your Storage Gateway file system cache, metadata storage, and log storage locations. Follow the disk size recommendations provided by the installer.

    Oracle recommends that you use the XFS file system for the file system cache, metadata, and logs. XFS is a 64-bit file system designed for parallel I/O. Parallel I/O allows a system to scale based on the number of I/O threads and file system bandwidth.

Software Requirements

  • Oracle Linux 7 with UEK Release 4 or later.


    If you create an Oracle Cloud Infrastructure Compute instance to host Storage Gateway, the instance creation wizard provides an option to choose the operating system image.
  • Docker 1.12.6 or newer. Docker is an open platform for building, shipping, and running distributed applications. For more information, see

  • NFSv4.

The Storage Gateway installation software automatically installs Docker and the NFS protocol.

Hosting Storage Gateway on an Oracle Cloud Infrastructure Compute Instance

To host Storage Gateway on an Oracle Cloud Infrastructure Compute instance, you need:

  • An SSH key pair in PEM format.

    • To create a key pair, see Managing Key Pairs on Linux Instances.
    • If your public key is not in PEM format, use the following command to convert it:

      ssh-keygen -f <key_name>.pub -e -m pem
  • An Oracle Cloud Infrastructure user account with an API signing key (the public key from your SSH key pair).

  • A virtual cloud network (VCN) and related resources. For help with creating a VCN, see VCNs and Subnets.

    The following configuration points apply to your VCN:

    • Do not select the Use DNS Hostnames in this VCN check box unless you plan to use DNS hostnames for your Storage Gateway Compute instance.
    • The security list must include a rule to allow SSL (443) ingress.

    • After you install the Storage Gateway software your host machine, you must add a security list rule to allow communication with the management console port. More information appears on this page after the Storage Gateway installation instructions.
  • A Compute instance. See Creating an Instance.

    The VM.Standard2.4 Compute shape meets the minimum required specifications for Storage Gateway. Large file systems might require an image with more resources.

  • A Block Volume. See Creating a Volume.

Installing Storage Gateway

You can install Storage Gateway on an Oracle Cloud Infrastructure Compute instance or an on-premises host that meets the hardware and software requirements.

To install the Storage Gateway software
  1. Connect to your Compute instance or on-premises host.

    For help with connecting to an Oracle Cloud InfrastructureCompute instance, see Connecting to an Instance.

  2. If your host volume is new, you might need to format and mount the disk.


    This task describes the simplest way to create a functional file system to host a Storage Gateway. It uses one device and file system to host the cache, metadata, and log volumes. You specify the paths to those volumes later in this procedure. To optimize performance for your system, you can:

    • Create a separate device and file system for each of the cache, metadata, and log volumes.
    • Create a single device, but create logical volumes and file systems for the cache, metadata, and log volumes.

    To format the disk and create a file system:

    1. Run fdisk:

      sudo fdisk /dev/sdb

      (Optional) Press m to view the fdisk options.

    2. Choose command g - create a new empty GPT partition table.

    3. Choose command w - write table to disk and exit.

    4. Create an XFS (file system).

      To make file system volume extensive, we recommend using LVM to create logical partitions that can span across one or more physical hard drives. First, the hard drives are divided into physical volumes, then those physical volumes are combined to create the volume group and finally the logical volumes are created from volume group. Follow these steps:

      1. Create a volume group.

        sudo vgcreate <volume_group_name> <device>
      2. Create a logical volume.

        sudo lvcreate -l 100%FREE -n <logical_volume_name> <volume_group_name>
      3. Create an XFS file system.

        sudo mkfs.xfs /dev/<volume_group_name>/<logical_volume_name>
      4. Mount the XFS file system.

        sudo mount /dev/<volume_group_name>/<logical_volume_name> <directory_path>

    To mount the formatted volume:

    1. Create a mount directory:

      sudo mkdir /ocisg
    2. Mount the drive:

      sudo mount /dev/sdb /ocisg
  3. Download the Storage Gateway 1.3 tar archive.
  4. Use the SFTP tool of your choice to copy the tar archive into the /tmp folder of the host machine.
  5. On the host machine, change directory to /tmp and extract the files from the tar archive:

    cd /tmp
    sudo tar xvzf ocisg-1.3.tar.gz

    This command extracts the files from the tar archive into a subdirectory named ocisg-1.3.

  6. Change directory to ocisg-1.3 and run the installation script as sudo or root user:

    cd ocisg-1.3
    sudo ./

    Optionally, you can specify the following script flags:

    • -a Runs the installation in advanced configuration mode, which lets you specify ports and the Docker network mode.

      In addition to prompting you for the paths to the metadata storage, cache storage, and log storage, advanced configuration mode also prompts you for:

      • The Docker network mode (host or bridge).

        Bridge mode is the default. It allows multiple instances of Storage Gateway to run on the same host.

        Host mode improves network performance. If you plan to run only one instance of Storage Gateway on the host, Oracle recommends host mode. If you encounter issues with host mode, try bridge mode or contact My Oracle Support.

      • The host port to use for the management console.

      • The host port to use for NFS access.

      • The host port to use for the HTTP REST service.


        For each host port specification, you can designate a port or press Enter to let Storage Gateway dynamically allocate the port. You can use the ocisg configure port command to change the ports later. See Managing Storage Gateway Using the CLI for details.
    • -d Installs Storage Gateway at the location you specify instead of the default location of /opt/ocisg. For example:

      sudo ./ -d /opt/storagegateway
      • -h Displays the installation script help information.
      • -p Specifies that Storage Gateway is running behind a proxy server. You can specify multiple proxy arguments. For example:

        ./ -p -p
      • -q Runs the installation in quiet mode.

        If you supply the paths to the Storage Gateway cache, metadata, and log storage locations using -m<path_to_metadata_storage>, -c<path_to_cache_storage>, and -l<path_to_log_storage>, you are not prompted for input. For example:

        sudo ./ -q -m /ocisg/metadata -c /ocisg/cache -l /ocisg/log

        Ignore the devicemapper warning message if it appears during the installation.

    The script guides you through the Storage Gateway installation. Depending on your host machine configuration, some steps can require your input:

    1. Docker does not appear to be installed. Do you want to install docker engine with yum? [y/N]

      Press y, and then press Enter.

      The installation script automatically installs Docker and configures the storage driver for use with Storage Gateway.


      If Docker is already installed on your system, the installation script does not automatically configure the storage driver and returns a warning message:

      Checking that docker is installed and using the correct version
      Found docker version Docker version 18.03.1-ol, build 0d51d18
      The storage appliance requires to set devicemapper as the docker storage driver.
      Please follow the setup link below to enable devicemapper and rerun the install.

      Manually verify and update the Docker storage driver to be devicemapper as required. See Verifying and Updating the Storage Driver in Docker.

    2. NFS server does not appear to be enabled. Do you want to enable NFS? [y/N]

      Press y, and then press Enter.

    3. When prompted, press Enter accept the default installation location.
    4. When prompted, specify the paths to your Storage Gateway cache, metadata, and log storage locations.

      The following examples represent paths for a simple system. Your setup might include paths to separate devices and file systems for each location.

      1. Enter a path for the file system cache. For example:

      2. Enter the path for metadata storage. For example:

      3. Enter the path for log storage. For example:


      If you receive warnings about cache, metadata, and log storage existing on the same volume, enter y to proceed with the installation.

After a successful installation, the script provides the following information:

  • The URL to log in to the Storage Gateway management console.
  • The NFS port number.
  • An example command for mounting your Storage Gateway file systems.

If you installed Storage Gateway on a Compute instance, see Security List Requirements for Compute Instance Installations.

Security List Requirements for Compute Instance Installations

If you installed Storage Gateway on an Oracle Cloud Infrastructure Compute instance, that instance must be able to receive HTTPS connections from other hosts and allow communication with the Storage Gateway management console. To open the necessary port, add an ingress rule to the security list governing the instance's host subnet. To learn about VCN security control, see Security Lists.


This installation task assumes that your existing security list already allows traffic to port 443, as described in the Prerequisites section of this page. If port 443 is not open, you must add a security list rule to open it.
To add a security list rule
  1. Open the navigation menu. Under Core Infrastructure, go to Networking and click Virtual Cloud Networks.
  2. Click the name of the cloud network (VCN) that hosts your Compute instance.
  3. Click Security Lists.
  4. Click the name of the security list that governs the subnet hosting your Compute instance.
  5. Click Edit All Rules.
  6. Add an ingress rule:

    1. Leave Stateless unmarked.
    2. Select CIDR for the Source Type.
    3. Enter to indicate all IP addresses.
    4. Select TCP as the IP Protocol.
    5. Enter All in the Source Port Range field.
    6. Specify your Storage Gateway management console port in the Destination Port Range field. For example:


      If you do not know the management console port for your Storage Gateway installation, run the following command on the host machine:

      sudo ocisg info

      The management console port appears at the end of the management console URL:

      Management Console: https://exampleCompute:32769
  7. Click Save Security List Rules.

    You can now connect to the compute instance using the public IP address (https:<public_IP_address>). See Getting the Instance Public IP Address and Initial Windows Password for details.

Verifying and Updating the Storage Driver in Docker

To verify the storage driver in Docker:

  1. Start docker:

    sudo systemctl start docker
  2. Verify the information in docker:

    sudo docker info
  3. Look for Storage Driver in the output. For example:

    Containers: 0
     Running: 0
     Paused: 0
     Stopped: 0
    Images: 0
    Server Version: 18.03.1-ol
    Storage Driver: overlay2
     Backing Filesystem: xfs
     Supports d_type: true
     Native Overlay Diff: false
    Logging Driver: json-file
    Cgroup Driver: cgroupfs
     Volume: local
     Network: bridge host macvlan null overlay
     Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
    Swarm: inactive
    Runtimes: runc
    Default Runtime: runc
    Init Binary: docker-init
    containerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88
    runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
    init version: 949e6fa
    Security Options:
      Profile: default
    Kernel Version: 4.1.12-124.15.4.el7uek.x86_64
    Operating System: Oracle Linux Server 7.5
    OSType: linux
    Architecture: x86_64
    CPUs: 4
    Total Memory: 13.45GiB
    Name: ocisg-mahesh
    Docker Root Dir: /var/lib/docker
    Debug Mode (client): false
    Debug Mode (server): false
    Experimental: false
    Insecure Registries:
    Live Restore Enabled: false
    Registries: (secure)

    Ignore the devicemapper warning message if it appears.

    If Storage Driver is notdevicemapper, do the following:

    1. Stop docker:

      sudo systemctl stop docker
    2. Look for /etc/docker/daemon.json in the host.

      If the file daemon.json does not exist, create it.

    3. In the daemon.json file, set the storage-driver variable to devicemapper:

      "storage-driver": "devicemapper"
    4. Restart docker:

      sudo systemctl start docker
    5. Verify the information in docker:

      sudo docker info

      Look for Storage Driver in the output and verify that the storage driver is devicemapper.