30
File Systems and Thin Provisioning Frederick Knight NetApp

File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

File Systems and Thin Provisioning

Frederick KnightNetApp

Page 2: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

Thin Provisioning

What is Thin Provisioning?

Why is it important?

How does the host interact with SCSI TP?

How does the host interact with ATA TP?

2

Page 3: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

What is Thin Provisioning

Space efficiency techniqueReduces physical capacity, power, cost, footprint

Based on historical data usage modelsFile systems are never 100% fullDatabases are never 100% full

Allows storage device to report larger capacity than actually exists

3

Page 4: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

Why is it important?

Space efficiency techniqueReduces physical capacityReduces footprintReduces powerReduces cost

Buy only what you need Power, Cool, and Manage only what you need

4

Page 5: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

How hosts interact with TP

Defined in T10 SBC-3 standardFor SCSI DevicesCalled “Logical Block Provisioning”

Defined in T13 ACS-2 standardFor ATA and SATA DevicesCalled “Data Set Management – TRIM”

Host integration is important

5

Page 6: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

Why hosts integration matters

6

Delete file “Green”

Logical view

Logical view

TP IntegrationNo TP Integration

Physical view

Page 7: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Provisioning Model

Full Provisioning Static physical space always exists

Resource ProvisioningDynamic Logical to Physical remapping

Thin ProvisioningMay not have sufficient physical spaceTransient / Persistent out of space conditionsResource reporting

7

Page 8: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Commands

UNMAP command WRITE SAME command GET LBA STATUS command Operational ParametersVPD pages (static read only state)Log pages (dynamic read only state)Mode pages (dynamic read write state)

8

Page 9: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Commands - UNMAP

No write data transferred Multiple Starting LBAs + Length (in parameter data)

9

Multiple Instances

Page 10: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Commands – WRITE SAME

Must transfer one logical block of write data Single starting LBA + Length (in the CDB)

10

Only ONE

Page 11: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Commands – WRITE SAME

WRITE SAME is a WRITE command READ must return the data written Additional requirement on the data for unmap If “RZ” device, data must be all zeros If not “RZ” device, can’t know the data patternConclusion: WRITE SAME with UNMAP bit is

usable only if LBPRZ = 1

11

Page 12: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Cmds – GET LBA STATUS

Query status of LBA (Does LBA contain data?)Volume backup of valid dataCreate mirror from valid dataBackground unmapped reclaimer

12

Page 13: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Cmds – GET LBA STATUS

Extent list with status

13

Multiple Instances

LBAs status –UNMAPPEDMAPPEDANCHORED

Page 14: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Commands – Parameters

Discovery (is my LUN a Thin provisioned)?REPORT SUPPORTED OPERATION CODESUNMAP command with zero xfer lengthREAD CAPACITY (16) returned dataVPD Page B2h returned data

LBPU bit and LBPWS bits

Limits and granularity

14

Page 15: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Commands – Parameters

Discovery (is my LUN a Thin provisioned)?READ CAPACITY (16) returned data

15

Page 16: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Commands – Parameters

Discovery (is my LUN Thin provisioned)?VPD page B2h returned data

16

UnreportedResourceThin

Page 17: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Commands – Parameters

Discovery (Limits and Granularity)?VPD page B0h returned data

17

Page 18: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Commands – Parameters

Resource count reportingLog page 0Ch

18

AvailableUsedDedupCompressed

1 LUN only> 1 LUN

Multiple Instances

Page 19: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

Why does dedup matter

19

Delete file “Green”

Logical view

Logical view

File “Red” and file “Green” share some data

Page 20: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Resource Thresholding

Threshold zones (yellow zone)Armed Increasing Threshold - used resources

Armed Decreasing Threshold - available resources

UA – THIN PROVISIONING SOFT THRESHOLD REACHED

20

Unit Attention

Page 21: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Resource Thresholding

Threshold zones (yellow zone)

Set at the center point of each yellow zoneBlocks based on a power of 2 (threshold set size)

10 = 1024 blocks, 12 = 4096 blocks, 16 = 64k blocks

UA arms on entry UA triggers at or before exiting

21

Page 22: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Resource Thresholding

Threshold zones (yellow zone)

Decreasing example:Threshold set size = 10 (1024 blocks)Threshold count = 16 (16384 blocks)As the available space decreases, we arm the UA

at 16896 (16384 + 512) blocks and deliver the UA at or before the available space decreases to 15872 (16384 – 512) blocks

22

Page 23: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Resource Thresholding

Multiple thresholds may exist

Each threshold is set at the center of it’s yellow zone When encountered, the UA sense data will indicate

which threshold was triggered

23

Armed Armed Armed ArmedDecreasing Increasing Decreasing IncreasingThreshold 1 Threshold 2 Threshold 3 Threshold 4

Page 24: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Resource Thresholding

Uses standard MODE SENSE/SELECT model MODE SENSE (get current page) MODE SENSE (get changeable page) If none are changeable, then threshold are hard set

by the storage vendor The changeable fields within a threshold can be set

by host (maybe the set point, maybe the arming direction)

24

Page 25: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Resource Thresholding

Resource threshold reportingMode page 1Ch subpage 02hMultiple threshold descriptors

25

IncreasingDecreasing

AvailableUsed

Page 26: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

SCSI Resource Thresholding

VPD page defines the width of threshold (the yellow zone) defined by device vendor (not changeable)

VPD page contains a Provisioning Group DescriptorLUNs with the same descriptor share the same

resource pool

26

Page 27: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

ATA & SATA Commands

DATA SET MANAGEMENT commandTRIM function (word 69 bit 0)

Supplies a list of LBA Range Entries48 Bit LBA number and 16 bit length

DRAT vs. non-DRAT (word 69 bit 14)

RZAT vs. non-RZAT (word 69 bit 5)

27

Page 28: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

ATA & SATA Commands

Issue DSM command with Trim = 1No Write data is transferred Supply list of Starting LBA + Length in bufferTherefore SCSI UNMAP is an easy translation

28

Page 29: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

Application Interactions

Deleting a fileUNMAP the files LBAs

Background scannerGET LBA STATUSREAD the file system allocation bit mapUNMAP the LBAs that are not allocated

Mirror CreationGET LBA STATUSCopy only real data

29

Page 30: File Systems and Thin Provisioning - SNIA€¦ · GET LBA STATUS command ... Slide 1 Author: lleger Created Date: 9/14/2011 12:43:13 PM

2011 Storage Developer Conference. © NetApp. All Rights Reserved.

Actions

Learn what File System APIs are available Ask Vendors to provide APIs

30