IP Library Granted Patent US 9,933,945
Granted Patent B1
US 9,933,945 · App. 15/282,221 · Granted Apr 3, 2018

Efficiently shrinking a dynamically-sized volume

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,933,945
App. No.
15/282,221
Granted
Apr 3, 2018
Kind
B1
Abstract

Techniques for shrinking a filesystem backed by a volume identify slices in the volume to be evacuated in order to reach a target size, identify a target endpoint in the volume, and evacuate identified slices to available locations prior to the target endpoint. The same data is typically not moved from slice to slice multiple times.

Claims (41)

1. A method, performed by a data storage system, of shrinking a dynamically-sized volume that supports a host-accessible filesystem, the volume composed of a plurality of uniform-length extents of storage that are contiguously arranged within an address space of the volume, the volume having a length equal to a sum of lengths of the extents, the method comprising:

in response to a request to shrink the host-accessible filesystem to a target size, identifying a target endpoint of the volume, the target endpoint provided at an address in the address space of the volume that aligns with a boundary between two extents;

identifying a set of the extents for evacuation, the set of extents consisting of a number of extents that equals a number of extents disposed at addresses in the address space that exceed the address of the target endpoint;

for each of the set of extents, copying contents of allocated blocks within that extent to available space on one or more extents not identified for evacuation and located at addresses less than the address of the target endpoint; and

after copying the contents of allocated blocks from the identified extents, truncating the volume by releasing from the volume the extents disposed at addresses in the address space that exceed the address of the target endpoint.

2. The method of claim 1 wherein the set of extents identified for evacuation includes an evacuated extent occupying a range of addresses less than the address of the target endpoint, and wherein the method further comprises, prior to truncating the volume, copying contents of a particular extent located at an address range greater than the address of the target endpoint to the evacuated extent occupying the range of addresses less than the address of the target endpoint.

3. The method of claim 2 , wherein the particular extent stores metadata of the host-accessible filesystem, and wherein copying the contents of the particular extent preserves an order of the contents of the particular extent such that the contents as copied to the evacuated extent have the same order.

4. The method of claim 3 , wherein the host-accessible filesystem is built upon a sparse metavolume, the sparse metavolume having an address space, the address space of the sparse metavolume being larger than the address space of the volume, and wherein the method further comprises provisioning extents from the volume to the sparse metavolume to provide storage for supporting data and metadata of the host-accessible filesystem.

5. The method of claim 4 , wherein the data storage system maps the particular extent to a location in the sparse metavolume, and wherein the location of the particular extent within the sparse metavolume remains constant after truncating the volume.

6. The method of claim 4 wherein the data storage system realizes the volume with a volume-file, the volume-file stored as a file in a container filesystem and rendered as the volume, and wherein the volume-file is partitioned into the plurality of extents.

7. The method of claim 6 , wherein, upon truncating the volume, the method further comprises truncating the file that stores the volume-file in the container filesystem, such that the file becomes smaller.

8. The method of claim 2 wherein copying the contents of allocated blocks from each identified extent to available space on one or more extents not identified for evacuation includes modifying metadata of the host-accessible filesystem to point to locations of blocks to which the contents have been evacuated.

9. The method of claim 8 wherein, when copying the contents of the particular extent, the method further includes:

mirroring a set of incoming write requests directed to the particular extent to the evacuated extent occupying the range of addresses less than the address of the target endpoint, such that data specified in the incoming write requests are written to both of these extents; and

after copying the contents of the particular extent, redirecting later-arriving write requests directed to the particular extent to the previously evacuated extent.

10. The method of claim 1 wherein the method further comprises receiving the request to shrink the filesystem to the target size from a host accessing the filesystem.

11. The method of claim 1 wherein the method further comprises, in response to detecting that a current number of blocks in the volume exceeds a number of blocks allocated by the host-accessible filesystem by a pre-determined threshold:

calculating the target size as a size greater than the number of allocated blocks and less than the current number of blocks in the volume; and

providing the calculated target size in the request to shrink the filesystem.

12. The method of claim 1 wherein the method further comprises, after identifying the set of extents for evacuation, allocating blocks within the host-accessible filesystem only from regions that are not backed by any of the set of identified extents, thereby avoiding, until the volume has been truncated, block allocation from extents that have been identified for evacuation.

13. An apparatus comprising:

persistent storage devices providing data storage;

network interface circuitry configured to communicate with a host over a network; and

processing circuitry coupled to memory to form a control circuit constructed and arranged to shrink a dynamically-sized volume that supports a host-accessible filesystem, the volume composed of a plurality of uniform-length extents of storage that are contiguously arranged within an address space of the volume, the volume having a length equal to a sum of lengths of the extents, the control circuit shrinking the volume by:

in response to a request to shrink the host-accessible filesystem to a target size, identifying a target endpoint of the volume, the target endpoint provided at an address in the address space of the volume that aligns with a boundary between two extents;

