In the field of computer data storage, a pair of drives may be arranged as a primary drive and a secondary drive to facilitate mirroring data. Data written to the primary drive may also be written to the secondary drive as a precaution. Therefore, the drives may be said to be arranged as mirroring drives, where the primary is mirrored, and the secondary does the mirroring. Conventionally, mirroring drives have been maintained in a powered-up state so that writes intended for a primary, mirrored drive can be substantially simultaneously written to both the primary, mirrored drive and to a secondary, mirroring drive. Reads have conventionally been satisfied from the primary, mirrored drive. Both the primary, mirrored drive and the secondary, mirroring drive are maintained in the powered-up state to facilitate writing and to minimize delays associated with failover processing. This may waste power.
The accompanying drawings illustrate various example embodiments of various aspects of the invention. It will be appreciated that the illustrated element boundaries (e.g., boxes, groups of boxes, or other shapes) in the figures represent one example of the boundaries. One of ordinary skill in the art will appreciate that in some examples one element may be designed as multiple elements or that multiple elements may be designed as one element. In some examples, an element shown as an internal component of another element may be implemented as an external component and vice versa.
The following includes definitions of selected terms employed herein. The definitions include various examples and/or forms of components that fall within the scope of a term and that may be used for implementation. The examples are not intended to be limiting. Both singular and plural forms of terms may be within the definitions.
References to “one embodiment”, “an embodiment”, “one example”, “an example”, and so on, indicate that the embodiment(s) or example(s) so described may include a particular feature, structure, characteristic, property, element, or limitation, but that not every embodiment or example necessarily includes that particular feature, structure, element or limitation. Furthermore, repeated use of the phrase “in one embodiment” does not necessarily refer to the same embodiment.
ASIC: application specific integrated circuit.
CD: compact disk.
CD-R: CD recordable.
CD-RW: CD rewriteable.
DVD: digital versatile disk and/or digital video disk.
HTTP: hypertext transfer protocol.
LAN: local area network.
PCI: peripheral component interconnect.
PCIE: PCI express.
RAM: random access memory.
DRAM: dynamic RAM.
SRAM: static RAM.
ROM: read only memory.
PROM: programmable ROM.
EPROM: erasable PROM.
EEPROM: electrically erasable PROM.
USB: universal serial bus.
WAN: wide area network.
“Logic”, as used herein, includes but is not limited to hardware, firmware, software in execution on a machine, and/or combinations of each to perform a function(s) or an action(s), and/or to cause a function or action from another logic, method, and/or system. Logic may include a software controlled microprocessor, a discrete logic (e.g., ASIC), an analog circuit, a digital circuit, a programmed logic device, a memory device containing instructions, and so on. Logic may include one or more gates, combinations of gates, or other circuit components. Where multiple logical logics are described, it may be possible to incorporate the multiple logical logics into one physical logic. Similarly, where a single logical logic is described, it may be possible to distribute that single logical logic between multiple physical logics.
Example apparatus and methods facilitate saving power by providing mirroring write data to a non-volatile memory while a mirroring drive is in a powered-down state. One embodiment includes an apparatus. The apparatus includes control logic. The control logic is configured to be operatively coupled to a non-volatile memory and to a plurality of drives organized in a mirroring configuration. Being operatively coupled includes being able to send and/or receive electrical signals including data and control signals. The mirroring configuration includes a primary drive and a secondary drive. The control logic functions to selectively provide mirroring write data intended to be written to the secondary drive to the non-volatile memory when the secondary drive is in a powered-down state. This facilitates keeping the secondary drive in a powered-down state, which in turn facilitates saving power. Data can be written to the secondary drive when it enters a powered-up state. In one embodiment, the write may include a write operation that requests certain data to be written to a designated location.
Another embodiment describes a method. The method includes interfacing with a pair of drives that are operating as a pair of mirroring drives. To save power, one member of the pair of drives is controlled to be in a powered-up, mirrored state and one member of the pair of drives is controlled to be in a powered-down, mirroring state. Since one drive is powered-up, writes intended for that drive can be sent to that drive. Since another drive is powered-down, writes intended for the powered-down drive are not sent to that drive. Instead, writes intended for the drive in the powered-down, mirroring state are provided to a non-volatile memory. Data can be written from the non-volatile memory to the drive in the powered-down mirroring state when it enters a powered-up mirroring state.
In one embodiment, the control logic 100 controls the primary drive 110 to be in a mirrored, powered-up, state. The control logic 100 also functions to control the secondary drive 130 to be in a mirroring, powered-down, state. Having the secondary drive 130 in a powered-down state saves power. However, having the secondary drive 130 in a powered-down state affects the ability of the secondary drive 130 to mirror writes provided to the primary drive 110. Therefore, control logic 100 can send data intended for the secondary drive 130 to the non-volatile memory 120 when the secondary drive 130 is in the powered-down state. Thus, the control logic 100 functions to cause a write intended for the primary drive 110 to be provided to the primary drive 110 when the primary drive 110 is in the powered-up, mirrored state and causes mirroring write data intended for the secondary drive 130 to be provided to the non-volatile memory 120 when the secondary drive 130 is in a powered-down, mirroring state.
In
The non-volatile memory 120 may have a finite size. Therefore the control logic 100 may decide to write data from the non-volatile memory 120 to the secondary drive 130. The decision may be a function of time (e.g., periodically), a function of capacity (e.g., how full the non-volatile memory is), a function of a user input, and of other factors. The control logic 100 may selectively power up the secondary drive 130 to place the secondary drive 130 in a powered-up state. When the secondary drive 130 is in a powered-up state, the control logic 100 may then control the non-volatile memory 120 to selectively update the secondary drive 130 with data previously written to the non-volatile memory 120. After the data is written, two things may occur. The control logic 100 may selectively power down the secondary drive 130. The control logic 100 may also delete data from the non-volatile memory 120. Deleting data from the non-volatile memory 120 may be a logical or physical action. Thus, the control logic 100 may mark data in the non-volatile memory 120 as deleted, may over-write data in the non-volatile memory 120, may physically delete data in the non-volatile memory 120, and may take other actions. Control logic 100 may also update metadata in memory or in the non-volatile memory 120 to indicate that the data that has been written to the mirroring disk is no longer needed and that its space may be reused.
In one embodiment, control logic 100 may use non-volatile memory 120 as a sort of cache memory. In this embodiment, reads may be directed to the primary drive 110, but some reads could be directed to the non-volatile memory 120.
While the control logic 200 is described as being coupled to the non-volatile memory 220, the primary drive 210, and the secondary drive 230, in one embodiment an apparatus may include the control logic 200 and the non-volatile memory 220. The non-volatile memory 220 may be, for example, a non-volatile random access memory (NVRAM) a FLASH-based disk drive, a fiber channel disk drive, a battery-backed up memory, a small computer system interface (SCSI) drive, and other memories. In one embodiment, an apparatus may include the control logic 200, the primary drive 210, the non-volatile memory 220, and the secondary drive 230. One skilled in the art will appreciate that there may be other configurations.
In one embodiment, the non-volatile memory 220 functions to store data intended for the secondary drive 230 as a collection arranged as a time sequential list of updates. An entry in the time sequential list of updates may take different forms and include different information. In one embodiment, an entry in the time sequential list of updates may include an identifier of a drive affected by a mirroring write, an identifier of a sector affected by the mirroring write, and write data intended for the mirroring drive. In one embodiment, an entry in the time sequential list of updates is arranged to facilitate maintaining write coherency. In another embodiment, the non-volatile memory 220 stores a linked list of structures relating drive cylinder updates to a cylinder hash table. An entry in the linked list of structures is arranged to facilitate maintaining write coherency.
Some portions of the detailed descriptions that follow are presented in terms of algorithms and symbolic representations of operations on data bits within a memory. These algorithmic descriptions and representations are used by those skilled in the art to convey the substance of their work to others. An algorithm, here and generally, is conceived to be a sequence of operations that produce a result. The operations may include physical manipulations of physical quantities. Usually, though not necessarily, the physical quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated in a logic, and so on.
It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, and so on. It should be borne in mind, however, that these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise, it is appreciated that throughout the description, terms including processing, computing, determining, and so on, refer to actions and processes of a computer system, logic, processor, or similar electronic device that manipulates and transforms data represented as physical (electronic) quantities.
Example methods may be better appreciated with reference to flow diagrams. It is to be appreciated that the methodologies are not limited by the order of the blocks, as some blocks can occur in different orders and/or concurrently with other blocks from that shown and described. Blocks may be combined or separated into multiple components. Furthermore, additional and/or alternative methodologies can employ additional, not illustrated blocks.
Method 400 includes, at 420, controlling a write intended for the pair of drives to be provided to the drive in the powered-up, mirrored state. However, method 400 also includes, at 430, controlling the write intended for the drive in the powered-down, mirroring state to be provided to a non-volatile memory instead of to the drive in the powered-down, mirroring state. The non-volatile memory consumes less energy than a drive in a powered-up state and therefore there is a net savings of power.
Method 400 includes controlling the write intended for the drive in the powered-down, mirroring state to be provided to the non-volatile memory in a manner that maintains write coherency. This may include, for example, writing a time sequential list of updates to the non-volatile memory, writing an identifier of an affected drive to the non-volatile memory, writing an identifier of an affected sector to the non-volatile memory, writing data intended for the drive in the powered-down, mirroring state to the non-volatile memory, and manipulating a linked list structure on the non-volatile memory. A member of the linked list structure may relate cylinder updates and a cylinder hash table. Since write coherency is maintained, in one embodiment the non-volatile memory may be used to satisfy reads.
It may be desirable to control the amount of time that drives spend in powered-up and powered-down states. For example, it may be desirable to balance wear between drives, to ensure that a drive is spun up at least once per period of time, to switch drives based on a user input, and so on. Therefore, in one embodiment, method 500 may include selectively reversing the roles of the pair of mirroring disk drives.
While
In one example, a method may be implemented as computer executable instructions. Thus, in one example, a computer-readable medium may store computer executable instructions that if executed by a machine (e.g., processor) cause the machine to perform method 400, method 500, and equivalents. “Computer-readable medium”, as used herein, refers to a medium that stores signals, instructions and/or data. A computer-readable medium may take forms, including, but not limited to, non-volatile media, and volatile media. Non-volatile media may include, for example, optical disks, magnetic disks, and so on. Volatile media may include, for example, semiconductor memories, dynamic memory, and so on. Common forms of a computer-readable medium may include, but are not limited to, a floppy disk, a flexible disk, a hard disk, a magnetic tape, other magnetic medium, an ASIC, a CD, other optical medium, a RAM, a ROM, a memory chip or card, a memory stick, and other media from which a computer, a processor or other electronic device can read.
Logic 630 may provide means (e.g., hardware, software, firmware) for servicing reads from a member of a set of mirroring drives that is in a powered-up state. The means may be implemented, for example, as an ASIC. The means may also be implemented as computer executable instructions that are presented to computer 600 as data 616 that are temporarily stored in memory 604 and then executed by processor 602. Logic 630 may also provide means (e.g., hardware, software, firmware) for periodically updating a member of the set of mirroring drives that is in the powered-down state with data from the non-volatile memory.
Generally describing an example configuration of the computer 600, the processor 602 may be a variety of various processors including dual microprocessor and other multi-processor architectures. A memory 604 may include volatile memory and/or non-volatile memory. A disk 606 may be operably connected to the computer 600 via, for example, an input/output interface (e.g., card, device) 618 and an input/output port 610. The disk 606 may be, for example, a magnetic disk drive, a solid state disk drive, and other types of drives. The memory 604 can store a process 614 and/or a data 616, for example. The disk 606 and/or the memory 604 can store an operating system that controls and allocates resources of the computer 600.
The bus 608 may be a single internal bus interconnect architecture and/or other bus or mesh architectures. While a single bus is illustrated, it is to be appreciated that the computer 600 may communicate with various devices, logics, and peripherals using other busses (e.g., PCIE, 1394, USB, Ethernet, Hypertransport). The bus 608 can be types including, for example, a memory bus, a memory controller, a peripheral bus, an external bus, a crossbar switch, and/or a local bus.
The computer 600 may interact with input/output devices via the i/o interfaces 618 and the input/output ports 610. Input/output devices may be, for example, a keyboard, a pointing and selection device, the disk 606, and the network devices 620. The input/output ports 610 may include, for example, serial ports, parallel ports, and USB ports.
The computer 600 can operate in a network environment and thus may be connected to the network devices 620. Through the network devices 620, the computer 600 may interact with a network. Through the network, the computer 600 may be logically connected to remote computers. Networks with which the computer 600 may interact include, but are not limited to, a LAN, a WAN, and other networks.
To the extent that the term “includes” or “including” is employed in the detailed description or the claims, it is intended to be inclusive in a manner similar to the term “comprising” as that term is interpreted when employed as a transitional word in a claim.
To the extent that the term “or” is employed in the detailed description or claims (e.g., A or B) it is intended to mean “A or B or both”. When the applicants intend to indicate “only A or B but not both” then the term “only A or B but not both” will be employed. Thus, use of the term “or” herein is the inclusive, and not the exclusive use. See, Bryan A. Garner, A Dictionary of Modern Legal Usage 624 (2d. Ed. 1995).
To the extent that the phrase “one or more of, A, B, and C” is employed herein, (e.g., a data store configured to store one or more of, A, B, and C) it is intended to convey the set of possibilities A, B, C, AB, AC, BC, and/or ABC (e.g., the data store may store only A, only B, only C, A&B, A&C, B&C, and/or A&B&C). It is not intended to require one of A, one of B, and one of C. When the applicants intend to indicate “at least one of A, at least one of B, and at least one of C”, then the phrasing “at least one of A, at least one of B, and at least one of C” will be employed.