Import Object Storage Media
Beginning with StorNext 6.2, you can use the fsobjimport command to import object storage media into the Storage Manager or to ingest the contents of the media. In the case where the data is not imported, metadata is created which allows the data to be retrieved through StorNext.
Note: You must have a FlexTier license. See the FlexTier™License Compatibility section in the StorNext Compatibility Guide for a list of supported S3 compatible object storage systems.
Note: This feature is only supported using the CLI.
Object import is supported for multiple object storage systems, including:
- AWS S3
- Azure
- AWS S3-compatible vendors
- Lattus/ActiveScale
You can suspend an import request and then resume the request, or resume the request after a failure. Processing restarts from the point of failure. You can also undo a completed or partially completed import, returning the file system and Storage Manager to their pre-import state. You must configure the media to be imported in the Storage Manager prior to the import, and the media must be in the protected state until the import is completed.
Storage Manager limits the object name length to 64 characters. Objects with names which exceed this length are not imported and an error is logged to the file:
Before you can use this feature, you must configure your object storage source. See Configure Object Storage and Cloud.

On media imports, the media specified for import is retained in the Storage Manager System and the metadata required to map the contents of an object storage bucket into a StorNext directory tree are created for each file found on the media or defined in the manifest file. The metadata created allows the data to be retrieved through StorNext. A media import is requested by specifying the media import request type with option -t of the fsobjimport command
The file list to be processed for media import can either be obtained from the object storage system or alternatively listed in an object import file.
Options can also be specified to filter out files for processing.
- The –T time option processes only those files created after time time. The time must be specified in YYYY-MM-DD HH:MM:SS format.
- The p prefix option processes only those files beginning with prefix.
- You must specify a destination directory, and it must be an archival directory, managed by the Storage Manager. The path hierarchy which is specified by the key names on the object storage system are maintained in the destination directory unless overridden by directives in an import manifest file. By default, the forward slash (/) is interpreted as a directory separator. If the object storage system uses a distinctive character as a directory delimiter, you can specify this character with the –D option to allow the directory structure to be recreated in the destination directory. For example, if you use the colon (:) as a directory delimiter on the object storage system, object ID xx:yy:zz is created under the destination directory as xx/yy/zz.
- You can specify default file attributes with command options to set the group, file permissions, and user for all files being imported. In the case where default attributes are not specified or are not configurable, they are inherited from the destination directory, class configuration, or truncate exclusion list. If you ingest from a manifest file, the attributes defined for each file override the command options.
- You can tune the media import request by modifying the system parameters, which define the number of meta data threads and database update threads used on the request:
- The parameter IMP_DBASE_NUM_THREADS defines the number of threads used to update the database.
- The parameter IMP_META_NUM_THREADS defines the number of threads used to create the file metadata.
You can specify the following options to import object storage media into the Storage Manager:
Option |
Description |
|
---|---|---|
-d |
destination |
Destination directory under which truncated files are created. You must specify this option to import object storage media and the directory must be a managed directory. |
-D |
path-delimiter |
Character token representing the directory delimiter. This character, if found in the object ID of the imported file, is replaced by a forward slash to recreate the directory structure of the object storage bucket in the destination directory. |
-f |
import-file |
Specify a manifest file containing the list of files to be processed for media import. If you do not specify this option, then the file list is obtained by the object storage system. |
-g |
group |
Set the group of the imported files to group, where group is the group name or numeric group ID. If you do not specify this option, then the group is inherited from the destination directory. Note: This option is ignored if you specify a manifest file. |
-m |
mediaid |
StorNext media ID associated with the object storage bucket to be imported. Note: You must have configured the media using the fsobjcfg command and it must be write protected before you can use it to import. |
-M |
mode |
Specify the permissions for imported files. If you do not specify this option, then the permissions are inherited from the destination directory. Note: This option is ignored if you specify a manifest file. |
-p |
prefix |
Import only files that begin with the specified prefix. |
-t |
media |
Specifies the media import type, to request an import of object storage media into the Storage Manager. If you do not specify this option, then the import type defaults to a media import. |
-T |
time |
Import files created after the specified time. Specify the time in the following format and using the local time: YYYY-MM-DD HH:MM:SS
|
-u |
user |
Set the user of the imported files to user, where user is the user name or numeric user ID. If you do not specify this option, then the user is inherited from the destination directory. Note: This option is ignored if you specify a manifest file. |
Examples
-
Issue a request to import media AWS0000, creating the truncated file hierarchy under directory /stornext/snfs1/import1, for each object found on the media:
# fsobjimport -d /stornext/snfs1/import1 -m AWS0000 -t media
-
Issue a request to import AWS0000 and to create the truncated files under directory /stornext/snfs1/import1. Import only those files which are prefixed with accounts and replace the object storage delimiter ":"with a forward slash "/" in the destination file path:
# fsobjimport -d /stornext/snfs1/import1 -m AWS0000 -t media -p accounts -D:
-
Issue a request to import only those files on AWS0000 which were created after 7:30 P.M., August 10, 2017. Create the truncated files under directory /stornext/snfs1/import1:
# fsobjimport -d /stornext/snfs1/import1 -m AWS0000 -t media -T "2017-08-10 19:30:00"

