Enabling object access to existing filesets

Use the following procedure to enable object access to files stored in an existing fileset.

In the following task, the fileset junction path is /gpfs1/legacy_fset1, the policy name is sof_policy, the container name is cont1, and the account name is admin.

  1. To enable object access on the fileset with path /gpfs1/legacy_fset1, run the following command:
    mmobj file-access link-fileset 
       --sourcefset-path /gpfs1/legacy_fset1       
       --account-name admin      
       --container-name cont1                    
       --fileaccess-policy-name sof_policy      
       --update-listing
  2. To download a file that is already stored in the linked fileset path /gpfs1/legacy_fset1, run the following command:
    swift download cont1 '/gpfs1/legacy_fset1/newobj'
    Here gpfs1 is the file system name and legacy_fset1 is the fileset name. These two names are derived from the --sourcefset-path parameter in Step 1.
  3. To create a new object in the linked fileset path /gpfs1/legacy_fset1, run the following command:
    swift upload cont1 '/gpfs1/legacy_fset1/newobj'
  4. To view the container listing, run the following command:
    swift list 
    cont1/gpfs1/legacy_fset1/file1.txt
    /gpfs1/legacy_fset1/newobj
    Note: Adding the existing /gpfs1/legacy_fset1/file1.txt file to the container listing is dependent on the --update-listing flag.
  5. To enable object access on the existing fileset path /gpfs1/legacy_fset1 under the sof_policy policy container cont2, use mmobj file-access link-fileset:
    mmobj file-access
    link-fileset --sourcefset-path /gpfs1/legacy_fset2      
    --account-name admin      
    --container-name cont2                    
    --fileaccess-policy-name sof_policy

    The container cont2 listing does not list the existing files within the fileset. However, the new objects created in the fileset are listed as object entries.

    Note: Object access can be enabled to an existing non-object fileset path where the fileset path is derived from a different object filesystem, by not specifying the --update-listing flag. But the data can be accessed through swift or curl. However, the container listing is not updated with the existing file entries and object metadata is not appended to the existing data.