SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
ZFS 101
aka did you know that ZFS is cool and
that you could be using it?
Dru Lavigne
Documentation Lead, iXsystems
OLF, September 14, 2013
Outline
Discuss ZFS features and describe how these
features are configured in the following operating
systems:
FreeNAS: open source NAS (Network Attached
Storage)
PC-BSD: open source desktop (GUI) or server
(CLI)
Latest versions of both operating systems use the
most recent open source ZFS (v5000 or feature
flags)
What is ZFS?
128-bit COW (Copy on Write) filesystem and
logical volume manager with a maximum pool/file
size of 16 exabytes
Unlike traditional Unix filesystems, you are not
limited to the partition sizes and mount points
defined at filesystem creation time
Instead, disks are fed to a “pool” and the size of
that pool can increase as the need for disk
capacity increases (does require pre-planning)
Pool
Root (parent) volume which can be logically sub-
divided as needed--can create one or multiple
pools
The number of disks added at a time is known as
a “vdev”
To optimize performance and resilvering time,
number of disks per vdev is limited
As more capacity is needed, add identical vdevs--
these will be striped into the pool
RAIDZ
RAIDZ* levels designed to overcome hardware
RAID limitations such as the write-hole and
corrupt data written over time before the controller
provides an alert
Designed for commodity disks so no RAID
controller is needed
Can also be used with a RAID controller, but it
should be put in JBOD mode
RAIDZ1
Parity blocks are distributed across all disks
Up to one disk can fail per vdev without losing
pool
Pool can be lost if second disk in a vdev fails
before resilver completes
Optimized for vdev of 3, 5, or 9 disks
RAIDZ2
Double-parity solution similar to RAID6
Parity blocks are distributed across all disks
Up to two disks can fail per vdev without losing
pool, with no restrictions on which disks can fail
Optimized for vdev of 4, 6, or 10 disks
RAIDZ3
Triple-parity solution
Parity blocks are distributed across all disks
Up to three disks can fail per vdev without losing
pool, with no restrictions on which disks can fail
Optimized for vdev of 5, 7, or 11 disks
Create Pool on FreeNAS
Create Pool on PC-BSD
ZIL
ZFS Intent Log
Effectively a filesystem journal that manages
writes
A dedicated SSD as a secondary log device
(SLOG) can increase synchronous write
performance, will have no effect on asynchronous
writes
ARC
ARC refers to read cache in RAM
Expect a miss for random reads and a hit for
cached reads
Takes time for ARC to populate; if high misses
continue for cached reads, the system needs to
be tuned
Freenas adds ARC stats to top(1) and includes
arc_summary.py and arcstat.py tools for ARC
monitoring
L2ARC
Optional, secondary ARC which can be installed
on SSD or disk in order to increase random read
performance
Always add as much RAM as possible first
L2ARC is populated over time with “hot” reads
Adding SLOG/L2ARC on FreeNAS
Datasets
Pool can be divided into datasets
Similar to a folder in that it supports permissions
Similar to a filesystem in that you can set
properties such as quotas and compression (built-
in LZ4 compression is near real-time speed)
A well thought out design can optimize storage for
the type of data being stored
Properties
Dozens of configurable properties such as: atime
(access time), canmount, compression, copies,
dedup, exec, quota, userquota, groupquota,
readonly, recordsize, reservation, setuid, etc.
Descriptions can be found at
http://www.freebsd.org/cgi/man.cgi?query=zfs
Adding Dataset on FreeNAS
Adding Dataset on PC-BSD
Zvols
Pool can also be divided into zvols
Essentially, a virtual, raw block device
Ideal for iSCSI device extents
Regardless of the filesytem the zvol is formatted
with by the iSCSI initiator, the underlying disk
blocks still benefit from all of the features provided
by ZFS
Creating Zvols on FreeNAS
Snapshots
Provide read-only, point-in-time image of the
specified pool, dataset, or zvol
Snapshots can be recursive (atomic inclusion of
all child datasets)
Initial size is 0 bytes as COW, snapshot increases
in size as changes are written to disk
Can be replicated to another system
Clones
Provide read-write copies of read-only snapshots
Initial size of clone is 0 bytes
Clones can be mounted and used to access data
from that point in time (e.g. to restore an earlier
revision of a file)
Create Snapshot on FreeNAS
Create Snapshot on PC-BSD
Using Warden
Snapshot Restore
In PC-BSD 9.2, the Life Preserver utility can be
used to automate full system backups to another
system running rsync+ssh, or to a FreeNAS
system
The backup can be used to perform an operating
system restore from a PC-BSD install media,
should the system become unusable
Restoring a
Life Preserver Backup
Scrubs
ZFS was designed to be self-healing; it creates
and verifies checksums as data is written to disk
A scrub verifies the checksum in each disk block
and attempts to correct data as necessary
I/O intensive so should be scheduled
appropriately
Reading the scrub results can provide an early
indication of possible disk failure
Scheduling Scrubs on FreeNAS
Deduplication
Used to free blocks containing identical data
(updates reference pointers)
Can improve performance on datasets containing
duplicate data (e.g. virtual images)
Dedup tables should fit into L2ARC; systems with
limited RAM or no L2ARC might freeze hard
Recommended is at least 5 GB RAM/L2ARC per
TB of storage to be deduplicated
Boot Environments
A snapshot of the dataset the operating system
resides on can be taken before an upgrade or a
system configuration change
This saved “boot environment” is automatically
added to the GRUB boot manager
Should the upgrade or configuration change fail,
simply reboot and select the previous boot
environment from the boot menu
Managing Boot Environments
on PC- BSD
Managing Boot Environments
on PC- BSD
Additional Resources
PC-BSD Users Handbook: wiki.pcbsd.org
FreeNAS User Guide: doc.freenas.org
ZFS Best Practices Guide: http://ow.ly/oHtP3
Becoming a ZFS Ninja:
https://blogs.oracle.com/video/entry/becoming_a_
zfs_ninja
Questions
Contact:
dru@freebsd.org
URL to Slides:
http://slideshare.net/dlavigne/olf2013