On file imports, the contents of the media are copied into a destination directory and the media can be exported once the import completes. You can request a file import by specifying the files import request type with option -t of the fsobjimport command.
The file list to be processed for media import can either be obtained from the object storage system or alternatively listed in an object import file.
You can also specify options to filter out files for processing:
- The -T time option processes only those files created after time time. You must specify the time in YYYY-MM-DD HH:MM:SS format.
- The -p prefix option processes only those files beginning with prefix.
- You must specify a destination directory. The destination directory may be associated with a relation point, but it is not required. If the destination directory is not under a relation point, the files are ingested but are not managed by Storage Manager.
- The path hierarchy, which you specify by the key names on the object storage system, are maintained in the destination directory unless overridden by directives in an import manifest file. By default, the forward slash ("/") is interpreted as a directory separator. If the object storage system uses a distinctive character as a directory delimiter, you can specify this character with the –D option to allow the directory structure to be recreated in the destination directory. For instance, if you use the colon (":") as a directory delimiter on the object storage system, object ID xx:yy:zz is created under the destination directory as xx/yy/zz.
- You can specify the option -W to request that a file be overwritten if it already exists. If you do not specify the option -W, then a version number is appended to the file name if a unique name is needed.
- You can specify file attributes with command options to set the group, file permissions, and user for all files being imported. If you do not specify the group or user, then they are inherited from the destination directory. If you do not specify the file permissions, then they default to 0440. If you ingest from a manifest file, the attributes defined for each file override the command options.
- You can tune the file import request by modifying the system parameter, IMP_COPY_NUM_THREADS, which defines the number of threads used to copy data. By default, five copy threads are used.
You can specify the following options to import the contents of object storage media:
Option |
Description |
|
---|---|---|
-d |
destination |
Destination directory to which files are copied. The directory may be associated with a relation point. If the directory is not under a relation point, the files are ingested but are not managed by Storage Manager. You must specify for file imports. |
-D |
path-delimiter |
Character token representing the directory delimiter. This character, if found in the object ID of the imported file, is replaced by a forward slash to recreate the directory structure of the object storage bucket in the destination directory. |
-f |
import-file |
Specify a manifest file containing the list of files to be processed for file import. If you do not specify this option, then the file list is obtained by the object storage system. |
-g |
group |
Set the group of the imported files to group, where group is the group name or numeric group ID. If you do not specify this option, then the group is inherited from the destination directory. Note: This option is ignored if you specify a manifest file. |
-m |
mediaid |
StorNext media ID associated with the object storage bucket to be imported. Note: You must have configured the media using the fsobjcfg command and it must be write protected before you can use it to import. |
-M |
mode |
Specify the permissions for imported files. If you do not specify this option, then the mode defaults to 0440. Note: This option is ignored if you specify a manifest file. |
-p |
prefix |
Import only files that begin with the specified prefix. |
-t |
files |
Copy the contents of the specified medium to a destination direction. |
-T |
time |
Import files created after the specified time. Specify the time in the following format and using the local time: YYYY-MM-DD HH:MM:SS
|
-u |
user |
Set the user of the imported files to user, where user is the user name or numeric group ID. If you do not specify this option, then the user is inherited from the destination directory. Note: This option is ignored if you specify a manifest file. |
-W |
|
Overwrite file if it exists. |
Example
-
Issue a request to import files from media AWS0000, copying the files to directory /stornext/snfs1/import2. Create the files with an owner ID of 101, a group ID of 120, and with file permissions of 0660. Overwrite the file if it already exists in the destination directory:
# fsobjimport -d /stornext/snfs1/import2 -m AWS0000 -t files -u 101 -g 120 -M 0660 -W

