Data can be stored in various types of storage devices, including magnetic storage devices (such as magnetic disk drives), optical storage devices, integrated circuit storage devices, and so forth. Data stored in storage devices includes user data and metadata. The term “user data” refers to user-created data, program instructions, data associated with applications or other software, and the like. “Metadata” is information that describes the stored user data. Examples of metadata include file names, information relating to ownership and access rights, last modified date, file size, and other information relating to the structure, content, and attributes of files containing user data.
One type of metadata is metadata maintained by a file system. A file system is a mechanism for storing and organizing user data to allow software in a computer to easily find and access the user data (e.g., user data stored in files). File systems are typically associated with operating systems, such as Unix, DOS, Microsoft WINDOWS®, Mac OS, and so forth. A computer can be provided with one file system, or with multiple file systems.
As file system technology advances, new features are often added. To support new features of a file system, the structure or layout of the file system metadata is often changed, such as to add new information fields to the metadata to support the new features.
Also, over time, newly developed software applications may outgrow limits on file sizes imposed by file system metadata. For example, a file system may have been created to accommodate a certain maximum file size. To allow an increase in the maximum file size, the number of bits of information fields relating to file size in the file system metadata may have to be increased, which also changes the metadata structure or layout.
As a new file system metadata layout becomes available, a user may wish to transition to the new layout to use new features or capabilities. Typically, to convert metadata layout, a file system has to be first unmounted (taken offline). A conversion utility is then run against the unmounted file system to change the original file system metadata layout to the new file system metadata layout. Depending on the size of the file system, the time that a file system remains offline during metadata layout conversion can be lengthy. While the file system is offline, software (e.g., application software) is not able to access user data managed by the offline file system. If the offline file system is part of a server computer in a networked environment, for example, then multiple network users would be unable to access data maintained by the offline file system.
Another technique of migrating to a new file system metadata layout is by backing up user data associated with an existing file system, removing the original file system having an original metadata layout, creating a new file system having a new metadata layout, and restoring the user data from the backup. This metadata layout conversion technique also involves substantial downtime for user data associated with the file system since the file system is offline during the user data backup, original file system removal, new file system creation, and user data restoring procedures.
As depicted in
The storage medium 116 is able to store user data in one or plural volumes 118A, 118B. The term “user data” broadly refers to data that is associated with either a user, application, or other software in a computer system. Examples of user data include user files, software code, and data maintained by applications or other software.
Although two volumes 118A, 118B are depicted in
The file system metadata layout can change to support new features added to the file system, or to support larger file sizes, as examples. The file system metadata includes information fields that describe various characteristics of user data. The information fields in file system metadata having a first file system metadata layout are different from information fields in file system metadata having a second file system metadata layout. In accordance with some embodiments, the file system metadata layout (labeled “layout A” in
A “file system” refers to the mechanism used for storing and organizing user data on the storage medium 116. The file system implemented in the host system 100 of
The file system can be part of an operating system (not shown), such as a Unix operating system, WINDOWS® operating system, DOS, Mac OS, or other operating system. In other implementations, the file system can be separate from an operating system. Although only one file system is depicted in
To read or write user data stored in the storage subsystem 114, one or more software applications 103 issue read and write requests through the file system logic 102. The application(s) 103, file system logic 102, device driver 104, and other software in the host system 100 are executable on a central processing unit (CPU) 121, which is connected to memory 124.
The file system logic 102 has multi-volume capability, which allows the file system logic 102 to create multiple volumes 118A, 118B for storing user data. The multiple volumes are managed by a multi-volume manager 108 in the file system logic 102. The file system logic 102 also includes a volume add/remove module 110 for adding or removing volumes from the storage subsystem 114. Also, the file system logic 102 includes a user data migration module 112 to migrate user data from one volume to another volume for the purpose of changing file system metadata layout, as described in greater detail below. Note that the user data migration module 112 can perform user data migration for other purposes as well, such as file system defragmentation, load balancing, and so forth.
In one embodiment, the conversion mechanism to enable the efficient conversion of the file system metadata layout includes the volume add/remove module 110 and user data migration module 112 that are part of the file system logic 102. In other embodiments, the conversion mechanism can be implemented with modules outside the file system logic 102.
A user can access the host system 100 through a user station 106. Alternatively, the host system 100 itself can provide a user interface to allow access by a user. The user station 106 includes a volume add/remove utility 107 that enables a user at the user station 106 to send requests to the file system logic 102 for adding or removing volumes, such as for the purpose of converting file system metadata layout.
In accordance with some embodiments, changing file system metadata layout is accomplished by adding new volumes to the storage subsystem 114, and migrating user data from the original volumes to the new volumes. “Migrating” user data from a first volume to a second volume refers to copying or moving the user data from the first volume to the second volume. The new volumes are set up such that the file system metadata associated with the new volumes have a second file system metadata layout (layout B in
The creation of new volumes is illustrated in
In some implementations, migration of user data from volumes 118A, 118B to respective volumes 120A, 120B is initiated in response to a command from the user station 106 (or from another source) to delete the original volumes 118A, 118B. In response to a command to delete the original volumes 118A, 118B, the volume add/remove module 110 interacts with the user data migration module 112 to cause the migration of user data from the original volumes 118A, 118B to the new volumes 120A, 120B. The migration of user data is illustrated by arrows depicted in
Effectively, according to some embodiments of the invention, to convert file system metadata layout, user data is migrated from a first set of volume(s) to a second set of volume(s), where the first set of volume(s) is (are) associated with file system metadata having a first file system metadata layout, and the second set of volume(s) is (are) associated with file system metadata having a second file system metadata layout. In this manner, conversion of the file system metadata layout is accomplished while the file system remains available (online) for access by software in the host system 100 (e.g., the application(s) 103) or by external devices. In other words, during the conversion of the file system metadata layout, the file system (including file system logic 102 and file system metadata) does not have to be first unmounted (or otherwise taken offline) to perform the file system metadata layout conversion. This enables access of user data in the storage subsystem that is managed by the file system while the file system metadata layout conversion is proceeding. As noted above, in some implementations, the host system 100 and storage subsystem 114 can have multiple mounted file systems. Metadata layout conversion according to techniques described above can also be performed for each of the other file systems.
Next, the file system logic 102 receives (at 206) a command (or multiple commands) to remove the original volume(s) associated with the original file system metadata layout. In response to the command(s) to remove the original volume(s), the user data migration module 112 in the file system logic 102 migrates (at 208) user data from the original volume(s) to the new volume(s). After migration of the user data, the volume add/remove module 110 removes (at 210) the original volume(s), leaving the new volume(s) associated with the new file system metadata layout. During the time that the new volume(s) is (are) being added and the user data migration is occurring, the user data remains available to host system software (or external devices).
The flow diagram of
Instructions of software routines (including the modules 102, 103, 108, 110, 112 in
Data and instructions (of the software) are stored in respective storage devices, which are implemented as one or more machine-readable storage media. The storage media include different forms of memory including semiconductor memory devices such as dynamic or static random access memories (DRAMs or SRAMs), erasable and programmable read-only memories (EPROMs), electrically erasable and programmable read-only memories (EEPROMs) and flash memories; magnetic disks such as fixed, floppy and removable disks; other magnetic media including tape; and optical media such as compact disks (CDs) or digital video disks (DVDs).
In the foregoing description, numerous details are set forth to provide an understanding of the present invention. However, it will be understood by those skilled in the art that the present invention may be practiced without these details. While the invention has been disclosed with respect to a limited number of embodiments, those skilled in the art will appreciate numerous modifications and variations therefrom. It is intended that the appended claims cover such modifications and variations as fall within the true spirit and scope of the invention.