Weitere ähnliche Inhalte

Was ist angesagt? (20)

Fsoss12
Fsoss12Fsoss12
Fsoss12
 
Asiabsdcon14
Asiabsdcon14Asiabsdcon14
Asiabsdcon14
 
Scale9x sun
Scale9x sunScale9x sun
Scale9x sun
 
Lavigne bsdmag-jan2012
Lavigne bsdmag-jan2012Lavigne bsdmag-jan2012
Lavigne bsdmag-jan2012
 
Lavigne bsdmag may13
Lavigne bsdmag may13Lavigne bsdmag may13
Lavigne bsdmag may13
 
Oclug 2010
Oclug 2010Oclug 2010
Oclug 2010
 
Ilf2012
Ilf2012Ilf2012
Ilf2012
 
Nelf2012
Nelf2012Nelf2012
Nelf2012
 
Ilf2013
Ilf2013Ilf2013
Ilf2013
 
Asiabsdcon14 lavigne
Asiabsdcon14 lavigneAsiabsdcon14 lavigne
Asiabsdcon14 lavigne
 
Fosscon2013
Fosscon2013Fosscon2013
Fosscon2013
 
Nelf2013
Nelf2013Nelf2013
Nelf2013
 
Lavigne bsdmag sept12
Lavigne bsdmag sept12Lavigne bsdmag sept12
Lavigne bsdmag sept12
 
Flourish11
Flourish11Flourish11
Flourish11
 
Scale 2010: BSD for Linux Users
Scale 2010: BSD for Linux UsersScale 2010: BSD for Linux Users
Scale 2010: BSD for Linux Users
 
Lavigne bsdmag-jan13
Lavigne bsdmag-jan13Lavigne bsdmag-jan13
Lavigne bsdmag-jan13
 
olf10
olf10olf10
olf10
 
Tlf2013
Tlf2013Tlf2013
Tlf2013
 
Sweden11
Sweden11Sweden11
Sweden11
 
Scale13
Scale13Scale13
Scale13
 

Ähnlich wie ZFS 101: An Introduction to the Powerful ZFS Filesystem

Network Storage dan Filesystem.pdf
Network Storage dan Filesystem.pdfNetwork Storage dan Filesystem.pdf
Network Storage dan Filesystem.pdfTaseigerKu
 
