SlideShare a Scribd company logo
1 of 21
Download to read offline
Storage Pool Checkpoint
25 October 2017
Serapheim Dimitropoulos
Delphix
Timeline
Started with Dan Kimmel at last year's hackathon
Redesigned from scratch later that year
Pushed in product last spring and soaking since then
Can only be upstreamed after Device Removal. Help us get there :-)
Motivation
Motivation
Upgrading a Delphix Engine
Reboot to new OS version
Run several upgrade scripts
Each upgrade script
Manipulates ZFS datasets and their properties
Has a respective rollback script in case it fails
Motivation
Problems with rollback scripts
Tedious & time-consuming to write
but most importantly, error-prone
The main problem with our rollback
Upgrade scripts manipulate datasets (not les!)
Thus, taking a regular snapshot and rolling back is not possible
Storage Pool Checkpoint
Storage Pool Checkpoint
A "pool-wide" snapshot!
Remembers the entire state of the pool at a point in time
Users can rewind back to it later or discard it
Like a snapshot
creating a checkpoint is almost instantenuous
its space comnsumption consists only of references to old data
Delphix Use Case
New work ow:
Take a checkpoint
Run upgrade scripts
If a script fails rewind to checkpoint
Else discard it when upgrade is done
No need for rollback scripts!
High-Level Internals
High-Level Internals
Uberblock - The block that references all the state of a pool
High-Level Internals
ZFS uses logical timestamps to represent time called Transaction Groups (aka TXGs)
In each TXG:
We accumulate changes
We write a new uberblock that references those changes
All blocks in ZFS have a birth time equal to the TXG that they were created
High-Level Internals
ZFS CoW Nature
New uberblock references new blocks plus blocks from older uberblocks
As time passes and we are writing to disk, blocks that are not referenced are reused
High-Level Internals
Checkpoint Pool
Save the current (at the time) uberblock
Rewind to Checkpoint
Place saved uberblock back as the current uberblock
Discard Checkpoint
Get rid of the saved uberblock
High-Level Internals
Problem
Blocks that are referenced by the checkpointed uberblock but not the current one.
They may be marked for reuse and get overwritten!
Solution
Look at block's birth TXG:
if it was born after the checkpoint mark it for reuse.
else keep the block marked as allocated and save its location on a log on-disk.
This way:
checkpointed blocks don't get reused
when the checkpoint is discarded we go through our on-disk log marking everything as
free
Usage
Cheatsheet
# Take checkpoint
$ zpool checkpoint <pool>
# Preview checkpointed state
$ zpool import -o readonly=on --rewind-to-checkpoint <pool>
# Rewird to the checkpoint
$ zpool import --rewind-to-checkpoint <pool>
# Discard the checkpoint
$ zpool checkpoint --discard <pool>
# Check when the checkpoint was taken
$ zpool status
# Check the space usage of the checkpoint
$ zpool list
Demo
Caveats
When there is a checkpoint:
1] Operations changing the vdev con guration (e.g. device removal) are not allowed
2] Reservations may be unenforceable
3] zpool scrub may not scrub your checkpointed data (yet?)
As a general rule, always be sure to know exactly what you are reverting to
Resources & Updates
Introductory Blogpost(https://sdimitro.github.io/post/zpool-checkpoint/)
Slack #OpenZFS(https://openzfs.slack.com/)
Tweet @OpenZFS(https://twitter.com/OpenZFS)
And once upstreamed, good old man zpool :-)
Thank you
Serapheim Dimitropoulos
Delphix
serapheim@delphix.com(mailto:serapheim@delphix.com)
https://sdimitro.github.io/(https://sdimitro.github.io/)
@AmazingDim(http://twitter.com/AmazingDim)
ZFS Storage Pool Checkpoint

More Related Content

What's hot

Continuous integration with Docker and Ansible
Continuous integration with Docker and AnsibleContinuous integration with Docker and Ansible
Continuous integration with Docker and Ansible
Dmytro Slupytskyi
 

What's hot (20)

Cocoa tip for Cocoaheads Shanghai February 2016
Cocoa tip for Cocoaheads Shanghai February 2016Cocoa tip for Cocoaheads Shanghai February 2016
Cocoa tip for Cocoaheads Shanghai February 2016
 
OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways ...
OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways ...OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways ...
OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways ...
 
Replication and replica sets
Replication and replica setsReplication and replica sets
Replication and replica sets
 
There is no snapshot
There is no snapshotThere is no snapshot
There is no snapshot
 
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build SystemIntroduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
 
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
 
What’s new in Docker 1.13
What’s new in Docker 1.13What’s new in Docker 1.13
What’s new in Docker 1.13
 
Hands-On Session Docker
Hands-On Session DockerHands-On Session Docker
Hands-On Session Docker
 
Docker 1.13 - Docker meetup février 2017
Docker 1.13 - Docker meetup février 2017Docker 1.13 - Docker meetup février 2017
Docker 1.13 - Docker meetup février 2017
 
Getting Started with Docker
Getting Started with Docker Getting Started with Docker
Getting Started with Docker
 
OOPs, OOMs, oh my! Containerizing JVM apps
OOPs, OOMs, oh my! Containerizing JVM appsOOPs, OOMs, oh my! Containerizing JVM apps
OOPs, OOMs, oh my! Containerizing JVM apps
 
(2016-06-11) Packer: Make Multi-Platform Images
(2016-06-11) Packer: Make Multi-Platform Images(2016-06-11) Packer: Make Multi-Platform Images
(2016-06-11) Packer: Make Multi-Platform Images
 
November 15 cloud bees clusterhq meetup fli, flockerhub, and jenkins
November 15 cloud bees clusterhq meetup   fli, flockerhub, and jenkinsNovember 15 cloud bees clusterhq meetup   fli, flockerhub, and jenkins
November 15 cloud bees clusterhq meetup fli, flockerhub, and jenkins
 
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando MayoDocker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
 
Solving Real World Production Problems with Docker
Solving Real World Production Problems with DockerSolving Real World Production Problems with Docker
Solving Real World Production Problems with Docker
 
Democratizing Development - Scott Gress
Democratizing Development - Scott GressDemocratizing Development - Scott Gress
Democratizing Development - Scott Gress
 
Ocfs2 storage
Ocfs2 storageOcfs2 storage
Ocfs2 storage
 
OSv: probably the best OS for cloud workloads you've never hear of
OSv: probably the best OS for cloud workloads you've never hear ofOSv: probably the best OS for cloud workloads you've never hear of
OSv: probably the best OS for cloud workloads you've never hear of
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.
 
Continuous integration with Docker and Ansible
Continuous integration with Docker and AnsibleContinuous integration with Docker and Ansible
Continuous integration with Docker and Ansible
 

Similar to ZFS Storage Pool Checkpoint

Maturing Locately Dev Processes
Maturing Locately Dev ProcessesMaturing Locately Dev Processes
Maturing Locately Dev Processes
mpklein
 

Similar to ZFS Storage Pool Checkpoint (20)

Using redux
Using reduxUsing redux
Using redux
 
Docker 102 - Immutable Infrastructure
Docker 102 - Immutable InfrastructureDocker 102 - Immutable Infrastructure
Docker 102 - Immutable Infrastructure
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-Translator
 
Hotbackup
HotbackupHotbackup
Hotbackup
 
SVN Information
SVN Information  SVN Information
SVN Information
 
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best Practices
 
Openshift cheat rhce_r3v1 rhce
Openshift cheat rhce_r3v1 rhceOpenshift cheat rhce_r3v1 rhce
Openshift cheat rhce_r3v1 rhce
 
Novices guide to docker
Novices guide to dockerNovices guide to docker
Novices guide to docker
 
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
 
How to Handle your Kubernetes Upgrades
How to Handle your Kubernetes UpgradesHow to Handle your Kubernetes Upgrades
How to Handle your Kubernetes Upgrades
 
Live Container Migration: OpenStack Summit Barcelona 2016
Live Container Migration: OpenStack Summit Barcelona 2016Live Container Migration: OpenStack Summit Barcelona 2016
Live Container Migration: OpenStack Summit Barcelona 2016
 
Deep dive - Concourse CI/CD and Pipelines
Deep dive  - Concourse CI/CD and PipelinesDeep dive  - Concourse CI/CD and Pipelines
Deep dive - Concourse CI/CD and Pipelines
 
Maturing Locately Dev Processes
Maturing Locately Dev ProcessesMaturing Locately Dev Processes
Maturing Locately Dev Processes
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
What is Delphix
What is DelphixWhat is Delphix
What is Delphix
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
 
Dockercon EU 2014
Dockercon EU 2014Dockercon EU 2014
Dockercon EU 2014
 
Shareplex Presentation
Shareplex PresentationShareplex Presentation
Shareplex Presentation
 

Recently uploaded

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Recently uploaded (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 

ZFS Storage Pool Checkpoint

  • 1. Storage Pool Checkpoint 25 October 2017 Serapheim Dimitropoulos Delphix
  • 2. Timeline Started with Dan Kimmel at last year's hackathon Redesigned from scratch later that year Pushed in product last spring and soaking since then Can only be upstreamed after Device Removal. Help us get there :-)
  • 4. Motivation Upgrading a Delphix Engine Reboot to new OS version Run several upgrade scripts Each upgrade script Manipulates ZFS datasets and their properties Has a respective rollback script in case it fails
  • 5. Motivation Problems with rollback scripts Tedious & time-consuming to write but most importantly, error-prone The main problem with our rollback Upgrade scripts manipulate datasets (not les!) Thus, taking a regular snapshot and rolling back is not possible
  • 7. Storage Pool Checkpoint A "pool-wide" snapshot! Remembers the entire state of the pool at a point in time Users can rewind back to it later or discard it Like a snapshot creating a checkpoint is almost instantenuous its space comnsumption consists only of references to old data
  • 8. Delphix Use Case New work ow: Take a checkpoint Run upgrade scripts If a script fails rewind to checkpoint Else discard it when upgrade is done No need for rollback scripts!
  • 10. High-Level Internals Uberblock - The block that references all the state of a pool
  • 11. High-Level Internals ZFS uses logical timestamps to represent time called Transaction Groups (aka TXGs) In each TXG: We accumulate changes We write a new uberblock that references those changes All blocks in ZFS have a birth time equal to the TXG that they were created
  • 12. High-Level Internals ZFS CoW Nature New uberblock references new blocks plus blocks from older uberblocks As time passes and we are writing to disk, blocks that are not referenced are reused
  • 13. High-Level Internals Checkpoint Pool Save the current (at the time) uberblock Rewind to Checkpoint Place saved uberblock back as the current uberblock Discard Checkpoint Get rid of the saved uberblock
  • 14. High-Level Internals Problem Blocks that are referenced by the checkpointed uberblock but not the current one. They may be marked for reuse and get overwritten! Solution Look at block's birth TXG: if it was born after the checkpoint mark it for reuse. else keep the block marked as allocated and save its location on a log on-disk. This way: checkpointed blocks don't get reused when the checkpoint is discarded we go through our on-disk log marking everything as free
  • 15. Usage
  • 16. Cheatsheet # Take checkpoint $ zpool checkpoint <pool> # Preview checkpointed state $ zpool import -o readonly=on --rewind-to-checkpoint <pool> # Rewird to the checkpoint $ zpool import --rewind-to-checkpoint <pool> # Discard the checkpoint $ zpool checkpoint --discard <pool> # Check when the checkpoint was taken $ zpool status # Check the space usage of the checkpoint $ zpool list
  • 17. Demo
  • 18. Caveats When there is a checkpoint: 1] Operations changing the vdev con guration (e.g. device removal) are not allowed 2] Reservations may be unenforceable 3] zpool scrub may not scrub your checkpointed data (yet?) As a general rule, always be sure to know exactly what you are reverting to
  • 19. Resources & Updates Introductory Blogpost(https://sdimitro.github.io/post/zpool-checkpoint/) Slack #OpenZFS(https://openzfs.slack.com/) Tweet @OpenZFS(https://twitter.com/OpenZFS) And once upstreamed, good old man zpool :-)