Oracle Cloud Infrastructure Documentation

Managing Storage Gateway

This topic describes some basic Storage Gateway management tasks.

Managing Storage Gateway Using the CLI

You can use the ocisg command-line interface (CLI) to manage Storage Gateway. Using ssh, log in to the host on which you installed Storage Gateway to use the CLI.


You can also use the ocisg command-line interface (CLI) to create, manage, and monitor Storage Gateway Cloud Sync jobs. See Using Storage Gateway Cloud Sync for details.

The CLI supports the following Storage Gateway management tasks:

  • To start Storage Gateway:

    sudo ocisg up
  • To stop Storage Gateway:

    sudo ocisg down

    If the server with an Storage Gateway instance fails, you can reinstall and start another instance. All the configuration and system data is automatically downloaded and applied. The pending upload and download activities are resumed when the Storage Gateway instance is running again.

    If a disk cache is irrecoverable on the server with the Storage Gateway instance, then data might be lost, as the file might not have been transferred to the bucket in your tenancy. To ensure efficient data protection, see Best Practices for Using Storage Gateway.

  • To view details about Storage Gateway and how to access the management console:

    sudo ocisg info
  • To find out the version of Storage Gateway:

    sudo ocisg version
  • To configure Storage Gateway to use a proxy server to connect to Oracle Cloud Infrastructure Object Storage:

    sudo ocisg configure proxy [http_proxy_server https_proxy_server]


    After configuring the proxy server, you must stop and restart Storage Gateway.

    By default, no proxy server is specified.

  • To remove previously configured proxy server details in Storage Gateway:

    sudo ocisg configure proxy [remove]
  • To configure Storage Gateway to use SSL when communicating the management console and REST APIs:

    sudo ocisg configure ssl true

    SSL is enabled by default.


    After configuring Storage Gateway to use SSL, you must stop and restart Storage Gateway

    To disable SSL:

    sudo ocisg configure ssl false
  • To specify ports for the Storage Gateway services:

    sudo ocisg configure port <service> <port_number>  
    • <service>: Specify admin, nfs, or rest.
    • <port_number>: Ensure that the port number you specify is not already in use on the Storage Gateway host.

    By default, the port number is assigned dynamically for the Storage Gateway services when you start Storage Gateway.


    For the port assignment to take effect, you must stop and start Storage Gateway.

  • To remove the static port assignment for a service:

    sudo ocisg configure port <service> remove
  • To allocate memory for the Storage Gateway host:

    sudo ocisg configure memory <memory_in_GB>
  •  To remove the memory allocation:

    sudo ocisg configure memory remove
  • By default, Storage Gateway uses 4 GB from the available memory on the Storage Gateway host. You can delete the memory information by using the remove parameter.


    After configuring memory for Storage Gateway, you must stop and restart Storage Gateway.

  • To specify the docker network mode:

    sudo ocisg configure network mode

    The mode can be either host or bridge.

    The default mode is bridge. In this mode, you can run multiple instances of Storage Gateway on your host.

    In the host mode, you can run only a single instance of Storage Gateway. Network performance is better in host mode.


    After specifying the docker network mode, you must stop and restart Storage Gateway.

  • To change the Storage Gateway admin password:

    sudo ocisg do password:reset

    Then, set a new password:

    sudo ocisg password:set <new_password>

    Enter a password that meets the following requirements:

    • Use from 8 to 32 characters.
    • Must include at least one special character, one numerical character, one uppercase character, and one lowercase character.

  • To view help for the available commands:

    sudo ocisg help