Distributed File System
Distributed File SystemDistributed File System
Distributed File SystemNtu
 
Hadoop Distributed File System for Big Data Analytics
Hadoop Distributed File System for Big Data AnalyticsHadoop Distributed File System for Big Data Analytics
Hadoop Distributed File System for Big Data AnalyticsDrPDShebaKeziaMalarc
 
Disks and-filesystems
Disks and-filesystemsDisks and-filesystems
Disks and-filesystemsplarsen67
 
Disks and-filesystems
Disks and-filesystemsDisks and-filesystems
Disks and-filesystemsplarsen67
 
What is the average rotational latency of this disk drive What seek.docx
 What is the average rotational latency of this disk drive  What seek.docx What is the average rotational latency of this disk drive  What seek.docx
What is the average rotational latency of this disk drive What seek.docxajoy21
 
Zettabyte File Storage System
Zettabyte File Storage SystemZettabyte File Storage System
Zettabyte File Storage SystemAmdocs
 
Zettabyte File Storage System
Zettabyte File Storage SystemZettabyte File Storage System
Zettabyte File Storage SystemAmdocs
 
Hadoop architecture (Delhi Hadoop User Group Meetup 10 Sep 2011)
Hadoop architecture (Delhi Hadoop User Group Meetup 10 Sep 2011)Hadoop architecture (Delhi Hadoop User Group Meetup 10 Sep 2011)
Hadoop architecture (Delhi Hadoop User Group Meetup 10 Sep 2011)Hari Shankar Sreekumar
 
OSDC 2016 - Interesting things you can do with ZFS by Allan Jude&Benedict Reu...
OSDC 2016 - Interesting things you can do with ZFS by Allan Jude&Benedict Reu...OSDC 2016 - Interesting things you can do with ZFS by Allan Jude&Benedict Reu...
OSDC 2016 - Interesting things you can do with ZFS by Allan Jude&Benedict Reu...NETWAYS
 

Ähnlich wie ZFS 101: An Introduction to the Powerful ZFS Filesystem (20)

Flourish16
Flourish16Flourish16
Flourish16
 
Scale2014
Scale2014Scale2014
Scale2014
 
Tlf2014
Tlf2014Tlf2014
Tlf2014
 
Fossetcon14
Fossetcon14Fossetcon14
Fossetcon14
 
ZFS
ZFSZFS
ZFS
 
Magnetic disk - Krishna Geetha.ppt
Magnetic disk  - Krishna Geetha.pptMagnetic disk  - Krishna Geetha.ppt
Magnetic disk - Krishna Geetha.ppt
 
Network Storage dan Filesystem.pdf
Network Storage dan Filesystem.pdfNetwork Storage dan Filesystem.pdf
Network Storage dan Filesystem.pdf
 
Distributed File System
Distributed File SystemDistributed File System
Distributed File System
 
Hadoop Distributed File System for Big Data Analytics
Hadoop Distributed File System for Big Data AnalyticsHadoop Distributed File System for Big Data Analytics
Hadoop Distributed File System for Big Data Analytics
 
Disks and-filesystems
Disks and-filesystemsDisks and-filesystems
Disks and-filesystems
 
Disks and-filesystems
Disks and-filesystemsDisks and-filesystems
Disks and-filesystems
 
Mass storage systemsos
Mass storage systemsosMass storage systemsos
Mass storage systemsos
 
What is the average rotational latency of this disk drive What seek.docx
 What is the average rotational latency of this disk drive  What seek.docx What is the average rotational latency of this disk drive  What seek.docx
What is the average rotational latency of this disk drive What seek.docx
 
CIT173_Ch15_Mnstr_23.pdf
CIT173_Ch15_Mnstr_23.pdfCIT173_Ch15_Mnstr_23.pdf
CIT173_Ch15_Mnstr_23.pdf
 
Hadoop Architecture
Hadoop ArchitectureHadoop Architecture
Hadoop Architecture
 
Zettabyte File Storage System
Zettabyte File Storage SystemZettabyte File Storage System
Zettabyte File Storage System
 
