SlideShare uma empresa Scribd logo
1 de 34
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados (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
 

Semelhante a Olf2013

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
 

Semelhante a Olf2013 (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...
 

Mais de 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
 

Último

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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)wesley chun
 
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 educationjfdjdjcjdnsjd
 
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 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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...Neo4j
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
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 Takeoffsammart93
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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 WorkerThousandEyes
 
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 RobisonAnna Loughnan Colquhoun
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
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.pdfsudhanshuwaghmare1
 

Último (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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)
 
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
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 

Olf2013

  • 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