You can use a manifest file to identify a list of files to import and their associated metadata. The file must be in JSON format and you can create it using the -t list option of the fsobjimport command. You must format the file as follows:
{ "media": "STS0001", "file_list": [ { "objectId": "0000BBF3-3A01-46CD-9476-BFA0EAAFF676", "size": 100, "time": 1496387370, "mode": 511, "gid": 0, "uid": 0, "destPath": "" }, { "objectId": "0001996D-BBDF-4F7E-A2D3-DA7A7FEE74A5", "size": 100, "time": 1496385290, "mode": 511, "gid": 0, "uid": 0, "destPath": "" } ] }
- You can use destPath to define a path relative to the destination directory (-d) which differs from the object ID returned by the object storage system. If you specify a delimiter with option -D, each delimiter in objectId is replaced with a forward slash ("/"’) in the destination path for each file. By default, -t list does not set this value and, when you use this file for import, the object ID is used for the file name.
- By default, the mode, gid, and uid are set to the option values used with the fsobjimport -t list command or the destination directory attributes if the attribute options are not specified.
- Options can be specified to filter out files included in the manifest file.
- The -T time option processes only those files created after time time. You must specify the time in YYYY-MM-DD HH:MM:SS format.
- The -p prefix option processes only those files beginning with prefix.
You can specify the following options to create a manifest file for a specified media:
Option |
Description |
|
---|---|---|
-D |
path-delimiter |
Character token representing the directory delimiter. This character, if found in the object ID of the imported file, is replaced by a forward slash when creating the destPath in the manifest file for each file entry. |
-f |
import-file |
Output a list of the files on an object storage medium to this file. The file list is output in JSON format and includes file attributes. You can modify the file attributes from their default values before using the file list for ingest. |
-g |
group |
Set the group of the files listed in the manifest file to group, where group is the group name or numeric group ID. If you do not specify this option, then the group is inherited from the destination directory. |
-m |
mediaid |
Create a list of the files found on medium mediaid. |
-M |
mode |
Set the permissions for all files listed in the manifest file to mode. If you do not specify this option, then the permissions are inherited from the destination directory. |
-p |
prefix |
Include in the manifest file only files beginning with the specified prefix. |
-t |
list |
Generate a list of files residing on the specified medium. |
-T |
time |
Include only files created after the specified time. Specify the time in the following format and using the local time: YYYY-MM-DD HH:MM:SS
|
-u |
user |
Set the user for all files listed in the manifest file to user, where user is the user name or numeric user ID. If you do not specify this option, then the user is inherited from the destination directory. |
Example of How to Create a Manifest File
-
Query media AWS0000 for a list of the files on the media. Write this information to file /manifest/aws-filelist. Use options -u, -g and -M to specify the default user ID, group ID, and mode for each file entry. Replace the object storage delimiter ":"with a forward slash ("/") in the destination path for each file:
# fsobjimport-m AWS0000 -t list -f /manifest/aws-filelist -u 101 -g 120 -M 0660 -D:
Example of How to Import from a Manifest File
-
Modify the contents of the manifest file created with option -t list, modifying, if necessary, the attributes and destination path to values specific for each file. Issue a media import request, generating a file list from the contents of file /manifest/aws-filelist and creating the truncated files under directory /stornext/snfs1/import3:
# fsobjimport -d /stornext/snfs1/import3 -m AWS0000 -t media -f /manifest/aws-filelist

