Determining the POSIX path of a unified file and object access enabled fileset

Use the following steps for determining the POSIX path of a unified file and object access enabled fileset.

  1. List all storage policies for object.
    mmobj policy list
    
    Index       Name             Default Deprecated Fileset              Functions              
    --------------------------------------------------------------------------------------------
    0           SwiftDefault     yes                object_fileset                              
    13031510160 sof-policy1                         obj_sof-policy1      file-and-object-access 
    13031510260 CompressionTest          yes        obj_CompressionTest  compression            
    13031510290 CompressionDebug         yes        obj_CompressionDebug compression            
    13031511020 CompressionNew                      obj_CompressionNew   compression
  2. Note the index and fileset name for the policy you are interested in, and using the mmlsfileset command determine the junction point.
    mmlsfileset fs0 | grep obj_sof-policy1
    obj_sof-policy1          Linked    /ibm/fs0/obj_sof-policy1

The swift ring builder creates a single virtual device for unified file and object access policies, named with the region number, starting with s and appended with z1device1. For example:

s13031510160z1device1

  1. List the swift projects and identify the one you are interested in working with.
    openstack project list
    +----------------------------------+---------+
    | ID                               | Name    |
    +----------------------------------+---------+
    | 73282e8bca894819a3cf19017848ce6b | admin   |
    | 1f78f58572f746c39247a27c1e0e1488 | service |
    +----------------------------------+---------+
  2. Construct the account name by appending the project id with AUTH_ (or substitute the correct project prefix if you've customized this). For the admin project, use:
    AUTH_73282e8bca894819a3cf19017848ce6b

The full path to the unified file and object access containers is the concatenation of the fileset linkage, the virtual device name, and the account name:

/ibm/fs0/obj_sof-policy1/s13031510160z1device1/AUTH_73282e8bca894819a3cf19017848ce6b/

  1. List the containers defined for this account.
    ls /ibm/fs0/obj_sof-policy1/s13031510160z1device1/AUTH_73282e8bca894819a3cf19017848ce6b/
    new1    fifthcontainer  RTC73189_1  RTC73189_3  RTC73189_5  RTC73189_7  sixthcontainer

The following is an example of determining the POSIX path of a unified file and object access enabled fileset from the command line with one rather complex command. This assumes that your GPFS™ file system device is gpfs0, and also that you are interested in the first storage policy listed. If this is not the case, update the script accordingly.

Commands used:

# openstack project list
# swift capabilities

Assumptions:

# File system name is is gpfs0
# Project/Account name is admin
# first [1] SoF policy is considered
echo $(find $(mmlsfileset gpfs0 | grep $(perl -e '$p=`swift capabilities 
| grep policies:`;$p=~s/:/=>/g;eval"\$v= {".$p."}";print$v->{policies}[1]{name};') 
| awk '/ / {print $3}') -name AUTH_$(openstack project list | awk '/ admin / {print $2}'))