SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Downloaden Sie, um offline zu lesen
The REFLINK Operation in OCFS2


              Joel Becker
                Tao Ma
                Oracle
Agenda

   Problems



   Solution – REFLINK in OCFS2



   Status Update




                                  2
Problems

Virtual Machines want:

   Snapshots

   Clones

   Space Savings




                         3
REFLINK operations

   int reflink(const char *oldpath,
               const char *newpath, int preserve);



   reflink()has the same calling semantics as cp(2)
   but creates a new file that shares all the data extents of the source file




                                                                                 4
Using REFLINK

   Snapshots:
     # umask 333 && reflink host1.img 
     host1.img.snap

   Restore:
     # unlink host1.img
     # reflink host1.img.snap host1.img

   Clones:
     # reflink os-base.img host1.img
     # create-vm --name host1 host1.img




                                          5
OCFS2 Implementation


   Use reflink count for a extent-based file.

   CoW when writing to the reflinked file.

   No punishment for read.




                                                 6
OCFS2 Examples
ls -l
 -rw-r--r-- 1 root root 4195352576 Oct 28 10:26 el5_u1.img

df -h .
Filesystem        Size Used Avail Use% Mounted on
/dev/sda9         103G 4.2G 99G 5% /mnt/ocfs2

time reflink el5_u1.img el5_u1_1.img
real 0m0.022s
user 0m0.000s
sys 0m0.001s




                                                             7
OCFS2 Examples(Contd.)

ls -l
-rw-r--r-- 1 root root 4195352576 Oct 28 10:32 el5_u1_1.img
-rw-r--r-- 1 root root 4195352576 Oct 28 10:26 el5_u1.img

df -h .
Filesystem       Size Used Avail Use% Mounted on
/dev/sda9        103G 4.2G 99G 5% /mnt/ocfs2




                                                              8
OCFS2 Examples(Contd.)

md5sum el5_u1.img
6bf239ca47c8d165006047235ae6ba07 el5_u1.img
real 1m6.425s
user 0m12.420s
sys 0m3.200s

md5sum el5_u1_1.img
6bf239ca47c8d165006047235ae6ba07 el5_u1_1.img
real 1m6.837s
user 0m12.479s
sys 0m3.222s




                                                9
OCFS2 Examples(Contd.)
dd if=/dev/zero of=el5_u1_1.img bs=1M count=1000 seek=500 conv=notrunc
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB) copied, 18.4234 seconds, 56.9 MB/s

ls -l
-rw-r--r-- 1 root root 4195352576 Oct 28 11:07 el5_u1_1.img
-rw-r--r-- 1 root root 4195352576 Oct 28 10:26 el5_u1.img

df -h .
Filesystem       Size Used Avail Use% Mounted on
/dev/sda9        103G 5.2G 98G 6% /mnt/ocfs2




                                                                         10
OCFS2 Examples(Contd.)

filefrag -sv /mnt/ocfs2/el5_u1_1.img
Filesystem type is: 7461636f
File size of /mnt/ocfs2/el5_u1_1.img is 4195352576 (1024256 blocks, blocksize
4096)
 ext logical physical expected length flags
   0        0    18688             128000 shared
   1 128000 1046016 146687              768
   2 128768 1048832 1046783 255232
   3 384000 404736 1304063 640256 shared,eof
/mnt/ocfs2/el5_u1_1.img: 4 extents found




                                                                          11
Status Update


   REFLINK in OCFS2 has been merged into 2.6.32.

   System call will be integrated into Linux Kernel soon.

   OCFS2 1.6 for enterprise kernel will have REFLINK.




                                                             12
Status Update (Contd.)


Oracle VM 3.0 will have OCFS2 1.6.



OCFS2 will be one type of Oracle Storage Connect Program.




                                                            13
Thanks !

Joel & Tao




             14

Weitere ähnliche Inhalte

Was ist angesagt?

USENIX ATC 2017 Performance Superpowers with Enhanced BPF
USENIX ATC 2017 Performance Superpowers with Enhanced BPFUSENIX ATC 2017 Performance Superpowers with Enhanced BPF
USENIX ATC 2017 Performance Superpowers with Enhanced BPF
Brendan Gregg
 
Kernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPFKernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPF
Brendan Gregg
 

Was ist angesagt? (20)

RHCE Training
RHCE TrainingRHCE Training
RHCE Training
 
Docker at OpenDNS
Docker at OpenDNSDocker at OpenDNS
Docker at OpenDNS
 
Object Storage with Gluster
Object Storage with GlusterObject Storage with Gluster
Object Storage with Gluster
 
CoreOS + Kubernetes @ All Things Open 2015
CoreOS + Kubernetes @ All Things Open 2015CoreOS + Kubernetes @ All Things Open 2015
CoreOS + Kubernetes @ All Things Open 2015
 
Installation of application server 10g in red hat 4
Installation of application server 10g in red hat 4Installation of application server 10g in red hat 4
Installation of application server 10g in red hat 4
 
