Enabling object access for selected files

Use the following steps to objectize files under all containers that are associated with the unified file and object access storage policy under a specified account.

In a unified file and object access environment, you can access files that are created from file interfaces such as POSIX, NFS, or CIFS through object interfaces such as curl or Swift. But, you need to make these files available for the object interface.

To make these files available for the object interface after it is activated, the ibmobjectizer service runs periodically and makes newly created files available for the object interface. You can also use the mmobj file-access command to selectively enable files for access through the object interface immediately without waiting for the objectization time interval.

The purpose of this command is to make certain files available to object sooner (or immediately) than when the objectizer makes them available. This command does not ensure synchronization between file and object data. Therefore, files that are deleted are not immediately reflected in the object interface. Complete synchronization is done by the ibmobjectizer service eventually.

In unified file and object access enabled filesets, you can access files from the object interface if you know the entire URI (including keystone account ID, device, and other details). You can then access that file without the need for them to be objectized either by using the ibmobjectizer service or this mmobj file-access command (such as in the following examples).

Note: Disabling object access for files is not supported.
  • Run the following command to objectize files under all the containers that are associated with the unified file and object access storage policy under an account:
    mmobj file-access objectize --storage-policy sof_policy --account-name admin

    The system output displays as follows:

    Loading objectization configuration from CCR
    Fetching storage policy details
    Performing objectization
    Objectization complete

    This command objectizes all containers in the account admin and enables them for access through the object interface.

  • Run the following command to objectize files under a container:
    mmobj file-access objectize --storage-policy sof_policy --account-name admin --container-name container1

    This command objectizes all files in container1 and enables them for access through the object interface.

  • Run the following command to objectize a file while you specify a storage policy:
    mmobj file-access objectize --storage-policy sof_policy --account-name admin \
    --container-name container1 --object-name file1.txt

    This command objectizes file1.txt in container1 and enables it for access through the object interface.

  • Run the following command to objectize a file:
    mmobj file-access objectize --object-path \
    /ibm/gpfs0/obj_sofpolicy1/s69931509221z1device1/AUTH_763476384728498323747/cont/file1.txt

    This command objectizes file1.txt at location /ibm/cesSharedRoot/fileset1/Auth_12345/container1/ and enables it for access through the object interface.

For more information, see the mmobj command.