Virtual extended attributes

This topic describes how the IBM Spectrum Archive™ uses virtual extended attributes.

LTFS defines a number of extended attributes that provide functionality other than a file system application programming interface. Virtual extended attributes provide additional information on the internal operating status, file system, and directory of a tape medium. An application or operating system also can use the enhanced functionality by writing virtual extended attributes.
Note: LTFS does not include virtual extended attributes in the list of responses for listxattr system calls. This means that virtual extended attributes are hidden from a query request. A user must first specify an attribute name in order to be able to access it. Some standard commands do not work for virtual extended attributes. On Linux, for example, the getfattr command works only for extended attributes. The following example shows how a user can access virtual extended attributes:
# attr -g ltfs.indexCreator /mnt/ltfsmz4/248AABL5-MOVIES_LTFS
Attribute "ltfs.indexCreator" had a 54 byte value for /mnt/ltfsmz4/248AABL5-MOVIES_LTFS:
IBM LTFS 2.1.0 (201105090) - Linux - ltfs.tape.library

In an LTFS index, all extended attribute names that start with the prefix ltfs, with any capitalization, are reserved for use by the LTFS format. Any writer of an LTFS volume should only use reserved extended attribute names to store extended attribute values in conformance with the list below. However, one reserved extended attribute namespace is available for vendor or implementation-specific information. The ltfs.vendor.X.Y extended attribute, where X is a vendor identifier and Y is an attribute name, can be used for vendor-specific attributes.