Checkpoint information is maintained for an fsobjimport request. If you suspend an import or it terminates abnormally, you can use this information to resume the import.
- To suspend an import, specify the -S option with either the -m option or the -i option to identify the import by media ID or request ID. Use the -s option of the fsobjimport command to display the media ID and request ID of each pending imports.
- To resume an import, specify the -R option with the -m option to identify the import. The import request restarts from the point of failure.
- If you do not resume or undo an import, you can clear the checkpoint information for the import by specifying the -C option along with the -m option to identify the import. If you specify -C without the -m option, then the import information is cleared for all imports.
Example of How to Suspend an Import
To suspend an import of media AWS0000:
Example of How to Resume an Import
Issue a request to resume a suspended import of media AWS0000:

You can undo a completed import request by specifying the -U option with the previously specified fsobjimport request, specifying the same media, destination, import type and filtering options. If the import request terminated before completion and the import request information has not been cleared from the database, you can request an undo of this import by specifying the -U option with the -m option to identify the import. Once you request an undo, then the import request is no longer recoverable.
An undo of an import removes each imported file from the destination directory. If you undo a media import, then the file information is removed from the filecomp, fileinfo and mediadir database tables. Any directories created as part of the import are also removed.
Note: If you manually remove the files after a media import, then Storage Manager removes these files from the media if a clean is requested using the fsclean command.
You can tune the file import request by modifying system parameter, IMP_REMOVE_NUM_THREADS, which defines the number of threads used to remove the imported files or metadata. By default, five threads are used.
Example of How to Undo a Completed Import
-
To undo the following media import request:
# fsobjimport -d /stornext/snfs1/import5 -m AWS0000 -t media -p accounts -D: -
Specify the same import request options with -U:
# fsobjimport -d /stornext/snfs1/import5 -m AWS0000 -t media -p accounts -D: -U
Example of How to Undo a Suspended Import
-
To undo a suspended import of media AWS0000:
# fsobjimport -m AWS0000 -U