USENIX ATC 2017 Performance Superpowers with Enhanced BPF
USENIX ATC 2017 Performance Superpowers with Enhanced BPFUSENIX ATC 2017 Performance Superpowers with Enhanced BPF
USENIX ATC 2017 Performance Superpowers with Enhanced BPF
 
Linux Containers From Scratch: Makfile MicroVPS
Linux Containers From Scratch: Makfile MicroVPSLinux Containers From Scratch: Makfile MicroVPS
Linux Containers From Scratch: Makfile MicroVPS
 
Nginx
NginxNginx
Nginx
 
FOSDEM2015: Live migration for containers is around the corner
FOSDEM2015: Live migration for containers is around the cornerFOSDEM2015: Live migration for containers is around the corner
FOSDEM2015: Live migration for containers is around the corner
 
Make Your Containers Faster: Linux Container Performance Tools
Make Your Containers Faster: Linux Container Performance ToolsMake Your Containers Faster: Linux Container Performance Tools
Make Your Containers Faster: Linux Container Performance Tools
 
Kernel Upgrade
Kernel UpgradeKernel Upgrade
Kernel Upgrade
 
Docker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in PragueDocker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in Prague
 
Containers on Windows
Containers on WindowsContainers on Windows
Containers on Windows
 
Kernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPFKernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPF
 
From 'dotnet run' to 'hello world'
From 'dotnet run' to 'hello world'From 'dotnet run' to 'hello world'
From 'dotnet run' to 'hello world'
 
L'odyssée de la log
L'odyssée de la logL'odyssée de la log
L'odyssée de la log
 
บทท 7
บทท   7บทท   7
บทท 7
 
CoreOS in a Nutshell
CoreOS in a NutshellCoreOS in a Nutshell
CoreOS in a Nutshell
 
Introduction to eBPF and XDP
Introduction to eBPF and XDPIntroduction to eBPF and XDP
Introduction to eBPF and XDP
 
Oracle cluster installation with grid and nfs
Oracle cluster  installation with grid and nfsOracle cluster  installation with grid and nfs
Oracle cluster installation with grid and nfs
 

Ähnlich wie Reflink

Collaborate instant cloning_kyle
Collaborate instant cloning_kyleCollaborate instant cloning_kyle
Collaborate instant cloning_kyle
Kyle Hailey
 
Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014
Hajime Tazaki
 
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
BertrandDrouvot
 
EF09-Installing-Alfresco-components-1-by-1.pdf
EF09-Installing-Alfresco-components-1-by-1.pdfEF09-Installing-Alfresco-components-1-by-1.pdf
EF09-Installing-Alfresco-components-1-by-1.pdf
DangGonz
 
Linux26 New Features
Linux26 New FeaturesLinux26 New Features
Linux26 New Features
guest491c69
 

Ähnlich wie Reflink (20)

Vbox virtual box在oracle linux 5 - shoug 梁洪响
Vbox virtual box在oracle linux 5 - shoug 梁洪响Vbox virtual box在oracle linux 5 - shoug 梁洪响
Vbox virtual box在oracle linux 5 - shoug 梁洪响
 
Rac on NFS
Rac on NFSRac on NFS
Rac on NFS
 
New Oracle Infrastructure2
New Oracle Infrastructure2New Oracle Infrastructure2
New Oracle Infrastructure2
 
Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0
 
Oracle Enterprise Manager Cloud Control 12c: how to solve 'ERROR: NMO Not Set...
Oracle Enterprise Manager Cloud Control 12c: how to solve 'ERROR: NMO Not Set...Oracle Enterprise Manager Cloud Control 12c: how to solve 'ERROR: NMO Not Set...
Oracle Enterprise Manager Cloud Control 12c: how to solve 'ERROR: NMO Not Set...
 
Container Performance Analysis Brendan Gregg, Netflix
Container Performance Analysis Brendan Gregg, NetflixContainer Performance Analysis Brendan Gregg, Netflix
Container Performance Analysis Brendan Gregg, Netflix
 
Container Performance Analysis
Container Performance AnalysisContainer Performance Analysis
Container Performance Analysis
 
Collaborate instant cloning_kyle
Collaborate instant cloning_kyleCollaborate instant cloning_kyle
Collaborate instant cloning_kyle
 
Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014
 
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
 
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
 
EF09-Installing-Alfresco-components-1-by-1.pdf
EF09-Installing-Alfresco-components-1-by-1.pdfEF09-Installing-Alfresco-components-1-by-1.pdf
EF09-Installing-Alfresco-components-1-by-1.pdf
 
Kdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysisKdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysis
 
Ef09 installing-alfresco-components-1-by-1
Ef09 installing-alfresco-components-1-by-1Ef09 installing-alfresco-components-1-by-1
Ef09 installing-alfresco-components-1-by-1
 
Install oracle11gr2 rhel5
Install oracle11gr2 rhel5Install oracle11gr2 rhel5
Install oracle11gr2 rhel5
 
Linux26 New Features
Linux26 New FeaturesLinux26 New Features
Linux26 New Features
 