Virtual extended attributes can be divided into five metadata categories as shown in the following tables.
Note: The virtual extended attributes in Table 1 are available with LTFS version 1.2.5 and later.
Table 1. Software metadata
Name Accessibility Availability Description
ltfs.softwareVendor Read only Files and directories This is the software vendor name of this LTFS program.
The LTFS program returns IBM.
ltfs.softwareProduct Read only Files and directories This is the product name of the LTFS program.
The LTFS program returns LTFS SDE.
ltfs.softwareVersion Read only Files and directories This is the version number of this LTFS program.
ltfs.softwareFormatSpec Read only Files and directories This is the format specification version supported by this LTFS program.
Table 2. Object metadata
Name Accessibility Availability Description LTFS format version 1.0
ltfs.accessTime Read/Write Files and directories This is the date and time of the last access to the object. N/A
ltfs.backupTime Read/Write Files and directories This is the date and time of the last archive or backup of the object. N/A
ltfs.changeTime Read/Write Files and directories This is the date and time of the last status change to the object. N/A
ltfs.createTime Read/Write Files and directories This is the date and time that the object was created. ltfs.creationtime
ltfs.fileUID1 Read-only Files and directories This is the integer identifier for objects in the file system. This is guaranteed to be unique within the LTFS volume. N/A
ltfs.modifyTime Read/Write Files and directories This is the date and time of the last object modification. N/A
ltfs.partition Read-only Non-empty file objects only This is the partition on which the first extent of the file is stored. ltfs.partition
ltfs.permissions.<permissiontype> Read/Write Files and directories This is the permission descriptor of the file or directory.
The LTFS format specification 2.2.0 recommends following EAs:
  • ltfs.permissions.unix (Unix permission bits
  • ltfs.permissions.posixacl (POSIX ACL)
  • ltfs.permissions.ntfsacl (NTFS ACL)
  • ltfs.permissions.nfsv4acl (NFS V4 ACL)
LTFS never rejects the request to access other EAs under ltfs.permissions.
N/A
ltfs.spannedFileOffset Read/Write Files and directories This is the logical file offset of the first byte of the segment relative to the full file.

The LTFS format specification 2.2.0 recommends to store this EA in the LTFS index as a real EA, but this EA is not listed in the listxattr() interface.

N/A
ltfs.startblock Read-only Non-empty file objects only This is the block address where the first extent of the file is stored. ltfs.startblock
1Unique identifiers (UIDs) for each file/directory are permanently stored on a version 2.0.0 and later formatted medium. When a version 1.0 formatted medium is mounted, this attribute returns UIDs for each file/directory, but the values are not permanently stored. The UIDs are stored only while the medium is mounted. When the medium is remounted, different UIDs can be assigned.
Table 3. Volume metadata
Name Accessibility Availability Description LTFS format version 1.0
ltfs.commitMessage Read/Write Root directory only This message is meant to be saved in the tape index on subsequent synchronization of LTFS to the medium. If the commit message is not changed afterward, then all indexes that are written to the medium have that same message in the XML <comment> field. ltfs.commit_message
ltfs.indexCreator Read only Root directory only This is the creator string for the index. This string provides a human-readable identifier for the product that generated the index. N/A
ltfs.indexGeneration Read only Root directory only This is the last index generation number that is written to the tape. ltfs.index_generation
ltfs.indexLocation Read only Root directory only This is the location of the last index on the medium in the form p:l, where p is an alphabetic character value indicating the internal LTFS partition identifier, and 1 is the logical block number within the partition. For example, the value a:1000 indicates that the last index starts on partition "a" at logical block 1000. N/A
ltfs.indexPrevious Read-only Root directory only Location of the previous index on the medium in the form p:l, where p is an alphabetic character value that indicates the internal LTFS partition identifier, and 1 is the logical block number within the partition. For example, the value b:55 indicates that the previous index starts on partition "b" at logical block 55. N/A
ltfs.indexTime Read only Root directory only This is the date and time when the last LTFS index is written to the medium. ltfs.index_time
ltfs.labelCreator Read only Root directory only This is the creator string for the LTFS label. This string provides a human-readable identifier for the product that generated the LTFS label. N/A
ltfs.mamApplicationFormatVersion Read only Files and directories This is the MAM attribute value that is stored as the application format version. N/A
ltfs.mamApplicationVendor Read only Files and directories This is the MAM attribute value that is stored as the application vendor. N/A
ltfs.mamApplicationVersion Read only Files and directories This is the MAM attribute value that is stored as the application version. N/A
ltfs.mamBarcode Read/Write Files and directories This is the MAM attribute value that is stored as a barcode. N/A
ltfs.partitionMap Read only Root directory only This is the only medium partition layout for the LTFS volume. The form of the value is W:x,Y:z where W and Y have the value I, indicating an index partition, or D indicating a data partition. The alphabetic character values x and y indicate the internal LTFS partition identifier. For example, the value I:a,D:b indicates that LTFS partition "a" is used as the index partition, and LTFS partition "b" is used as the data partition. N/A
ltfs.policyAllowUpdate Read only Root directory only This indicates whether the data placement policy for the volume can be updated. ltfs.policy_allowupdate
ltfs.policyExists Read only Root directory only This indicates whether the policy that allows certain files to be written to the index partition is enabled. The policy is set at the time of formatting. ltfs.policy_is_set
ltfs.policyMaxFileSize Read only Root directory only This is the maximum file size for files that match the data placement policy for the volume. ltfs.policy_maxfilesize
ltfs.sync Write only Root directory only Writing any value to this extended attribute initiates a file system sync on any implementation that supports this extended attribute. N/A
ltfs.volumeBlocksize Read only Root directory only This is the block size that is used on read/write operations as specified at the time of formatting. ltfs.volume_blocksize
ltfs.volumeCompression Read only Root directory only This is the compression setting for the volume. N/A
ltfs.volumeFormatTime Read only Root directory only This is the date and time when the volume was formatted. ltfs.volume_format_time
ltfs.volumeLockState Read/write Root directory only This advisory locked status is one of the following three states: unlocked, locked, or permlocked. IBM Spectrum Archive can use ltfs.volumeLockState to change the advisory lock status. It does a clean close of the target tape in the following three steps:
  1. Set the advisory volume status in the internal structure (in-memory).
  2. Write down the index on both partitions.
  3. Update the volume advisory lock status on MAM.

If an error happens in step 2, the tape start is changed by the normal write-error handling process. If an error happens in step 3, IBM Spectrum Archive reverts the tape back to the condition that it was in before it accepted the change request.

N/A
ltfs.volumeName Read Files and directories This is the tape volume name as set at the time of formatting. ltfs.volume_name
Write Root directory only
ltfs.volumeSerial Read only Root directory only This is the tape serial number as specified at the time of formatting. ltfs.tape_serial
ltfs.volumeUUID Read only Files and directories This is the Universally Unique Identifier that is assigned to the tape medium. ltfs.volume_uuid
Table 4. Media metadata
Name Accessibility Availability Description
ltfs.mediaBeginningMediumPasses Read only Root directory only This is the total number of times the beginning of a medium position was passed. If the storage hardware cannot report this data, the value is -1.
ltfs.mediaDatasetsRead Read only Root directory only This is the total number of data sets read from the medium over its lifetime. If the storage hardware cannot report this data, the value is -1.
ltfs.mediaDataPartitionAvailableSpace Read only Root directory only This is the total available space in the data partition on the medium. The value is an integer count that is measured in units of 1048576 bytes.
ltfs.mediaDataPartitionTotalCapacity Read only Root directory only This is the total capacity of the data partition on the medium. The value is an integer count that is measured in units of 1048576 bytes.
ltfs.mediaDatasetsWritten Read only Root directory only This is the total number of data sets written to the medium over its lifetime. If the storage hardware cannot report this data, the value is -1.
ltfs.mediaEfficiency Read only Root directory only This is the overall measure of the condition of the loaded medium. The value 0x00 indicates that the condition is unknown. The range of known values is from 0x01 (best condition) to 0xFF (worst condition). If the storage hardware cannot report this data, the value is -1.
ltfs.mediaEncrypted Read only Root directory only This indicates whether the written data in the media is encrypted.
ltfs.mediaIndexPartitionAvailableSpace Read only Root directory only This is the total available space in the index partition on the medium. The value is an integer count that is measured in units of 1048576 bytes.
ltfs.mediaIndexPartitionTotalCapacity Read only Root directory only This is the total capacity of the index partition on the medium. The value is an integer count that is measured in units of 1048576 bytes.
ltfs.mediaLoads Read only Root directory only This is the number of times the medium was loaded in a drive. For example, with tape media this is the tread count. If the storage hardware cannot report this data, the value is -1.
ltfs.mediaMBRead Read only Root directory only This is the total number of megabytes of logical object data that is read from the medium after compression over its lifetime. The value is rounded up to the next whole megabyte. The value reported includes bytes read as part of reading file marks from the medium. If the storage hardware cannot report this data, the value is -1.
ltfs.mediaMBWritten Read only Root directory only This is the total number of megabytes of logical object data that is written to the medium after compression over its lifetime. The value is rounded up to the next whole megabyte. The value reported includes bytes written as part of writing file marks to the medium. If the storage hardware cannot report this data, the value is -1.
ltfs.mediaMiddleMediumPasses Read only Root directory only This is the total number of times the physical middle position of the user data region of a medium is passed. If the storage hardware cannot report this data, the value is -1.
ltfs.mediaPermanentReadErrors Read only Root directory only This is the total number of unrecovered data read errors over the lifetime of the medium. This is the total number of times that a read-type command terminated with a sense key of MEDIUM ERROR, HARDWARE ERROR, or equivalent over its lifetime. If the storage hardware cannot report this data, the value is -1.
ltfs.mediaPermanentWriteErrors Read only Root directory only This is the total number of unrecovered data write errors over the lifetime of the medium. This is the total number of times that a write-type command terminated with a sense key of MEDIUM ERROR, HARDWARE ERROR, or equivalent over the lifetime of the medium. If the storage hardware cannot report this data, the value is -1.
ltfs.mediaPool.additionalInfo Read/write Root directory only Writing data only to the MAM, and not to the index, can save processing time for certain functions, such as marking a tape as exported. This operation can be done by using the ltfs.mediaPool.additionalinfo. The value set by this attribute is stored in the MAM field MEDIA POOL, within square brackets ( [ ] ), after the pool name that is specified by ltfs.mediaPool.name. IBM Spectrum Archive rejects a write request against the ltfs.mediaPool.name with square brackets.
ltfs.mediaPool.name Read Root directory only The media pool name to which an LTFS volume belongs can be stored in an extended attribute for the root directory element in an index.
ltfs.mediaPreviousPermanentReadErrors Read only Root directory only This is the total number of unrecovered read errors that occurred during the previous load of the medium. This is the total number of times that a read-type command terminated with a sense key of MEDIUM ERROR, HARDWARE ERROR, or equivalent during the previous load session. If the storage hardware cannot report this data, the value is -1.
ltfs.mediaPreviousPermanentWriteErrors Read only Root directory only This is the total number of unrecovered write errors that occurred during the previous load of the medium. This is the total number of times that a write-type command terminated with a sense key of MEDIUM ERROR, HARDWARE ERROR, or equivalent during the previous load session. If the storage hardware cannot report this data, the value is -1.
ltfs.mediaRecoveredReadErrors Read only Root directory only This is the total number of recovered read errors over the lifetime of the medium. If the storage hardware cannot report this data, the value is -1.
ltfs.mediaRecoveredWriteErrors Read only Root directory only This is the total number of recovered data write correction errors over the lifetime of the medium. If the storage hardware cannot report this data, the value is -1.
ltfs.mediaStorageAlert Read/Write Root directory only This is a 64-bit value that contains alert flags for the storage system. For data tape media, this value is equal to the standard tape alert flags. If the storage hardware cannot report this data, the value is the string “UNKNOWN.” By writing a value of 1, the corresponding bit is cleared. By writing a value of 0, the current value is retained.
Table 5. Drive metadata
Name Accessibility Availability Description
ltfs.driveCaptureDump Read/Write Root directory only Reading or writing any value to this extended attribute triggers a drive dump on any implementation that supports this extended attribute.
ltfs.driveEncryptionMethod Read only Root directory only This indicates the encryption method of the drive.
ltfs.driveEncryptionState Read only Root directory only This indicates the encryption state of the drive.