You can use the –s option of the fsobjimport command to display the status of pending import requests. You can display the status of all pending imports, or use the –m option to display the status of a specific import request. You can specify the -F option to set the output format to TEXT, XML or JSON.
The short text report displays as follows:
Media Type Start Time Status State Complete Total --------- ------- ------------ ---------- --------- -------- ---------- -------- STS0001 media Mon Jul 3 16:53:40 suspend meta 93160 856138 STS0002 files Mon Jul 3 18:20:04 active ingest 24050 230157
The default short report produces the following information for each pending import:
Field | Description |
---|---|
Media |
Media identifier of the media being imported. |
Type |
Type of media import:
A type displayed in parenthesis indicates an undo of this import type. |
Start Time |
Time import command started. |
Status |
Status of the import request:
|
State |
Processing state of the import request. The import task processing is concurrent. The state reports the earliest import stage which is not complete.
|
Complete |
Number of files which are fully imported. For media imports, this is the number of files for which the metadata and database entries have been created. For data imports, this is the number of files for which all data has been copied into the destination directory. For list requests, this is the number of files for which a list entry has been output. |
Total |
Total number of files to be imported. If import file ingest is still pending, this number continues to change until ingest is complete. |
If you specify -l, then a long report on pending or failed imports is displayed. The import information is output as follows for the text format:
--------------------------------------------------------------------------------------------------------------------------- Import Report Media ID: STS0001 --------------------------------------------------------------------------------------------------------------------------- |
||||
Request Type: |
files |
Request ID: |
1458430 |
|
Status: |
active |
Process ID: |
28032 |
|
State: |
copy |
Overwrite: |
no |
|
Submitted: |
Mon Jul 3 16:53:40 2017 |
Object Count: |
58294 |
|
User: |
0 |
Byte Count: |
3207020304 |
|
Group: |
0 |
Objects Good: |
90 |
|
Mode: |
040775 |
Bytes Good: |
9000 |
|
Delimiter: |
|
Objects Bad: |
0 |
|
Import Time: |
|
Bytes Bad: |
0 |
|
Prefix: |
|
|
|
|
Manifest File: |
|
|||
Destination Directory: |
/stornext/snfs1/import |
|||
Last Object ID: |
snobjs_manifest.mkd-rhel6-mdc2.mdh.quantum.com |
|||
Last Directory: |
/stornext/snfs1/import/dir0 |
The following information is displayed:
Field | Description |
---|---|
Media ID | Media identifier of the media being imported. |
Request Type |
Types of media import:
If an undo request is pending, (undo) is displayed after the media import type. |
Status |
Status of the import request: Status of the import request:
|
State |
Processing state of the import request. The import task processing is concurrent. The state reports the earliest import stage which is not complete.
|
Submitted | Start time of the import command |
User | User specified with option -u |
Group | Group specified with option -g |
Mode | File permissions specified with option -M |
Delimiter | Directory delimiter specified with option -D |
Import Time | Import time specified with option -T |
Prefix | Import only files beginning with this prefix, specified with option -p |
Manifest File | Manifest file specified with option -f |
Destination Directory | Directory in which files will be created or copied. |
Last Object ID | Last object ID returned by object storage system |
Last Directory | Last directory created |
Request ID | Request ID of import request |
Process ID | Process ID of import request |
Overwrite | Yes indicates a file will be overwritten if it exists. |
Object Count | Number of objects currently returned by the object storage system. If the object ingest is still pending, this number will continue to change until ingest is complete. |
Byte Count | Byte count of objects currently returned by object storage system |
Objects Good | Number of objects successfully imported. For media import, this is the number of files for which metadata and database entries have been created. For data imports, this is the number files for which data has been copied into the destination directory. For list requests, this is the number files for which a list entry has been output. |
Bytes Good | Byte count of objects successfully transferred. This is displayed only for data import requests. |
Objects Bad | Number of objects which could not be successfully imported. |
Bytes Bad | Byte count of objects which could not be successfully transferred. This is displayed only for failures on data import requests. |

If an import fails for a file, the error is logged, and processing continues with the next queued file. If consecutive file failures occur, the fsobjimport command is terminated. Checkpoint entries for the failed files remain in the database and are used to resume an import if requested.
Error information for file failures are logged to the file:
Each log entry identifies the time of the error, the media, request ID of the failed fsobjimport, the object ID of the file, the error message and the errno terminating the file processing. Each message is formatted as follows:
Date |
media-id |
requestID |
object ID |
error message |
errno |
Fri Jun 23 22:10:39 2017 STS0001 18701 /stornext/snfs1/import/00133FCF-F308-418D-A532-BA97F24F9C5C Unable to read from object storage (5)
Fri Jun 23 22:18:57 2017 STS0001 18701 /stornext/snfs1/import/006C0519-E5FF-47E8-A6F3-9273B77C14E5 Unable to create inode (28)
Fri Jun 23 22:19:32 2017 STS0001 18701 /stornext/snfs1/import/006E5D41-2B7A-4030-9571-A474BE9DA758 Unable to create inode (13)
Fri Jun 23 22:19:38 2017 STS0001 18701 /stornext/snfs1/import/0071E32B-51E3-4ECB-9038-CE4A8191DBA0 Unable to create inode (16)
Fri Jun 23 22:19:38 2017 STS0001 18701 /stornext/snfs1/import/006C6555-3B28-4F40-895B-B4C494FA1835 Unable to read from object storage (5)
Fri Jun 23 22:19:45 2017 STS0001 18701 /stornext/snfs1/import/00720B3F-738D-417C-B78B-E99C8F39D855 Unable to create inode (28)