Mapping a directory to a cloud object storage bucket

You can map a directory to a bucket on a cloud object storage. This directory can be created under the fileset junction path.

You can retrieve the mapping information by using the get operation and delete the relation by using the delete operation.

  1. Create a relationship with a cloud object storage bucket by issuing the following command:
    # mmafmcosconfig fs1 singlewriter --endpoint http://c1f1u11n07 --uid 0 --gid 0 
    --bucket singlewriter --mode sw --object-fs
  2. Check the cache state by issuing the following command:
    # mmafmctl fs1 getstate
    A sample output is as follows:
    Fileset Name    Fileset Target                     Cache State Gateway Node Queue Length Queue numExec 
    ------------    --------------                     ----------- ----------   ------------ ------------- 
    singlewriter    http://c1f1u11n07:80/singlewriter  Active      c7f2n05      0            5            
    
  3. Map a directory to a cloud object storage bucket by using the access keys and secret keys of the cloud object storage bucket.
    # mmafmcosaccess fs1 singlewriter /gpfs/fs1/singlewriter/dir1 set --bucket cosbucket 
    --endpoint http://c1f1u11n07 --akey mkey1234 --skey mkey1234
    Note: The --keyfile option can be used to specify a key file that contains an access key and a secret key. Instead of providing the access key and the secret key on a command line, you can use a key file. The key file must contain two lines for akey and skey separated by a colon.
  4. Check the cache state by issuing the following command:
    # mmafmctl fs1 getstate
    A sample output is as follows:
    Fileset Name    Fileset Target                     Cache State Gateway Node Queue Length Queue numExec 
    ------------    --------------                     ----------- ----------   ------------ ------------- 
    singlewriter    http://c1f1u11n07:80/singlewriter  Active      c7f2n05      0            5            
    
  5. Create objects by issuing the following commands:
    touch /gpfs/fs1/singlewriter/dir1/object1
    touch /gpfs/fs1/singlewriter/dir1/object2
    touch /gpfs/fs1/singlewriter/dir1/object3
  6. Check the cache state by issuing the following command:
    # mmafmctl fs1 getstate
    A sample output is as follows:
    Fileset Name    Fileset Target                     Cache State Gateway Node Queue Length Queue numExec 
    ------------    --------------                     ----------- ----------   ------------ ------------- 
    singlewriter    http://c1f1u11n07:80/singlewriter    Dirty      c7f2n05      3            8            
    
  7. Check that these objects are played to a cloud object storage bucket.
    Name      : object1
    Date      : 2020-10-23 09:44:37 EDT 
    Size      : 0 B    
    ETag      : d41d8cd98f00b204e9800998ecf8427e 
    Type      : file 
    Metadata  :
      Content-Type: application/octet-stream