Systems for writes to tiered files and re-tiering
The system addresses inefficiencies in writing to tiered storage by allowing aligned writes on the file system and selective recalls for non-aligned writes, reducing cloud storage costs and optimizing storage usage through aggressive tiering policies.
Patent Information
- Application Number
- US19/683349
- Authority / Receiving Office
- US · United States
- Patent Type
- Applications(United States)
- Current Assignee / Owner
- Priority Date
- 2025-05-20
- Filing Date
- 2026-05-20
- Publication Date
- 2026-11-26
AI Technical Summary
Existing file storage systems face inefficiencies and high costs when writing data to tiered storage, as they often require recalling the entire file from tiered storage, which can be costly and time-consuming, especially when using cloud object stores that do not allow in-place updates.
The system allows aligned writes to be performed directly on the file system without recalling the entire file from tiered storage, and for non-aligned writes, only the necessary portions are recalled and updated, with re-tiering operations occurring when a threshold amount of data is stored locally, thereby reducing the need for frequent recalls.
This approach reduces cloud storage costs and improves efficiency by minimizing data recalls, allowing aggressive tiering policies that include even hot data, while maintaining write support for tiered files, thus optimizing storage usage and reducing costs.
Smart Images

Figure US20260377063A1-D00000_ABST
Abstract
Description
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims the benefit under 35 U.S.C. § 119 of the earlier filing date of Indian Application Serial No. 202511048729 filed May. 20, 2025, the entire contents of which are hereby incorporated by reference in their entirety for any purpose.TECHNICAL FIELD
[0002] Examples described herein relate to computer system file tiering systems and operations. Examples of systems which may write to tiered files are described.BACKGROUND
[0003] File storage may be tiered. Tiering of stored data allows for different types of storage to be efficiently used to store an enterprise's data. For example, storage having a higher latency may be more inexpensive and may be used to store data which has not been utilized for a long time and / or is used infrequently (e.g., “cold storage”). Storage having a lower latency, which may be more expensive, may be used to store data which has been used recently and / or frequently ("hot storage").
[0004] When writing data to a stored file or other repository of stored data, if the data had been tiered, it must typically be recalled from the tiered storage. The tiered storage on which the file is tiered generally does not allow in-place updates. The tiered storage may be at a cloud provider and / or in an object store, and it may take time to recall the complete file in order to perform the write operation. It may also cost money to recall the file if the file is tiered in storage that incurs a cost for recall or access.BRIEF DESCRIPTION OF THE FIGURES
[0005] FIG. 1 is a schematic illustration of a system arranged in accordance with examples described herein.
[0006] FIG. 2 is a flowchart of a process for responding to an open request arranged in accordance with examples described herein.
[0007] FIG. 3 is a flowchart of a process for responding to a read request arranged in accordance with examples described herein.
[0008] FIG. 4 is a flowchart of a process for responding to a write request arranged in accordance with examples described herein.DETAILED DESCRIPTION
[0009] Certain details are set forth herein to provide an understanding of described embodiments of technology. However, other examples may be practiced without various of these particular details. In some instances, well-known circuits, control signals, timing protocols, storage system components, tiering methods, and / or software operations have not been shown in detail in order to avoid unnecessarily obscuring the described embodiments. Other embodiments may be utilized, and other changes may be made, without departing from the spirit or scope of the subject matter and / or claims presented here.
[0010] Systems described herein may efficiently write data to tiered files. In some examples, the tiered files may not be wholly (or even partially) recalled from tiered storage in order to perform the write. As write requests come in, systems described herein may determine if the writes are aligned writes (e.g., a write of an entire block) or not an aligned write. Aligned writes for tiered files may be passed directly to the file system. Accordingly, new write data may be stored at the file system (e.g., not in tiered storage). A volume manager of the file system may write the write data to storage of the file system (e.g., a file system storage pool). If the write is not an aligned write, one or more relevant portions of the file may be recalled from tiered storage. The write request may be used to alter the recalled portion(s), and the recalled portion(s) stored at the file system. Accordingly, over time, an increasing amount of data for tiered files may be stored at the file system (e.g., not in the tiered storage). Accordingly, re-tiering operations may be performed, such as when greater than a threshold amount of one or more files is now stored at the file system. To re-tier, blocks of the file that are not at the local file system may be recalled. When the file was tiered, the file may have been replaced with a stub at the file system. During recall of blocks of the file that are not at the local system, all ranges of the file may be rehydrated to the stub. The entire file may then be re-tiered. In some examples, blocks may be of a fixed size, accordingly, additional data is not utilized to communicate a size of a block.
[0011] Examples described herein relate to tiering the files data available on a local file system to tiered storage. The tiered storage may generally be implemented using storage which does not allow direct updates. The tiered storage may be cheaper and / or slower than file system storage. In some examples, the tiered storage may be implemented using a cloud object store (e.g., AWS S3). The files data which was earlier consuming space on the local file system can be tiered to the cloud object store which may be cheaper in some examples. User(s) may create one or more policies to tier data to the tiered storage (e.g., to the cloud) depending on the amount of files and / or data to be tiered. Some systems may tier the data which is very old (e.g., only cold data) and where no write operations are anticipated to happen on the cold data. In some examples, a user may select, using policies, data for tiering which has become over a threshold age (e.g., an year or more old data, 5-6 months old data, etc.) and less likely that any write operation or modification would be performed on such data. Although, users may be allowed to have access to the tiered data in read-only mode, users may not be allowed to perform write and / or update operation on the tiered data.
[0012] In some examples, to reduce the cost, example systems may aggressively tier data from the local file system that runs on cloud storage (e.g., AWS-to-AWS object storage S3). For example, instead of tiering year or more old data or even months old data, an objective may be to tier a week or may be few days old data (e.g., even tiering hot data in some examples) or even few hours old data depending on the tiering policy configured by the customer e.g., whether the customer has configured very aggressive tiering, moderate tiering, or very light tiering while configuring the policy for tiering. The data will accordingly be tiered from the local file system. Accordingly, tiering policies described herein may influence the free space that a user wants to keep in the local file system.
[0013] In view of increasingly aggressive tiering policies, providing write and / or update operations on files which are tiered may be advantageous particularly for the files which are still hot, and which have been tiered based on a user-configured aggressive tiering policy. Accordingly, examples described herein may provide write support on tiered files, which may in turn save cloud storage cost for the system. Examples may be be applied to any tiered storage (e.g., HDD) and not necessarily only when data is tiered to cloud.
[0014] Examples of systems described herein accordingly provide one or more mechanisms to support write and / or update operations files which are tiered to tiered storage (e.g., cloud object storage). To achieve this, local file systems described herein include store indications regarding tiering status - for example, data may stored (e.g., metadata) that indicates if a file is tiered. and if tiered than what portion(s) of the file is tiered and / or what portion(s) of file is online or available locally. If a file is tiered, generally all the file data except a first block of the file may be tiered to the cloud and what remains on the local file system is the file stub (e.g., a pointer to the original data). Generally, the stub may have the same file attributes as the original physical file. The pointer remains on the local file system and the file data is tiered to the cloud or other tiered storage. For example, consider a file of 1GB. The file data may be tiered to the cloud e.g., all the blocks on the local file system which were serving the data may be freed by tiering the data to the cloud and only the first block (e.g., 64KB) may remain used on the local file system to store the file stub. The file stub may include, for example, the first block of file data (or other portion of file data), file system metadata (e.g., inode or other identification of the file), and / or related extended attributes of the file, such as metadata indicative of the location of the file data in tiered storage.
[0015] FIG. 1 is a schematic illustration of a system 100 arranged in accordance with examples described herein. The system 100 includes file system protocol(s) 110, common tiering library 106, range map 108, range map cache 126, tiering engine 102, tiered storage 104, file system volume manager 112, and file system storage 120.
[0016] FIG. 1 is provided by way of example. Additional, fewer, and / or different components may be used in other examples.
[0017] In some examples, multiple components shown in FIG. 1 may be included in one or more virtual machines and / or containers. For example, the file system protocol(s) 110, common tiering library 106, file system volume manager 112, and / or tiering engine 102 may be included one or more virtual machines and / or containers. In some examples, a file server virtual machine may include file system protocol(s) 110, common tiering library 106, file system volume manager 112, and / or tiering engine 102.
[0018] In some examples, the components shown in FIG. 1 (other than tiered storage 104) may be integrated into and / or associated with a computing node. Systems described herein my include multiple computing nodes. Accordingly, in some example systems, multiple computing nodes may be provided, each having components analogous to those shown in FIG. 1, and the multiple computing nodes may tier files to tiered storage 104. Each of the computing nodes may be associated with a portion of file system storage for the entire multi-computing node system. The portion of the file system storage may be managed by each computing node as described with reference to FIG. 1. Any of a variety of referral techniques may be utilized to refer requests between computing nodes to allow a request to be serviced by the computing node owning the requested file and / or other data.
[0019] Examples of systems described herein may include file system protocol(s), such as file system protocol(s) 110 of FIG. 1. In some examples, file system protocol(s) 110 may be provided on a computing system. The file system protocol(s) 110 may be implemented in software, such as by providing a file system protocol service. For example, file system protocol(s) 110 may include executable instructions encoded on one or more non-transitory computer readable media which, when executed by a processor of the computing node, cause the computing node and / or system to perform file system protocol operations described herein. The file system protocol(s) 110 may include instructions to support multiple file system protocols - e.g., NFS, SMB, and / or rsync. The file system protocol(s) 110 may provide requests for files in a file system in accordance with the file system protocol. For example, the file system protocol(s) 110 may provide requests to open, read, and / or write to one or more files in a file system. The request may identify a file using a path. A file system may be arranged in hierarchical directories. The path may specify one or more folders and / or directories and a name of the file to describe the location of the requested file. Requests for files may be received by file system protocol(s) 110 from one or more clients (e.g., computing systems which may be interacting with a file system). In some examples, a client process may be executing on a same computing node and / or in a same system as file system protocol(s) 110. In some examples, however, the client process may be separate from the computing node and / or system hosting the file system protocol(s) 110.
[0020] Examples of systems described herein may include common tiering library 106. The common tiering library 106 may be implemented in software. For example, common tiering library 106 may include executable instructions encoded on one or more non-transitory computer readable media which, when executed by a processor of a computing node, cause the computing node and / or system to perform common tiering library operations described herein. The common tiering library 106 may receive requests from the file system protocol(s) 110 in any of the variety of protocols supported by the file system protocol(s) 110, such as SMB, NFS, and / or rsync. The common tiering library 106 may communicate with other components of the system to implement the requests. In this manner, communication with other components of the system from the common tiering library 106 may not be specific to a particular file system protocol. The common tiering library 106 may generate the communications with other components used to implement a particular request received in accordance with a particular file system protocol. In this manner, systems described herein may support multiple file system protocols without having all components have to support all file system protocols. Rather, the common tiering library 106 supports multiple file system protocols and generates communications for tiering engine 102 and / or file system volume manager 112 to implement those requests, but those communications may not be particular to a file system protocol. The common tiering library 106 may provide commands to tiering engine 102 to perform a read, and / or a full or partial recall of all or portions of a file. The common tiering library 106 may provide commands to file system volume manager 112 to open, read, and / or write all or portions of a file. In some examples, the common tiering library 106 may communicate one or more application programming interface (API) calls to file system volume manager 112 and / or tiering engine 102. Note that the API calls may not be specific to a particular file system protocol. Accordingly, in some examples, the common tiering library 106 may provide one or more wrappers. The wrappers may have access to range map 108 and / or range map cache 126. The wrappers may be used to process file operations described herein (e.g., open, read, write, and / or truncate).
[0021] Examples of common tiering libraries described herein may access a range map, such as range map 108 of FIG. 1. The range map 108 may be stored in storage file system file system volume manager 112. Portions of the range map 108 may be cached in or by the common tiering library 106 as range map cache 126. In some examples, the range map cache 126 may store an indication of a state of each file (e.g., tiered and / or local). In some examples, the range map cache 126 may further include tiering metadata (e.g., an address for tiered storage). In some examples, the storage may be memory, in some examples, the storage for the range map 108 may be shared with file system storage described herein. For example, the range map 108 may be stored in file system storage 120 in some examples. In some examples, all or portions of the range map 108 may be cached in range map cache 126. In some examples, rather than caching the range map in the range map cache 126, a portion of the range map to be utilized in a particular operation may be fetched by the common tiering library 106 from the file system volume manager 112. Accordingly, the range map cache 126 may represent a fetched portion of the range map 108. The range map 108 may store an indication of which ranges of data are available in file system storage 120 and / or which ranges of data have been tiered to tiered storage 104. Information in the range map 108 may accordingly aid in determining how to service open, read, and / or write requests described herein.
[0022] When a request is provided to common tiering library 106, the common tiering library 106 may access an indication of a state of the file (e.g., tiered and / or local) in range map cache 126. In some examples, the common tiering library 106 may request portions of the range map 108 from the file system volume manager 112. By accessing the range map cache, the common tiering library 106 may determine if the data implicated by the request is stored at file system storage 120 and / or has been tiered and is located in tiered storage 104. In some examples, the range map cache 126 includes a file descriptor for multiple files in the system. For each file descriptor, the range map cache may store an indication that the file is tiered or that the file is not tiered. For tiered files, the range map cache may store an identification of the location of the tiered file (e.g., URL of object store). In some examples, the range map cache 126 may include, with block size granularity, which blocks of a file are stored on file system storage 120 and which are tiered to tiered storage 104. In some examples, the range map cache 126 may further include an indication of a truncated file size for each file. For example, file system protocol(s) 110 herein may provide a command to truncate a file (e.g., from 1GB to 100MB). The range map cache 126 may include an indication of the truncated size of the file. In this manner, the common tiering library 106 may utilize the truncated size of the file to determine how to process a write request. The range map cache 126 may be a copy of all or portions of the range map 108, and / or may be derived from the range map 108. In some examples, while a file is open, the status may not change from local to tiered. However, a change from tiered to local may be possible while open. If the file becomes local (e.g., the file is recalled), all or a portion of the range map cache 126 may be invalidated.
[0023] Note that, while the file system protocol(s) 110 and common tiering library 106 components are shown in FIG. 1, in some examples, the common tiering library 106 may not be provided. For example, if only a single file system protocol is supported, the file system protocol(s) 110 may communicate directly with other system components and may access the range map 108 and / or range map cache 126 in some examples. In some examples, the file system volume manager 112 may itself have the capability to communicate with multiple file system protocols. However, it may be difficult to expand file system volume manager 112 functionality in examples where the file system volume manager 112 is a kernel component. Accordingly, it may be advantageous to provide common tiering library 106 outside of the kernel to provide multiple file system protocol functionality in systems described herein. In this manner, the common tiering library 106 may provide a common layer to communicate with multiple file system protocols.
[0024] Examples of systems described herein include a file system volume manager, such as file system volume manager 112 of FIG. 1. The file system volume manager 112 may be implemented in software. For example, file system volume manager 112 may include executable instructions encoded on one or more non-transitory computer readable media which, when executed by a processor of a computing system and / or computing node, cause the computing system and / or computing node to perform file system volume manager operations described herein. In some examples, the file system volume manager 112 may be implemented using a file system. In some examples, the file system volume manager 112 may be a kernel component. For example, the file system volume manager 112 may be part of and / or integrated with an operating system. The file system volume manager 112 may manage one or more storage units, such as one or more volumes or volume groups, that store files of the file system. The file system volume manager 112 may manage the volumes stored on disks associated with the file system storage 120, e.g., associated with a computing node and / or computing system executing and / or hosting file system volume manager 112. The file system volume manager 112 may maintain and access range map 108. In some examples, the file system volume manager 112 may not separately maintain the range map 108. The range map 108 may be derived on demand when requested from data block pointers of the file. Accordingly, in some examples the file system volume manager 112 may access data block pointers of a file and generate portions of the range map 108 accordingly. The range map 108 may include an association between files and their tiering status. The status may be provided on a block by block basis. For example, for each block of a file the range map 108 may indicate whether the block is available on file system storage 120 and / or is on tiered storage 104. The range map 108 may indicate a location of the file or blocks of the file in tiered storage. The range map 108 may include a bitmap indicating whether the file is tiered or not (e.g., whether at least one block or portion of the file is only stored in tiered storage and not on file system storage 120). In some examples, the file system volume manager 112 exposes a number of application programming interfaces (APIs) which may be called by the common tiering library 106 and / or tiering engine 102.
[0025] Examples of systems described herein may accordingly store a range may, such as a range map 108 of FIG. 1. The range map 108 may be stored in memory of a computing node hosting the file system volume manager 112 in some examples. The range map 108 may be in file system storage 120 in some examples. The range map 108 may be stored in other storage accessible to the file system volume manager 112. The range map may store information about the location of stored blocks of files of the file system. In this manner, the block may indicate the location of multiple parts and / or ranges of files in the file system. In examples described herein, the file system volume manager 112 may maintain in range map 108 an indication of portions of files which may be stored in file system storage 120, while other blocks of the file are stored on tiered storage 104.
[0026] Examples of systems described herein include file system storage, such as file system storage 120 of FIG. 1. The file system storage 120 may be referred to as local storage. The file system storage 120 may be local to a computing node hosting file system volume manager 112 and / or file system protocol(s) 110. The file system storage 120 may include one or more hard disks, solid state drives, and / or other electronic storage media. In some examples, the file system storage 120 may be network-attached storage or other network-accessible storage. The file system storage 120 may form part of a storage pool in some examples. The storage pool may include storage of other computing nodes in a multi-node system in some examples. Some multi-node systems described herein may have a hyperconverged architecture. Local storage of each of the computing nodes may contribute to a storage pool for the multi-node system. In some examples all or portions of the range map 108 may be included in and / or copied to the range map cache 126. Accordingly, in some examples, the range map 108 may include an indication of which blocks are stored in file system storage 120 and which are tiered to tiered storage 104.
[0027] Examples of systems described herein may include a tiering engine, such as file system storage tiering engine 102 of FIG. 1. The tiering engine 102 may be implemented in software. For example, tiering engine 102 may include executable instructions encoded on one or more non-transitory computer readable media which, when executed by a processor of a computing system and / or computing node, cause the computing node and / or computing system to perform tiering engine operations described herein. The tiering engine 102 may in some examples be implemented on a same computing node hosting file system volume manager 112 and / or common tiering library 106. In some examples, tiering engine 102 may be wholly or partially hosted on a different computing system. In some examples, all or a portion of the tiering engine 102 may be hosted by an analytics system in communication with the file system volume manager 112 and / or common tiering library 106. The tiering engine 102 may tier files from file system storage 120 to tiered storage 104 and / or recall files from tiered storage 104 to file system storage 120. Tiering a file generally refers to moving the data representing the file to tiered storage. When the file is moved to tiered storage, the tiering engine 102 may leave a stub in file system storage 120. The stub generally includes a portion of the file (e.g., a first 64 kB of the file), and metadata associated with the file, such as where in tiered storage the file is now located. In this manner, requests for the file which arrive at file system volume manager 112 may identify the tiered status of the file and an identification of the location of the file in tiered storage. An example of the location of the file in tiered storage may include a URL of an object store and an object ID stored in a bucket storing the file. Additional metadata about the file may be stored in the stub.
[0028] The tiering engine 102 may include and / or access a policy engine and / or policy storage in some examples. The policy engine and / or policy storage may implement and / or store policies, such as policies setting parameters to recall and / or re-tier files after greater than a threshold amount of the file is stored in file system storage 120. Range maps or other metadata described herein may store an indication of an amount of the file stored at the file system storage. Tiering policies may be implemented by the tiering engine 102. Tiering policies may include a threshold age and / or access frequency for files. Files older and / or accessed less frequently than the threshold may be eligible for tiering in accordance with the policy. The tiering engine 102 may attend to the tiering of eligible files.
[0029] Tiering engines described herein, such as tiering engine 102, may be provided on a computing node and / or system which is different than a computing node and / or system hosting the file system, such as file system volume manager 112 and / or file system storage 120. Communication between the computing node hosting the file system volume manager 112 and the computing system hosting the tiering engine 102 may occur over a network, such as a wide-area network or Internet (e.g., using http) in some examples.
[0030] Tiering may generally occur in units of data that may be a particular length, this may be referred to as a unit of tiered data. The unit of tiered data may be, for example, 10MB, however other amounts may be used. Accordingly, tiering of an entire file may not take place in one operation. Rather, the file may be tiered in groups of units of tiered data. The checksum of each unit may be taken for data integrity purposes. When tiered and / or recalled, the checksum may be verified to ensure data integrity. A file may be tiered unit by unit to the tiered storage 104. Error checking and other validation may be performed on each unit. Accordingly, a unit of tiered data may be a portion of a file that can reliably be tiered and recalled. Generally, such a unit may be smaller than the size of a file such that one file spans multiple units.
[0031] Examples of systems described herein may include tiered storage, such as tiered storage 104 of FIG. 1. Files may be tiered to tiered storage by tiering engine 102. The tiered storage 104 may be implemented as storage in communication with tiering engine 102 over a network, such as the Internet. Accordingly, HTTP or other Internet communication may be used to communicate between tiering engine 102 and tiered storage 104. The tiered storage 104 may be implemented using cloud storage which may be provided by one or more cloud storage service providers. In some examples, the tiered storage 104 may be implemented using object storage. For example, AMAZON S3 storage may be used to implement tiered storage 104.
[0032] Examples of systems described herein may include file system metadata 124. The file system metadata 124 may be a database which may be stored in file system storage 120 in some examples. The file system metadata 124 may be stored in another computing system and / or other storage accessible to the computing node(s) of FIG. 1 in some examples. In some examples, after each file operation (e.g., open, read, write), statistics or other metadata regarding the file system may be provided to the file system metadata 124. The data provided may include the size of the file and the number of active blocks (e.g., the number of blocks present in the file system storage 120).
[0033] During operation, many I / O operations involving files will begin with an open request. A file system protocol(s) 110 may provide a request or command to open a file. The request or command may be provided to common tiering library 106. The common tiering library 106 may provide a request to open the file to the file system volume manager 112. If the file is not tiered, the file will be opened. If the file is tiered, the file system volume manager 112 may access the stub. Information in the stub identifying the location of the file may be stored to the range map 108.
[0034] A client may send a write request. The file system protocol(s) 110 may send a write command to the common tiering library 106. The write request may include a file descriptor for a file. The file may have been previously opened. The write request will further include a start offset. The start offset identifies a position in the file where the write data starts. In some examples, the write request may further include a length of the data to be written. The write request will include the data to be written (e.g., the write data). The write data may be provided as a buffer of data. The common tiering library 106 may access the range map cache 126 to determine if the file descriptor corresponds to a tiered file. If the range map cache 126 indicates that the file is not tiered, the common tiering library 106 may provide a write command to the file system volume manager 112 to write the write data to the file system storage 120. If the file descriptor corresponds to a tiered file, then the write behavior may depend on a location of the write.
[0035] Recall data may be read in blocks. Data in the file system storage 120 may, for example, have a block size. An example block size may be 64 kB, although any block size may be used. Data may be read from the file system storage 120 in blocks. If less than a block of data is requested, an entire block may nonetheless be read. If less than a block was requested, the portion of the read block requested may be returned. Accordingly, to write data, a block of data may be read, the block modified with the write data, and the modified block returned to storage.
[0036] Returning now to the system of FIG. 1, when the common tiering library 106 determines a write request is directed toward a tiered file, the common tiering library 106 may determine whether the write is a block-aligned write. A block-aligned write refers to a write which coincides with the block boundaries in a file. If an entire block is to be written, for example, there may be no need to read the block, modify it, and return the modified block to storage. Since the entire block will be written, the new write data may simply be stored without first reading the block. Accordingly, when the common tiering library 106 determines that a write request is a block-aligned request, the write data may be written to file system storage 120. Note that the write data for the block-aligned write may be written to file system storage 120 even if the file is located in tiered storage 104. The file system volume manager 112 may maintain a range map 108 indicating the blocks which have been written to the file system storage 120. If the write request is not a block-aligned request, then blocks may be read from tiered storage to implement the requested write.
[0037] In the case of non-aligned write requests, the common tiering library 106 may communicate with file system volume manager 112 to determine if the implicated block(s) are present on file system storage 120. For example, the range map 108 may indicate that the implicated block(s) are present on file system storage 120. When the block(s) being written to by a non-aligned write are present on the file system storage 120, the write data for the write request may be written to file system storage 120. For example, the file system volume manager 112 may read the block(s) from the file system storage 120, modify them (e.g., combine them) with the write data, and store the updated block(s) in file system storage 120. The range map 108 may continue to indicate the availability of those blocks on file system storage 120. If block(s) being written to by a non-aligned write are not present on file system storage 120, the block(s) may be recalled from tiered storage 104. Recalling the blocks may take time. In some examples, the common tiering library 106 may accordingly wait and retry the write request after some time. For some file system protocols (e.g., NFS), however, the common tiering library 106 may return an error that will cause the file system protocol itself to re-try the write request.
[0038] When recalling the block(s) for a non-aligned write request, in some examples the specific implicated block(s) may be recalled. However, in some examples, an entire unit of tiered data may be recalled. The unit of tiered data may be greater than the block. Once the unit of tiered data is recalled, the file system volume manager 112 may update the range map 108 to indicate all the blocks in the unit of tiered data are now available in file system storage 120. In some examples, the file system protocol(s) 110 and / or the common tiering library 106 may re-try the write request. Now, the implicated blocks for the write request may be found on the file system storage 120, and the file system volume manager 112 may write the data to the blocks and return the updated blocks to file system storage 120.
[0039] In some examples, for a write request, the common tiering library 106 may determine that a write request is directed toward a location beyond the addressable object size. The addressable object size may be the size of the file which is backed up in the tiered storage. For example, the addressable object size may be a range for which the data in the tiered store may be referenced for read and / or write operations. When the write request is directed at a location beyond that truncated size, the write data may be provided to the file system volume manager 112 even when the file is tiered. This is because, in some examples, the write data does not need to be combined with any data read from the truncated portion of the file. Accordingly the write data can be provided to file system storage 120.
[0040] When responding to a read request the common tiering library 106 will communicate a read request to the file system volume manager 112 and request information from the range map 108. The range map may indicate certain blocks are present on file system storage 120. Accordingly, the common tiering library 106 may obtain certain blocks from the file system storage 120 and may recall other blocks from tiered storage 104 to provide the read data. The common tiering library 106 and / or file system volume manager 112 may merge the write data stored in the file system storage 120 with data recalled from tiered storage 104 to return the read data.
[0041] Over time, accordingly, using methods of writing write data described herein, additional blocks will become stored in file system storage 120. As writes occur, new write data for block-aligned writes and / or recalled blocks modified with write data may be stored in file system storage 120. Recall it may be advantageous to tier data to reduce costs or improve efficiency of storage systems. Accordingly, it may be disadvantageous to increase the blocks available at file system storage 120. The increasing number of blocks available at file system storage 120 may increase costs, for example. User-defined tiering policies utilized by tiering engines described herein may be aggressive - e.g., may refer to a threshold amount of space to be utilized at file system storage 120, resulting in a need to tier data beyond the threshold. In some examples, the tiering policy may cause data to be eligible for tiering at a relatively low threshold of age (e.g., hours or days or old), or other criteria.
[0042] Accordingly, in some examples, when greater than a threshold amount of a tiered file is stored in file system storage 120, the tiering engine 102 may recall and re-tier the file. Any threshold value may be used. In some examples, the threshold may be 50%. Other examples of thresholds include 20%, 30%, 40%, 60%, 70%, and 80%, but other threshold values may be used. The threshold may be set, for example, by an administrator and / or client. The threshold may be stored, for example, in range map 108, range map cache 126, file system storage 120, and / or by a tiering policy utilized by tiering engine 102.
[0043] While a threshold for a particular file is described by way of example, in some examples, other thresholds may be used. For example, when greater than a threshold amount of data is stored in the file system storage 120, the tiering engine 102 may recall and re-tier one or more files having portions stored in the file system storage 120 as indicated by the tiering engine 102. The tiering engine 102 may prioritize files for re-tiering. For example, files having more portion(s) stored at the file system storage 120, as indicated by the range map 108 and / or range map cache 126, may be re-tiered earlier than files having fewer portion(s) stored at the file system storage 120, even though all may be eligible for re-tiering.
[0044] Once greater than the threshold amount of the file is stored in file system storage 120 and / or greater than a threshold amount of storage is used in file system storage 120, one or more files may be identified as a file to be tiered. For example, range map 108 and / or range map cache 126 may indicate an amount of storage used by a file in the file system storage 120. The tiering engine 102 may recall the rest of the data for the file from tiered storage 104. Accordingly, the tiering engine 102 may access the range map maintained by file system volume manager 112 to determine which ranges of the file to recall from the tiered storage 104. Those ranges (e.g., tiering units including those ranges) will be recalled and a stub for the file may be re-hydrated at the file system storage 120. Accordingly, the entire file may now be present at file system storage 120, including portions having been updated through write requests. The write requests having previously occurred at file system storage 120. Once the entire file is re-hydrated, the tiering engine 102 may tier the file to the tiered storage 104. This may be a simpler approach for implementation of re-tiering files. Systems accordingly may first re-hydrate an entire file in file system storage 120 and then the tiering engine 102 may tier the entire file to tiered storage 104. In some examples, however, the tiering engine 102 may not rehydrate the entire file. Instead, the tiering engine 102 may tier the blocks of the file present in the file system storage 120. The file system metadata 124 and / or range map 108 may store an indication of the various portions of tiered storage 104 which contain portions of the file. This may be more complex than re-hydrating and re-tiering the entire file.
[0045] In this manner, systems described herein may utilize multiple processes to support efficiently handling write requests for tiered files. Note that the file system itself (e.g., file system volume manager 112) may not know where the tiered data is stored. Rather, the tiering engine 102 may be aware of where the tiered data is stored. The file system volume manager 112 and / or common tiering library 106 may request the tiering engine to recall the data from the tiered storage instead of the file system volume manager 112 recalling the data itself.
[0046] In some examples, the common tiering library 106 and / or file system volume manager 112 may not know where the missing data is that is not in the file system. In some examples, the common tiering library 106 and / or file system volume manager 112 may know only that the data is tiered. For example, the stubs for tiered files may not include a URL or other identifier of the location of the tiered storage and / or that locator may not be accessed during operations of the file system volume manager 112. In this manner, data recall may not need to be handled at a kernel level. For example, the file system volume manager 112 may reside in the kernel and it may not be advantageous to have the kernel perform the tiering operations. Rather, the file system volume manager 112 may request that the tiering engine 102 recall and / or tier files. In this manner, file system software code may remains separate from the interaction with the tiered storage.
[0047] FIG. 2 is a flowchart of a process for responding to an open request arranged in accordance with examples described herein. The process of FIG. 2 may be implemented by the system of FIG. 1 in some examples.
[0048] The process shown in FIG. 2 is exemplary. Additional, fewer, and / or different operations may be used in other examples.
[0049] In block 202, a client may provide an open call. For example, a client may provide an open call to file system protocol(s) 110 of FIG. 1. The open call may include path and mode variables, such as open (path, mode). The open call may accordingly specify a path for the file that is to be opened.
[0050] Block 202 may be followed by block 204. In block 204, an open call may be issued, such as by file system protocol(s) 110 of FIG. 1. An example open call may be SYSCALL (OPEN).
[0051] Block 204 may be followed by block 206. In block 206, responsive to a file open request, the system may check if the file is tiered (e.g., the common tiering library 106 may access range map 108 and / or range map cache 126). In some examples, the common tiering library 106 may communicate with the file system volume manager 112 to determine whether the file is tiered. If the file system volume manager 112 determines that a stub is present for the file, the file system volume manager 112 may indicate the file is tiered. If the file system volume manager 112 determines that the file is wholly present on file system storage 120, the file system volume manager 112 may indicate the file is not tiered.
[0052] If the file is tiered, block 206 may be followed by block 208. In block 208, the system may update the range map, such as add an entry to the range map, such as range map 108. For example, the common tiering library 106 and / or file system volume manager 112 may add the entry to the range map. The entry may be cached to range map cache 126. The entry may specify an identification of the file (e.g., filename, path, and / or inode number), and may store an associated indication that the file is tiered (e.g., tier=true). Examples of range maps may include bitmaps. A bit value (e.g., a ‘1’) may be used to represent a tiered file. In some examples, the range map 108 may be fetched from file system volume manager 112 and may be included in range map cache 126.
[0053] If the file is not tiered, block 206 may be followed by block 210. an entry may be added to range map cache 126 and / or range map 108, which may be in cache. The entry may specify an identification of the file (e.g., filename, path, and / or inode number), and store an associated indication that the file is not tiered (e.g., tier=false). If the file is not tiered, the file may be opened normally from file system storage 120. This may be referred to as a passthrough call. The call passes through the common tiering library 106 to the file system volume manager 112. A file descriptor may be returned to the user.
[0054] The true / false state of tiering for each file may be stored as a bitmap. The bitmap indications of tiering status may be advantageous to avoid or reduce a need to check the state of the file for each read and write operation.
[0055] The file may then be open in block 212. After the file is opened (e.g., either tiered or not tiered), then the user may perform other operations (e.g., I / O operations such as read and / or write operations) on the file.
[0056] In this manner, the tiering state of open files may be maintained in cache, such as in range map cache 126. The tiering state (e.g., true / false) for each file may be stored as a bitmap. The cached indication of tiering status of open files may be advantageous to avoid checking the state of the file for each read and write operation. Note that the file system volume manager 112 of FIG. 1 may block access from other protocols if the file is open by a protocol for writing. Tiering may also be blocked on files that are open.
[0057] FIG. 3 is a flowchart of a process for responding to a read request arranged in accordance with examples described herein. The process may be implemented by the system of FIG. 1 in some examples.
[0058] The flowchart of FIG. 3 is exemplary. Additional, fewer, and / or different operations may be present in other examples. The operations may occur in different orders in some examples, and some operations may occur wholly and / or partially simultaneously.
[0059] A file read request, depicted in block 302, may include in some examples a file identifier, a buffer, and a size of the read. The file read request may be received by systems described herein, and block 302 may be followed by block 304. In block 304, the system 100 may check if the file is tiered or not tiered. For example, the range map cache 126 may be accessed by the common tiering library 106. A bitmap of the range map cache 126 may be checked in some examples to determine if a tiering state (e.g., a tiering bit) is true or false.
[0060] If not tiered, the block 304 may be followed by block 306. In block 306, the file may be read directly from the local file system (e.g., file system storage 120). This may be referred to as a passthrough read. The read data may be returned to the client (e.g., an application).
[0061] If the file is tiered, block 304 may be followed by block 308. In block 308, the system may determine, from the local file system, which of the file blocks are available in the range that is being read. For example, the common tiering library 106 and / or file system volume manager 112 may access the range map 108 to determine if the file blocks requested (e.g., based on the buffer and size provided in the request) are on the file system storage 120. If all the file blocks to be read are available in the local file system (e.g., file system storage 120), then block 308 may be followed by block 306, and the request may be treated as a passthrough request. The local file system returns the data that is requested to be read.
[0062] But if one or more of the file blocks to be read is not available in the storage (e.g., disks) of the local file system, then block 308 may be followed by block 310. In block 310, the read process may wait as file blocks which are not available in the local file system storage may be recalled from the tiered storage (e.g., cloud object storage). The tiering engine 102 may recall / pull the data from the tiered storage 104. While the tiering engine is recalling the data from the tiered storage, the block 310 may be followed by block 312. In block 312, as time passes, the system may evaluate whether the block(s) have been received from tiered storage. In some examples, after a period of time, if the block(s) have not been received, block 312 may be followed by block 314. In block 314 the file system volume manager 112 and / or common tiering library 106 may receive an error message for some protocols. For example, EJUKEBOX and / or EAGAIN may be sent in some examples. These errors may cause the protocol to try again (e.g., resend a read request) after a period of time in some examples. In some examples, the system itself may send a communication to the client (e.g., the application) to retry later.
[0063] If the block(s) are received, the data may be returned to the requestor (e.g., the client such as an application). In some examples, the data may be modified before being returned to the requestor.
[0064] In some examples, the portion of the file that is read / recalled from the tiered storage 104 may not be written to the file system storage 120 and instead may be cached in a temporary cache. Note that, in the example of FIG. 3, this data is to be returned responsive to a read operation. In some example, an entire tiering data unit (e.g., 10MB) may be recalled. Out of the unit size, the required file blocks for the read are selected and provided to the application (e.g., client) to serve the read request. In some examples, recalled file blocks may be combined with file blocks present in file system storage 120 to serve the read request. For example, block 312 may be followed by block 316. In block 316, certain ranges of the recalled data may be overwritten by local data from file system storage 120. For example, if previous write data had been written to file system storage 120, the recalled file data may be modified by replacing the blocks associated with write data with the write data at file system storage 120. In this manner, write data may be combined with a portion of the file that had been recalled to create an updated portion of the file. Accordingly, recalled read data may be stored and combined with previous write data at the file system storage 120 to generate updated read data. The updated read data may be returned as a response to the read request in block 318, which may follow block 316 and / or block 312.
[0065] FIG. 4 is a flowchart of a process for responding to a write request arranged in accordance with examples described herein. In some examples, the process of FIG. 4 may be implemented using the system of FIG. 1.
[0066] The example of FIG. 4 is exemplary. Additional, fewer, and / or different operations may be used in other examples. The operations may occur in other orders and some operations may be performed wholly and / or partially simultaneously in some examples.
[0067] In block 402 a write request may be received. The write request may identify a file name (e.g., using a path), an offset (which may be referred to as a start location), and / or a size for the write request. The block 402 may be followed by block 406. In block 406, the system may determine whether the file associated with the write request is tiered. For example, when a write I / O operation request is received, the common tiering library 106 may reference the range map cache 126, which may include cache memory storing information indicating the opened file is tiered or not tiered. For example, the range map cache 126 and / or range map 108 may include a bitmap with values for each file in a file system, with the value indicating a tier status for the file.
[0068] If the requested file is not tiered, then block 406 may be followed by block 410. In block 410, the local file system may be directly called responsive to the write request. Generally, in the case where the file is not tiered, the local file system (e.g., file system storage 120) may have all the data for the file which is not tiered. This may be referred to as a passthrough write, and the write may be written directly to the file as stored in file system storage 120.
[0069] However, if the range map 108 and / or range map cache 126 indicates the file opened for write operation is tiered, then the local file system may be called to provide a list of blocks of the file available on local disk (e.g., in file system storage 120). In some examples, the write operation request may include semantics and / or arguments that include a start offset and length of data that the user wants to write.
[0070] When the file is tiered. block 406 may be followed by block 412. At block 412, the system may determine whether the write request is a block aligned write. If the length of data to be written as part of the write operation request is a multiple of file block size e.g., multiple of 64KiB or in other words aligned to the file block boundaries, and starts at a block start, then it may be determined to be a block aligned write. For a block aligned write, it may not be necessary even to identify file blocks available on local disks of the local filesystem and instead the length of data in write operation request can be written directly to disks of the local file system (e.g., file system storage 120). Accordingly, there may be no need to read and / or merge data to service the write request. If the write request is a block aligned write, block 412 may be followed by block 410, and the data may be written to the file system storage 120, e.g., using file system protocol(s) 110.
[0071] However, if the length of data to be written as part of the write operation request is not a multiple of file block size e.g., multiple of64KiB or in other words not aligned to the file block boundaries, then the write may be a non-block aligned write. For a non-block aligned write, the block 412 may be followed by block 414. In block 414, the data available in the file blocks of local disks (e.g., file system storage 120) may be read. If the range of blocks impacted by the write request are available locally, then block 414 may be followed by block 410 and the data may e written to the file system storage 120, e.g., using file system protocol(s) 110. For example, the write data may be used to modify multiple blocks worth of data stored locally in file system storage 120.
[0072] If the range of blocks impacted by the write request are not available locally, then block 414 may be followed by block 416. In block 416, the tiered blocks may be recalled from tiered storage. One or more tiered unit(s) of the file may be recalled, e.g., using tiering engine 102. The write request may need to wait for the portion(s) of the file to be recalled, and may receive an error (e.g., EAGAIN) and / or may receive a communication to retry the write request at a later time. When the portion(s) have been recalled, then they may be modified with the write data responsive to the write request. For example, the system may combine the write data with the portion of the file having been recalled to create an updated portion of the file. The updated portion of the file may be stored in the file system storage 120. Once the write operation is retried, accordingly, the data to be modified by the write operation may be in file system storage 120, and the write may be treated as a passthrough write, e.g., in block 410 and be performed on the file system storage 120.
[0073] Accordingly, the recalled tiered unit(s) of the file may be modified in accordance with the write data. The length of data to be written responsive to the write operation request may be written to the file blocks in disks of the local file system (e.g., file system storage 120).
[0074] Accordingly, note that, depending on the incoming write operation arguments (e.g., offset and length of data to be written), the operations used to service the write request may change e.g., whether the length of data in the incoming write request can be directly written to file blocks available in disks of the local file system without read and / or merge operations, or whether first read and / or merge operation may occur and then the length of data in the incoming write request written to file blocks.
[0075] Accordingly, responsive to a write I / O request, systems described herein may determine if the write is aligned or unaligned. If aligned, then the length of data to be written in the write I / O request may be directly written to the disks of the local file system. Note that, in examples of an aligned write, it may not make a difference whether the data of the block(s) to be written was on the disk or not available on the disk at the time the write request was received, because in the example of a block-aligned write, the block-aligned write data may be written without a read and / or combination with the previous data of the block.
[0076] Examples of systems described herein include tiered storage, such as tiered storage 104 of FIG. 1. In some examples, tiered storage may be implemented using multi-part upload. For example, some cloud storage solutions may utilize multi-part upload. In multi-part upload tiered storage, when the data is tiered and / or uploaded, the file may be broken down into multiple parts (e.g., tiering units) and then each tiering unit may be uploaded separately to the tiered storage. The tiering units may be and stitched together in the tiered storage after all the parts are uploaded. To maintain data integrity, a checksum may be maintained in tiering metadata. So, in examples utilizing multi-part upload in tiered storage, part size (e.g., tiering unit) considerations may be used. Consider an example of a file size of 100 MB and a part size (e.g., tiering unit)of 10 MB, then in this case there will be 10 parts (e.g., tiering units) each of size 10 MB which would be uploaded one by one. In another example, if a file size to be uploaded and / or tiered is 11 MB, then in this example one part of 10 MB may be uploaded and then the second part of 1 MB would be uploaded.
[0077] In examples of servicing non-block aligned writes, example systems may determine which data needs to be recalled from the tiered storage. For example, if the write is happening to the file and the range is not available online e.g., the range is not available on the disk of the local file system, then the data may be recalled from the tiered storage because a read may be needed in order to perform the unaligned write. So, in examples of unaligned writes, a read may be initiated from the tiered storage. Note, in some examples, the read may be a read of an amount of data equal to or larger than a tiering unit - e.g., similar to a file system with minimum read and write sizes (e.g., cannot read less than 64KB or write less than 64KB). For example, reads may not be performed at less than part size and / or part boundaries because it may be advantageous to maintain a checksum for every part size. Therefore, when a read is initiated to the tiered storage (e.g., the cloud), a tiering unit (e.g., part size) may be read which contains the block and this read will bring a part size (e.g., 10MB) of data from the tiered storage to the local file system. So, the read may not only bring back the data impacted by the write request, or only the file system part containing the block impacted by the write request, but may bring back the complete 10MB tiering unit (e.g., part) from the tiered storage. This is because the full part size, tiering unit, such as 10 MB, should be read for checksum verification. Also note here that when the read to the cloud is initiated, the operation of reading data from the cloud may not be done by the local file system, but this data read operation from the cloud may be offloaded to a tiering engine (e.g., tiering engine 102), a component responsible for interaction with the tiered storage (e.g., tiered storage 104) and bringing the data from the tiered storage to the local file system. Once the data from the tiered storage is available on the local file system, the file blocks may be read and / or merged, and then data from the write operation request is written to some of the blocks of the part that is recalled from the tiered storage. This may complete the write operation.
[0078] Systems described herein may respond to truncate operations. Consider an example where there is a file of size 1GB in the local file system and this file is not tiered. While tiering, an object corresponding to the file may be created and this object may be similar in terms of the file data e.g., the object may have the same data bytes as the file and the size of the object may also be the same as that of the file.
[0079] There may be a request to the local file system to perform a truncate operation on this file e.g., either to truncate up (say truncate up to 2GB) or truncate down (say truncate down to 500MB). During the truncate up operation - as an example, to truncate from 1 GB to 2GB - when the file is read sequentially from 0 to 1GB, the system would get valid data, but after 1 GB until 2GB, the system would get zeroes or other placeholder values.
[0080] Likewise, during the truncate down operation say to truncate from 1GB to 500MB, then one would be able to read from 0 to 500MB. From 500MB to 1GB, those file blocks would have been released and / or freed. In such an example, the addressable object size may be set to 500M. Accordingly, tiered storage may not be accessed for data beyond 500M. This may be the case even if later the file is truncated up to 2 GB, the range of 500M-2G will be considered local to the file system. Now when this file is tiered, only first 64KiB remain on-prem / local filesystem, the remaining data would be moved to the tiered storage.
[0081] So, in examples of this use case to track the amount of data which is still valid and is stored in the tiered storage, there may be an attribute in the metadata called “addressable object size”. Whenever a file is truncated, the “addressable object size” may be updated to a new size from its previous size. The addressable object size may be stored, for example, in range map 108 and / or range map cache 126 of FIG. 1, or in other file system metadata in other examples.
[0082] As described herein, in some examples, files may be re-tiered when over a threshold percentage or amount of data of the file is stored in local storage. In some examples, files may be re-tiered based on an amount of free space in the file system storage (e.g., when the free space in file system storage is less than a threshold). The amount of the file stored in the file system storage may increase due to write request methods described herein. Consider an example including a file of 1Gb which is moved to the tiered storage. Some blocks of this file may be online (e.g., available on the local file system) and some blocks in the tiered storage because some of the blocks of this file might have been recalled from the tiered storage to the local file system to perform write for any incoming writes as discussed in the above file write operation.
[0083] Recall it may be advantageous to save storage space on tiered storage (e.g., cloud storage) and to reduce cost for the client by tiering data to tiered storage. Accordingly, after writes have already happened e.g., the local disks of the file system have started becoming full, increasing the cost for the client. Then at some point in time, a tiering policy described herein may determine to re-tier one or more files back to the cloud to save the space on the local filesystem. The trigger to re-tier may depend on which how much data of particular files is online or available in the local file system and which all blocks are offline or in the tiered storage. When the decision is triggered to re-tier, the system may initiate re-tier first for the remaining range of file blocks are recalled to the local file system and then the whole file is present, re-tier the complete file to the tiered storage. In some examples, the first 64KiB block or other portion of the file may remain on the local file system as a pointer to the file in the cloud tiered storage (e.g., “stub”). In some examples, the tiering policy may initiate tiering of files based on an amount of free space in the file system storage. Files may be prioritized for tiering based on what portion and / or size of the file is stored in the file system storage. Files having larger portions and / or larger percentages of the file stored at the file system storage may be prioritized for re-tiering. Note that re-tiering may include recalling the file from the tiered storage, combining the recalled file with portions of the file stored locally (e.g., in file system storage), and then re-tiering the complete file. Recall that a variety of write data and / or updated blocks may be stored locally. It may be beneficial to recall the complete file, generate an updated complete file at the local file system, and the re-tier the complete file. This may reduce errors in tiering partial files and / or only re-tiering updated blocks.
[0084] Some example systems described herein may not split the file into smaller chunks / blocks and then re-tier each blocks separately. For example, the blocks which have been updated and stored on the file system storage 120 may not be tiered in a process separate from tiering the entire file. Instead, systems may re-tier the file as a whole (e.g., the complete file). During re-tiering, the tiered file may be broken into portions the size of a tiering unit (e.g., 10MB) for data integrity, but nonetheless the file is referred to as being tiered as a whole (e.g., complete file). It may not be necessary, for example, to track multiple separated locations in the tiered storage where different blocks of the file reside. In case of re-tier, systems described herein recall the remaining data from the cloud for that file and then the complete file, as a whole, is tiered back to the tiered storage.
[0085] Examples described herein have accordingly described the use of a range map and a cached range map, such as range map 108 and range map cache 126 of FIG. 1 to determine a need to recall any portion of a file, and when to write data through the file system (e.g., to file system storage 120). In such examples, generally any tiering unit (e.g., 10MB) of a file may be stored at the file system storage 120 (e.g., online) or in tiered storage 104 (e.g., offline). One bit per tiering unit in some examples may be used to indicate if the unit is online (with file system storage 120) or offline (with tiered storage 104).
[0086] Consider an example where a client wants to write 1M data at offset 3M. The entire part (e.g., 0 to 10M) may be be fetched from tiered storage 104. Only when the complete part is written to file system storage 120, any write on that portion of the file will be allowed in some examples.
[0087] The range map 108a and / or range map cache 126 may be accessed by tiering engine 102 and also by file system volume manager 112. When a read and / or write operation is received file system volume manager 112 may check this bitmap to decide if it should honor the read and / or write or give an error or other indication (e.g., eNodata). In some examples, the tiering engine 102 may populate the bitmap when it recalls a specific tiering unit. For example, a bitmap in range map 108 and / or range map cache 126 may be updated by tiering engine 102. The tiering engine 102 also may access the bitmap in case a partially tiered file is recalled. It will only recall the parts which are tiered in some examples.
[0088] This bitmap may be saved for access by file system volume manager 112, such as in range map 108. This allows snapshots of the file system volume manager 112 to get a correct state of the file. In some examples, a different granularity may be used for the tiering unit, such as 1M . This may increase the bitmap size.
[0089] For a write operation, the common tiering library 106 may write to file system volume manager 112. The file system volume manager 112 may return an error or other indication if the implicated blocks are not on file system storage 120. The common tiering library 106 may send the write offset and size to tiering engine 102. The tiering engine 102 may start a recall of the implicated tiering unit(s) and return an indication to common tiering library 106. The common tiering library 106 may continue to provide a wait indication to file system protocol(s) 110 in some examples. Once the tiering unit(s) are recalled, the tiering engine 102 may set the relevant bit(s) in the bitmap to indicate certain blocks and / or tiering units are recalled. The common common tiering library 106 and / or file system protocol(s) 110 may stop waiting and a next write from file system protocol(s) 110 and / or common tiering library 106 may be serviced by the file system volume manager 112.
[0090] In some examples, any portion of the file after the original file size will be considered as online (e.g., stored in file system storage 120) and file system volume manager 112 may perform read / write directly. In some examples, a bitmap may be used to implement the range map 108, and the bitmap may be stored in file system storage 120.
[0091] In some examples, different structures than range map 108 and / or range map cache 126 may be used. In some examples, block pointer(s) maintained by file system volume manager 112 may be used to determine when data may be written to file system storage 120 and / or when blocks may be recalled. The file system volume manager 112 may use the presence of a block-pointer to decide if a specific block is online or offline.
[0092] To handle a write operation, when the block is tiered, and the write request is a block aligned write, the file system volume manager 112 may directly write to the block on the file system storage 120.
[0093] When the block is tiered, and the write request is not a block-aligned write, the common tiering library 106 may check the cache to determine whether the file is tiered. If it is tiered, the common tiering library 106 may access the range map 108 to determine whether the data implicated by the write is present locally for the tiered file. If not, the tiering engine 102 may then start recall of tiering unit(s) of data implicated by the write operation. Once the unit is recalled, file system volume manager 112 may service the write operation by writing the data to the file system storage 120.
[0094] Considering, writes, if the requested block is in the file system storage 120, the file system volume manager 112 may directly serve the read and / or write. If partial data is in the file system storage 120, the file system volume manager 112 may provide an indication for the client and / or file system protocol(s) 110 to wait while the data is recalled. Once all implicated blocks are recalled, the write operation can be requested again and the file system volume manager 112 may service the read and / or write. Any portion of the file after the original file size will be considered as online (e.g., in file system storage 120) and file system volume manager 112 can perform the read and / or write directly.
[0095] The system may consider that file system volume manager 112 has the latest data when it has the data. When the tiering engine 102 writes recalled data to file system volume manager 112, the file system volume manager 112 may check if any of the recalled blocks are already present. During recall, if a block is already present in file system storage 120, the file system volume manager 112 may skip the write for the block. The file system volume manager 112 may accordingly combine (e.g., merge) blocks from tiered storage 104 and file system storage 120 to rehydrate a recalled file and / or portion of a file. For example, write data may be combined with a portion of the file that was recalled to create an updated portion of the file. The updated portion of the file may be stored in the file system storage.
[0096] A read request may be received for a partially-recalled file. In some examples, a tiering unit (e.g., 50MB) may have only selected blocks overwritten by write data. Accordingly, some blocks are current on the file system storage 120 and some remain current on tiered storage 104. Accordingly, the file system volume manager 112 may not be able to service a read request for the entire tiering unit. In some examples, the system may toggle between reads from the file system volume manager 112 and tiering engine 102 to read the whole tiering unit - e.g., certain blocks may be read by file system volume manager 112 from file system storage 120 and certain blocks may e read from tiered storage 104 by tiering engine 102. In some examples, the tiering engine 102 may read the blocks of the tiering unit stored at file system storage 120 and combine (e.g., merge) the blocks from the tiering unit with the blocks stored in tiered storage 104.
[0097] In some examples, the range map cache 126 may be used. Entities accessing file system volume manager 112 may utilize common tiering library 106. The range map 108 provided by file system volume manager 112 may be valid until any write operations happen on a file. The file system protocol(s) 110 and / or common tiering library 106 may manage synchronization and may block operations when a read is happening based on the range map cache 126. After a write operation, the range map cache 126 may be invalidated and the common tiering library 106 and / or file system protocol(s) 110 may fetch an updated map for a next operation.
[0098] The system may implement a process to read a tiered or partially tiered file. The common tiering library 106 may determine whether the file is tiered based on the range map cache 126. If the data is in file system storage 120, the data may be read from file system volume manager 112. If the data is not at file system storage 120, the data may be read from tiering engine 102. If some blocks are available in file system storage 120, the partial data may be read from file system storage 120 and the remaining data from tiering engine 102. The data read from tiering engine 102 may be combined (e.g., merged) with that read from file system storage 120 to provide the read data to the client.
[0099] For write operations, the common tiering library 106 may identify that the write request is for a tiered file based on the range map cache 126. If the write range is available in file system storage 120, the common tiering library 106 may write directly to file system volume manager 112. If the write range is not available and / or partially available, the write behavior may depend on whether the write is block aligned. For a block aligned write, the common tiering library 106 may write directly to file system volume manager 112 and update the range map 108. If the write is not block aligned, the common tiering library 106 may request the tiering engine 102 to recall the blocks associated with the write request. Once the blocks associated with the write request are recalled (which may be through recall of one or more entire tiering units), the common tiering library 106 can write the write data directly to the file system storage 120. The write may modify recalled blocks in the file system storage 120.
[0100] From the foregoing it will be appreciated that, although specific embodiments have been described herein for purposes of illustration, various modifications may be made while remaining with the scope of the claimed technology.
[0101] Examples described herein may refer to various components as “coupled” or signals as being “provided to” or “received from” certain components. It is to be understood that in some examples the components are directly coupled one to another, while in other examples the components are coupled with intervening components disposed between them. Similarly, signal may be provided directly to and / or received directly from the recited components without intervening components, but also may be provided to and / or received from the certain components through intervening components.
Claims
1. At least one non-transitory computer readable media encoded with instructions which, when executed, cause a system to perform operations comprising:receive, at a file system, a write request for a file, the file having been tiered to tiered storage, the write request including a start location and write data;write, to file system storage, different than the tiered storage, the write data; andresponsive to an amount of the file stored at the file system storage, initiating a re-tiering operation for the complete file.
2. The non-transitory computer readable media of claim 1, wherein said write, to the file system storage, comprises write the write data directly to the file system responsive to a determination that the write request is for an aligned write.
3. The non-transitory computer readable media of claim 1, wherein said write, to the file system storage, comprises recall at least a portion of the file associated with the start location, responsive to a determination that the write request is for a non-aligned write, combine the write data with the portion of the file to create an updated portion of the file, and write the updated portion of the file to the file system storage.
4. The non-transitory computer readable media of claim 3, wherein the operations further comprise determine whether the write request is aligned or non-aligned to file block boundaries.
5. The non-transitory computer readable media of claim 1, wherein said receive occurs at a common layer of a computing system, the common layer configured to communicate with any of multiple file system protocols.
6. The non-transitory computer readable media of claim 1, wherein the file system storage is configured to store an indication of an amount of the file stored at the file system storage.
7. The non-transitory computer readable media of claim 1, wherein the re-tiering operation comprises rehydrating the file at the file system storage from the tiered storage to provide a rehydrated file at the file system storage, modifying the rehydrated file with the write data stored at the file system storage to provide a modified rehydrated file, and tiering the modified rehydrated file to the tiered storage.
8. The non-transitory computer readable media of claim 1, wherein said executable instructions for initiating a re-tiering operation are separate from executable instructions for an operating system kernel.
9. The non-transitory computer readable media of claim 1, wherein said initiating a re-tiering operation for the file is responsive to an indication more than a threshold amount of storage at the file system storage is used, and the file is prioritized for the re-tiering operation based on an amount of the write data on the file system storage.
10. A system comprising:a computing node;file system storage coupled to the computing node;a range map in communication with the computing node, the range map configured to store an indication of tier status for files in a file system, and ranges of the files in the file system stored in the file system storage; andtiered storage in communication with the computing node;wherein the computing node includes at least one processor and at least one computer readable medium encoded with executable instructions which, when executed by the at least one processor cause the computing node to perform operations comprising:access the range map responsive to receipt of a write request for a file to determine whether the file is tiered;responsive to a determination the file is tiered, determine whether the write request is a block aligned write or a non-block aligned write;responsive to the write request being for a non-block aligned write, recall a portion of the file from the tiered storage; andre-tier the file when a tiering policy of the computing node prioritizes the file for re-tiering.
11. The system of claim 10, wherein the tiered storage comprises block storage.
12. The system of claim 10, wherein the operations further comprise, responsive to a determination the write request is a block-aligned write, write the write data to the file system storage.
13. The system of claim 10, wherein the re-tier the file occurs when available space on the file system storage is less than a threshold specified by the tiering policy.
14. The system of claim 10, wherein the re-tier the file occurs based on an amount of the file stored on the file system storage.
15. The system of claim 10, wherein the operations further comprise derive the range map from file block pointers.
16. The system of claim 10, wherein the re-tier comprises recall the file from the tiered storage, combine the recalled file with write data stored at the file system storage to generate an updated file, and tier the updated file to the tiered storage.
17. A method comprising:store write data associated with a tiered file in file system storage;execute a tiering policy based at least in part on free space in the file system storage;responsive to the tiering policy:recall the tiered file;combine the tiered file with the write data in the file system storage to provide an updated file; andtier the updated file to tiered storage.
18. The method of claim 17, wherein a sub of the file is stored on the file system storage, and remaining data of the file is stored in tiered storage.
19. The method of claim 17, further comprising:update a range map to indicate a portion of the file associated with the write data is stored at the file system storage.
20. The method of claim 19, further comprising:servicing a read request for the portion of the file from the file system storage.
21. The method of claim 17, wherein said tier the file to tiered storage is based on a percentage of the file stored at the file system storage.
22. The method of claim 17, further comprising determine whether a write request including the write data is a block aligned write or a non-block aligned write.
23. The method of claim 22, further comprising, responsive to the write request being a block aligned write, writing the write data to the file system storage.
24. The method of claim 22, further comprising, responsive to the write request being a non-block aligned write, recalling a portion of the file from tiered storage, combining the portion of the file with the write data, and storing the combination in the file system storage.