Zettabyte File Storage System
Zettabyte File Storage SystemZettabyte File Storage System
Zettabyte File Storage System
 
ch11
ch11ch11
ch11
 
Hadoop architecture (Delhi Hadoop User Group Meetup 10 Sep 2011)
Hadoop architecture (Delhi Hadoop User Group Meetup 10 Sep 2011)Hadoop architecture (Delhi Hadoop User Group Meetup 10 Sep 2011)
Hadoop architecture (Delhi Hadoop User Group Meetup 10 Sep 2011)
 
OSDC 2016 - Interesting things you can do with ZFS by Allan Jude&Benedict Reu...
OSDC 2016 - Interesting things you can do with ZFS by Allan Jude&Benedict Reu...OSDC 2016 - Interesting things you can do with ZFS by Allan Jude&Benedict Reu...
OSDC 2016 - Interesting things you can do with ZFS by Allan Jude&Benedict Reu...
 

Mehr von Dru Lavigne (18)

Olf2018
Olf2018Olf2018
Olf2018
 
Olf2017
Olf2017Olf2017
Olf2017
 
FreeBSD System Administration Using SysAdm
FreeBSD System Administration Using SysAdmFreeBSD System Administration Using SysAdm
FreeBSD System Administration Using SysAdm
 
Asiabsdcon2017
Asiabsdcon2017Asiabsdcon2017
Asiabsdcon2017
 
Olf2016
Olf2016Olf2016
Olf2016
 
Tlf2016
Tlf2016Tlf2016
Tlf2016
 
Knoxbug2016
Knoxbug2016Knoxbug2016
Knoxbug2016
 
Lfnw2016
Lfnw2016Lfnw2016
Lfnw2016
 
Scale2016
Scale2016Scale2016
Scale2016
 
Fossetcon15
Fossetcon15Fossetcon15
Fossetcon15
 
Lfnw15
Lfnw15Lfnw15
Lfnw15
 
Scale2015
Scale2015Scale2015
Scale2015
 
Olf2014
Olf2014Olf2014
Olf2014
 
Ghc14
Ghc14Ghc14
Ghc14
 
Dru lavigne oss-sysadmin
Dru lavigne oss-sysadminDru lavigne oss-sysadmin
Dru lavigne oss-sysadmin
 
Dru lavigne oss-desktop_apps
Dru lavigne oss-desktop_appsDru lavigne oss-desktop_apps
Dru lavigne oss-desktop_apps
 
Bsd ss
Bsd ssBsd ss
Bsd ss
 
Self2013
Self2013Self2013
Self2013
 