CRIU: are we there yet?
CRIU: are we there yet?CRIU: are we there yet?
CRIU: are we there yet?
 
FOSDEM 2015: Live migration for containers is around the corner
FOSDEM 2015: Live migration for containers is around the cornerFOSDEM 2015: Live migration for containers is around the corner
FOSDEM 2015: Live migration for containers is around the corner
 
CRIU (Checkpoint and Restore In Userspace) FOSDEM 2015
CRIU (Checkpoint and Restore In Userspace) FOSDEM 2015CRIU (Checkpoint and Restore In Userspace) FOSDEM 2015
CRIU (Checkpoint and Restore In Userspace) FOSDEM 2015
 
Refining Linux
Refining LinuxRefining Linux
Refining Linux
 

Mehr von The Linux Foundation

Mehr von The Linux Foundation (20)

ELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made SimpleELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made Simple
 
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
 
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
 
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
 
XPDDS19 Keynote: Unikraft Weather Report
XPDDS19 Keynote:  Unikraft Weather ReportXPDDS19 Keynote:  Unikraft Weather Report
XPDDS19 Keynote: Unikraft Weather Report
 
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
 
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
 
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, BitdefenderXPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
 
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
 
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making... OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, CitrixXPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
 
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltdXPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
 
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
 
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&DXPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
 
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM SystemsXPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
 
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
 
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
 
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
 
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEXPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Reflink

  • 1. The REFLINK Operation in OCFS2 Joel Becker Tao Ma Oracle
  • 2. Agenda  Problems  Solution – REFLINK in OCFS2  Status Update 2
  • 3. Problems Virtual Machines want:  Snapshots  Clones  Space Savings 3
  • 4. REFLINK operations  int reflink(const char *oldpath,  const char *newpath, int preserve);   reflink()has the same calling semantics as cp(2)  but creates a new file that shares all the data extents of the source file 4
  • 5. Using REFLINK  Snapshots: # umask 333 && reflink host1.img host1.img.snap  Restore: # unlink host1.img # reflink host1.img.snap host1.img  Clones: # reflink os-base.img host1.img # create-vm --name host1 host1.img 5
  • 6. OCFS2 Implementation  Use reflink count for a extent-based file.  CoW when writing to the reflinked file.  No punishment for read. 6
  • 7. OCFS2 Examples ls -l -rw-r--r-- 1 root root 4195352576 Oct 28 10:26 el5_u1.img df -h . Filesystem Size Used Avail Use% Mounted on /dev/sda9 103G 4.2G 99G 5% /mnt/ocfs2 time reflink el5_u1.img el5_u1_1.img real 0m0.022s user 0m0.000s sys 0m0.001s 7
  • 8. OCFS2 Examples(Contd.) ls -l -rw-r--r-- 1 root root 4195352576 Oct 28 10:32 el5_u1_1.img -rw-r--r-- 1 root root 4195352576 Oct 28 10:26 el5_u1.img df -h . Filesystem Size Used Avail Use% Mounted on /dev/sda9 103G 4.2G 99G 5% /mnt/ocfs2 8
  • 9. OCFS2 Examples(Contd.) md5sum el5_u1.img 6bf239ca47c8d165006047235ae6ba07 el5_u1.img real 1m6.425s user 0m12.420s sys 0m3.200s md5sum el5_u1_1.img 6bf239ca47c8d165006047235ae6ba07 el5_u1_1.img real 1m6.837s user 0m12.479s sys 0m3.222s 9
  • 10. OCFS2 Examples(Contd.) dd if=/dev/zero of=el5_u1_1.img bs=1M count=1000 seek=500 conv=notrunc 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 18.4234 seconds, 56.9 MB/s ls -l -rw-r--r-- 1 root root 4195352576 Oct 28 11:07 el5_u1_1.img -rw-r--r-- 1 root root 4195352576 Oct 28 10:26 el5_u1.img df -h . Filesystem Size Used Avail Use% Mounted on /dev/sda9 103G 5.2G 98G 6% /mnt/ocfs2 10
  • 11. OCFS2 Examples(Contd.) filefrag -sv /mnt/ocfs2/el5_u1_1.img Filesystem type is: 7461636f File size of /mnt/ocfs2/el5_u1_1.img is 4195352576 (1024256 blocks, blocksize 4096) ext logical physical expected length flags 0 0 18688 128000 shared 1 128000 1046016 146687 768 2 128768 1048832 1046783 255232 3 384000 404736 1304063 640256 shared,eof /mnt/ocfs2/el5_u1_1.img: 4 extents found 11
  • 12. Status Update  REFLINK in OCFS2 has been merged into 2.6.32.  System call will be integrated into Linux Kernel soon.  OCFS2 1.6 for enterprise kernel will have REFLINK. 12
  • 13. Status Update (Contd.) Oracle VM 3.0 will have OCFS2 1.6. OCFS2 will be one type of Oracle Storage Connect Program. 13
  • 14. Thanks ! Joel & Tao 14