Snapshot deletion in a distributed storage system
First Claim
1. A method comprising:
- storing, by a storage manager computer, a hierarchy of snapshots S(i), i=1 to N, N being a number of snapshots, for a storage volume;
receiving, by the storage manager computer, an instruction to delete a snapshot S(j) in the snapshot;
updating, by the storage manager computer, the hierarchy to indicate that snapshot S(j) is deleted while retaining reference to S(j) in the hierarchy; and
transmitting, to a storage node, an instruction to delete the snapshot S(j);
(a) in response to the instruction to delete the snapshot S(j), mapping segments of a storage device assigned to snapshot S(j) to snapshot S(j+1) in a segment map stored in a memory of the storage node without updating a copy of the segment map stored in the storage device;
(b) detecting, by the storage node, restarting of the storage node;
in response to (b);
loading, by the storage node, the segment map from the storage device into the memory of the storage node;
requesting, by the storage node, the hierarchy from the storage manager computer;
determining (c) that the snapshot S(j) is indicated as deleted in the hierarchy; and
in response to determining (c), again performing (a).
1 Assignment
0 Petitions
Accused Products
Abstract
A new snapshot of a storage volume is created by instructing computing nodes to suppress write requests. Once pending write requests from the computing nodes are completed, storage nodes create a new snapshot for the storage volume by allocating a new segment to the new snapshot and finalizes and performs garbage collection with respect to segments allocated to the previous snapshot. The snapshots may be represented by a storage manager in a hierarchy. Deleted snapshots may be flagged as such in the hierarchy and deletion may be implemented only in memory on a storage node, which is then restored from the hierarchy in the event of a crash. A snapshot is removed from the hierarchy when all segments previously are freed by garbage collection. A hybrid storage node may perform both computing and storage services. Data may be written with tags indicating encoding protocols used to encode the data.
95 Citations
16 Claims
-
1. A method comprising:
-
storing, by a storage manager computer, a hierarchy of snapshots S(i), i=1 to N, N being a number of snapshots, for a storage volume; receiving, by the storage manager computer, an instruction to delete a snapshot S(j) in the snapshot; updating, by the storage manager computer, the hierarchy to indicate that snapshot S(j) is deleted while retaining reference to S(j) in the hierarchy; and transmitting, to a storage node, an instruction to delete the snapshot S(j); (a) in response to the instruction to delete the snapshot S(j), mapping segments of a storage device assigned to snapshot S(j) to snapshot S(j+1) in a segment map stored in a memory of the storage node without updating a copy of the segment map stored in the storage device; (b) detecting, by the storage node, restarting of the storage node; in response to (b); loading, by the storage node, the segment map from the storage device into the memory of the storage node; requesting, by the storage node, the hierarchy from the storage manager computer; determining (c) that the snapshot S(j) is indicated as deleted in the hierarchy; and in response to determining (c), again performing (a). - View Dependent Claims (2)
-
-
3. A method comprising:
-
storing, by a storage manager computer, a hierarchy of snapshots S(i), i=1 to N, N being a number of snapshots, for a storage volume; receiving, by the storage manager computer, an instruction to delete a snapshot S(j) in the snapshot; updating, by the storage manager computer, the hierarchy to indicate that snapshot S(j) is deleted while retaining reference to S(j) in the hierarchy; and transmitting, to a storage node, an instruction to delete the snapshot S(j); (a) in response to the instruction to delete the snapshot S(j), mapping segments of a storage device assigned to snapshot S(j) to snapshot S(j+1) in a segment map stored in a memory of the storage node without updating a copy of the segment map stored in the storage device; performing, by the storage node, garbage collection with respect to snapshot S(j+1); determining, by the storage node that (b) all segments of the storage device assigned to snapshot S(j) in the copy of the segment map stored in the storage device have been freed as a result of performing the garbage collection; in response to determining (b), transmitting, by the storage node, a notification to the storage manager computer; and in response to the notification, deleting, by the storage manager, the reference to snapshot S(j) in the hierarchy prior to receiving the instruction to delete the snapshot S(j); receiving, by the storage node, a first write instruction referencing snapshot S(j), the snapshot S(j) being a current snapshot; writing, by the storage node, first data from the first write instruction to a first segment mapped to the snapshot S(j) in a segment map; receiving, by the storage node, a new snapshot instruction; in response to the new snapshot instruction, mapping, by the storage node, a second segment to a snapshot S(j+1); receiving, by the storage node, subsequent to the new snapshot instruction, a second write instruction; and writing, by the storage node, second data from the second write instruction to the second segment. - View Dependent Claims (4, 5, 6, 7, 8)
-
-
9. A storage system comprising:
-
a plurality of storage nodes; and a storage manager computer programmed to; store a hierarchy of snapshots S(i), i=1 to N, N being a number of snapshots, for a storage volume; receive an instruction to delete a snapshot S(j) in the snapshot; update the hierarchy to indicate that snapshot S(j) is deleted while retaining reference to S(j) in the hierarchy; and transmit an instruction to delete the snapshot S(j) to one or more storage nodes of the plurality of storage nodes; wherein each storage node of the one or more storage nodes of the plurality of storage nodes are programmed to; (a) in response to the instruction to delete the snapshot S(j), map segments of a storage device assigned to snapshot S(j) to snapshot S(j+1) in a segment map stored in a memory of the each storage node without updating a copy of the segment map stored in the storage device; and wherein each storage node of the one or more storage nodes of the plurality of storage nodes are further programmed to; (b) detect restarting of the each storage node; in response to (b); load the segment map stored in the storage device into the memory; request the hierarchy from the storage manager computer; determine (c) that the snapshot S(j) is indicated as deleted in the hierarchy; and in response to determining (c), again perform (a). - View Dependent Claims (10)
-
-
11. A storage system comprising:
-
a plurality of storage nodes; and a storage manager computer programmed to; store a hierarchy of snapshots S(i), i=1 to N, N being a number of snapshots, for a storage volume; receive an instruction to delete a snapshot S(j) in the snapshot; update the hierarchy to indicate that snapshot S(j) is deleted while retaining reference to S(j) in the hierarchy; and transmit an instruction to delete the snapshot S(j) to one or more storage nodes of the plurality of storage nodes; wherein each storage node of the one or more storage nodes of the plurality of storage nodes are programmed to; (a) in response to the instruction to delete the snapshot S(j), map segments of a storage device assigned to snapshot S(j) to snapshot S(j+1) in a segment map stored in a memory of the each storage node without updating a copy of the segment map stored in the storage device; wherein each storage node of the one or more storage nodes of the plurality of storage nodes are further programmed to; perform garbage collection with respect to snapshot S(j+1); determine that (b) all segments of the storage device of the each storage node assigned to snapshot S(j) in the copy of the segment map stored in the storage device have been freed as a result of performing garbage collection; and in response to determining (b), transmit a notification to the storage manager computer that snapshot S(j) is no longer in use; and wherein the storage manager is further programmed to, in response to the notification, delete the reference to snapshot S(j) in the hierarchy; and wherein each storage node of the one or more storage nodes of the plurality of storage nodes are further programmed to; receive a first write instruction referencing snapshot S(j), the snapshot S(j) being a current snapshot; write first data from the first write instruction to a first segment mapped to the snapshot S(j) in a segment map; receive a new snapshot instruction; in response to the new snapshot instruction, map a second segment to a snapshot S(j+1); receive, subsequent to the new snapshot instruction, a second write instruction; and write second data from the second write instruction to the second segment. - View Dependent Claims (12, 13, 14, 15, 16)
-
Specification