Kürzlich hochgeladen

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Kürzlich hochgeladen (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 

ZFS 101: An Introduction to the Powerful ZFS Filesystem

  • 1. ZFS 101 aka did you know that ZFS is cool and that you could be using it? Dru Lavigne Documentation Lead, iXsystems OLF, September 14, 2013
  • 2. Outline Discuss ZFS features and describe how these features are configured in the following operating systems: FreeNAS: open source NAS (Network Attached Storage) PC-BSD: open source desktop (GUI) or server (CLI) Latest versions of both operating systems use the most recent open source ZFS (v5000 or feature flags)
  • 3. What is ZFS? 128-bit COW (Copy on Write) filesystem and logical volume manager with a maximum pool/file size of 16 exabytes Unlike traditional Unix filesystems, you are not limited to the partition sizes and mount points defined at filesystem creation time Instead, disks are fed to a “pool” and the size of that pool can increase as the need for disk capacity increases (does require pre-planning)
  • 4. Pool Root (parent) volume which can be logically sub- divided as needed--can create one or multiple pools The number of disks added at a time is known as a “vdev” To optimize performance and resilvering time, number of disks per vdev is limited As more capacity is needed, add identical vdevs-- these will be striped into the pool
  • 5. RAIDZ RAIDZ* levels designed to overcome hardware RAID limitations such as the write-hole and corrupt data written over time before the controller provides an alert Designed for commodity disks so no RAID controller is needed Can also be used with a RAID controller, but it should be put in JBOD mode
  • 6. RAIDZ1 Parity blocks are distributed across all disks Up to one disk can fail per vdev without losing pool Pool can be lost if second disk in a vdev fails before resilver completes Optimized for vdev of 3, 5, or 9 disks
  • 7. RAIDZ2 Double-parity solution similar to RAID6 Parity blocks are distributed across all disks Up to two disks can fail per vdev without losing pool, with no restrictions on which disks can fail Optimized for vdev of 4, 6, or 10 disks
  • 8. RAIDZ3 Triple-parity solution Parity blocks are distributed across all disks Up to three disks can fail per vdev without losing pool, with no restrictions on which disks can fail Optimized for vdev of 5, 7, or 11 disks
  • 9. Create Pool on FreeNAS
  • 10. Create Pool on PC-BSD
  • 11. ZIL ZFS Intent Log Effectively a filesystem journal that manages writes A dedicated SSD as a secondary log device (SLOG) can increase synchronous write performance, will have no effect on asynchronous writes
  • 12. ARC ARC refers to read cache in RAM Expect a miss for random reads and a hit for cached reads Takes time for ARC to populate; if high misses continue for cached reads, the system needs to be tuned Freenas adds ARC stats to top(1) and includes arc_summary.py and arcstat.py tools for ARC monitoring
  • 13. L2ARC Optional, secondary ARC which can be installed on SSD or disk in order to increase random read performance Always add as much RAM as possible first L2ARC is populated over time with “hot” reads
  • 15. Datasets Pool can be divided into datasets Similar to a folder in that it supports permissions Similar to a filesystem in that you can set properties such as quotas and compression (built- in LZ4 compression is near real-time speed) A well thought out design can optimize storage for the type of data being stored
  • 16. Properties Dozens of configurable properties such as: atime (access time), canmount, compression, copies, dedup, exec, quota, userquota, groupquota, readonly, recordsize, reservation, setuid, etc. Descriptions can be found at http://www.freebsd.org/cgi/man.cgi?query=zfs
  • 17. Adding Dataset on FreeNAS
  • 19. Zvols Pool can also be divided into zvols Essentially, a virtual, raw block device Ideal for iSCSI device extents Regardless of the filesytem the zvol is formatted with by the iSCSI initiator, the underlying disk blocks still benefit from all of the features provided by ZFS
  • 20. Creating Zvols on FreeNAS
  • 21. Snapshots Provide read-only, point-in-time image of the specified pool, dataset, or zvol Snapshots can be recursive (atomic inclusion of all child datasets) Initial size is 0 bytes as COW, snapshot increases in size as changes are written to disk Can be replicated to another system
  • 22. Clones Provide read-write copies of read-only snapshots Initial size of clone is 0 bytes Clones can be mounted and used to access data from that point in time (e.g. to restore an earlier revision of a file)
  • 24. Create Snapshot on PC-BSD Using Warden
  • 25. Snapshot Restore In PC-BSD 9.2, the Life Preserver utility can be used to automate full system backups to another system running rsync+ssh, or to a FreeNAS system The backup can be used to perform an operating system restore from a PC-BSD install media, should the system become unusable
  • 27. Scrubs ZFS was designed to be self-healing; it creates and verifies checksums as data is written to disk A scrub verifies the checksum in each disk block and attempts to correct data as necessary I/O intensive so should be scheduled appropriately Reading the scrub results can provide an early indication of possible disk failure
  • 29. Deduplication Used to free blocks containing identical data (updates reference pointers) Can improve performance on datasets containing duplicate data (e.g. virtual images) Dedup tables should fit into L2ARC; systems with limited RAM or no L2ARC might freeze hard Recommended is at least 5 GB RAM/L2ARC per TB of storage to be deduplicated
  • 30. Boot Environments A snapshot of the dataset the operating system resides on can be taken before an upgrade or a system configuration change This saved “boot environment” is automatically added to the GRUB boot manager Should the upgrade or configuration change fail, simply reboot and select the previous boot environment from the boot menu
  • 33. Additional Resources PC-BSD Users Handbook: wiki.pcbsd.org FreeNAS User Guide: doc.freenas.org ZFS Best Practices Guide: http://ow.ly/oHtP3 Becoming a ZFS Ninja: https://blogs.oracle.com/video/entry/becoming_a_ zfs_ninja