identifying a set of the extents for evacuation, the set of extents consisting of a number of extents that equals a number of extents disposed at addresses in the address space that exceed the address of the target endpoint;

for each of the set of extents, copying contents of allocated blocks within that extent to available space on one or more extents not identified for evacuation and located at addresses less than the address of the target endpoint; and

after copying the contents of allocated blocks from the identified extents, truncating the volume by releasing from the volume the extents disposed at addresses in the address space that exceed the address of the target endpoint.

14. A computer program product comprising a non-transitory computer-readable storage medium storing a set of instructions, which, when executed by control circuitry of a data storage system, cause the control circuitry to perform a method of shrinking a dynamically-sized volume that supports a host-accessible filesystem, the volume composed of a plurality of uniform-length extents of storage that are contiguously arranged within an address space of the volume, the volume having a length equal to a sum of lengths of the extents, the method comprising:

in response to a request to shrink the host-accessible filesystem to a target size, identifying a target endpoint of the volume, the target endpoint provided at an address in the address space of the volume that aligns with a boundary between two extents;

identifying a set of the extents for evacuation, the set of extents consisting of a number of extents that equals a number of extents disposed at addresses in the address space that exceed the address of the target endpoint;

for each of the set of extents, copying contents of allocated blocks within that extent to available space on one or more extents not identified for evacuation and located at addresses less than the address of the target endpoint; and

after copying the contents of allocated blocks from the identified extents, truncating the volume by releasing from the volume the extents disposed at addresses in the address space that exceed the address of the target endpoint.

15. The computer program product of claim 14 wherein the set of extents identified for evacuation includes an evacuated extent occupying a range of addresses less than the address of the target endpoint, and wherein the method further comprises, prior to truncating the volume, copying contents of a particular extent located at an address range greater than the address of the target endpoint to the evacuated extent occupying the range of addresses less than the address of the target endpoint.

16. The computer program product of claim 15 , wherein the particular extent stores metadata of the host-accessible filesystem, and wherein copying the contents of the particular extent preserves an order of the contents of the particular extent such that the contents as copied to the evacuated extent have the same order.

17. The computer program product of claim 16 , wherein the host-accessible filesystem is built upon a sparse metavolume, the sparse metavolume having an address space, the address space of the sparse metavolume being larger than the address space of the volume, and wherein the method further comprises provisioning extents from the volume to the sparse metavolume to provide storage for supporting data and metadata of the host-accessible filesystem.

18. The computer program product of claim 14 wherein the method further comprises receiving the request to shrink the filesystem to the target size from a host accessing the filesystem.

19. The computer program product of claim 14 wherein the method further comprises, in response to detecting that a current number of blocks in the volume exceeds a number of blocks allocated by the host-accessible filesystem by a pre-determined threshold:

calculating the target size as a size greater than the number of allocated blocks and less than the current number of blocks in the volume; and

providing the calculated target size in the request to shrink the filesystem.

20. The computer program product of claim 14 wherein the method further comprises, after identifying the set of extents for evacuation, allocating blocks within the host-accessible filesystem only from regions that are not backed by any of the set of identified extents, thereby avoiding, until the volume has been truncated, block allocation from extents that have been identified for evacuation.

Assignments (8)
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (053546/0001) Recorded Jun 23, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL MARKETING L.P. (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO CREDANT TECHNOLOGIES, INC.); DELL INTERNATIONAL L.L.C.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; DELL MARKETING CORPORATION (SUCCESSOR-IN-INTEREST TO FORCE10 NETWORKS, INC. AND WYSE TECHNOLOGY L.L.C.); EMC IP HOLDING COMPANY LLC
Reel/Frame 071642/0001 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (046366/0014) Recorded May 20, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC
Reel/Frame 060450/0306 →
RELEASE OF SECURITY INTEREST AT REEL 046286 FRAME 0653 Recorded Nov 2, 2021
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
To: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC
Reel/Frame 058298/0093 →
SECURITY AGREEMENT Recorded Apr 22, 2020
From: CREDANT TECHNOLOGIES INC.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A.
Reel/Frame 053546/0001 →
SECURITY AGREEMENT Recorded Mar 21, 2019
From: CREDANT TECHNOLOGIES, INC.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A.
Reel/Frame 049452/0223 →
PATENT SECURITY AGREEMENT (NOTES) Recorded Jun 1, 2018
From: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
Reel/Frame 046366/0014 →
PATENT SECURITY AGREEMENT (CREDIT) Recorded Jun 1, 2018
From: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 046286/0653 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 21, 2017
From: MAO, QI; BONO, JEAN-PIERRE; RASHID, AHSAN; LIU, XIANLONG; YU, CHANG YONG; DOU, RUILING; MATHEWS, ALEXANDER; FANG, HENRY; CHOUDHARY, GYANESH KUMAR
To: EMC IP HOLDING COMPANY LLC
Reel/Frame 042311/0007 →