Enabling object access to existing filesets
Learn to enable object access to files stored in an existing fileset.
- How to enable access with --update-listing
- How to enable access without --update-listing
- How to enable access with a fileset path from a different object file system
Note: Before you enable object access for the existing filesets, ensure
that SELinux is in the Permissive or Disabled mode.
How to enable access with --update-listing
This set of examples uses the following resources:
- The account name is
admin
. - The policy name is
sof_policy
. - The file system name is gpfs1.
- The fileset name is legacy_fset1.
- The fileset junction path is /gpfs1/legacy_fset1, which contains the
following files:
- existingfile1
- existingdir/existingfile2
- The container name is
cont1
.
You can do the following operations. All the commands are on one line:
- The following command enables object access to the fileset and updates the container listing
with the existing
files:
mmobj file-access link-fileset --sourcefset-path /gpfs1/legacy_fset1 --account-name admin --container-name cont1 --fileaccess-policy-name sof_policy --update-listing
The command also creates the soft link gpfs1-legacy_fset1. The link name is constructed according to the following format: <file_system_name>-<fileset_name>.
- Both of the following commands upload an object
newobj
to the linked fileset path /gpfs1/legacy_fset1. Both commands use the soft link gpfs1-legacy_fset1 that is created in the preceding example. You can use either method:- The following example uses the swift
utility:
swift upload -H "X-Storage-Policy: sof_policy" cont1 'gpfs1-legacy_fset1/newobj'
- The following example uses the curl
utility:
curl -X PUT -T newobj -H "X-Storage-Policy: sof_policy" http://specscaleswift.example.com:8080/v1/AUTH_cd1a29013b6842939a959dbda95835df/cont1/gpfs1-legacy_fset1/newobj
newobj1
to it:swift upload -H "X-Storage-Policy: sof_policy" cont1 'gpfs1-legacy_fset1/newdir/newobj1'
- The following example uses the swift
utility:
- The following command lists the contents of the container
cont1
:
The command displays the following output:swift list cont1
gpfs1-legacy_fset1/newdir/newobj1 gpfs1-legacy_fset1/newobj gpfs1-legacy_fset1/existingfile1 gpfs1-legacy_fset1/existingdir/existingfile2
- The following command downloads the file
newobj
:swift download cont1 'gpfs1-legacy_fset1/newobj'
How to enable access without --update-listing
This set of examples uses the following resources:
- The account name is
admin
. - The policy name is
sof_policy
. - The file system name is gpfs1.
- The fileset name is legacy_fset2.
- The fileset junction path is /gpfs1/legacy_fset2, which contains the
following file:
- existingfile2
- The container name is
cont2
.
You can do the following operations. All the commands are on one line:
- The following command enables object access to the fileset and creates the link
gpfs1-legacy_fset2
but does not update the container listing with existing files:mmobj file-access link-fileset --sourcefset-path /gpfs1/legacy_fset2 --account-name admin --container-name cont2 --fileaccess-policy-name sof_policy
- The following command uploads the object newobj to the linked fileset path
/gpfs1/legacy_fset2:
swift upload -H "X-Storage-Policy: sof_policy" cont2 'gpfs1-legacy_fset2/newobj'
- The following command lists the contents of the container
cont2
:
The command displays the following output.swift list cont2
The command displays only the objects that are added to the fileset, either by uploading the object or by specifying the --update-listing parameter with mmobj --file-access. Here the only such object is newobj. The command does not list the existing file existingfile2.gpfs1-legacy_fset2/newobj
How to enable access with a fileset path from a different object file system
You can enable object access to an existing non-object fileset path where the fileset path is derived from a different object file system. To do so, omit the --update-listing parameter. You can access the data with the utilities 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.