SlideShare uma empresa Scribd logo
1 de 26
Baixar para ler offline
In ~ 30 Minutes

                             bill.hathaway@gmail.com



Thursday, January 14, 2010                             1
What is ZFS?
                        A modern take on storage

                        Safe - transaction based, checksums
                        Simple - 2 main commands
                        Efficient - share resources well
                        Dynamic - change on the fly


Thursday, January 14, 2010                                                                     2

Zettabyte is 2^70 bytes

ZFS was developed in response to dealing with 20+ years of complexity and limitations
around storage. Todays disk drives are a roughly a million times bigger than the first
hard disks. File systems have all sorts of whacky limitations like the number of inodes
or items in a directory. Sysadmins have to make choices about how much space to
assign to volumes and file systems and then later shrink or add space if they were
wrong. Troubleshooting physical hardware, logical volume managers, and file systems
increases complexity. Fsck times mean outages can that take hours or days.


With filesystems, safety is a hard constraint. ZFS provides safety through two mechanisms
a Copy-on-Write architecture that uses transactions to keep the on-disk format consistent
and checksums that can tell if any data is corrupted. If you have redundancy, then the
problem can be fixed. No FSCK is needed. Ever.

ZFS is easy to administer because it simplifies the administration model. There are only 2
main commands. Each of these have sub-commands, but the usage is consistent and tries to
be intuitive.

ZFS is efficient in that it uses a concept called pooled storage. This means that disk space
and disk bandwidth can be easily shared among multiple file systems.

Dynamic - storage can be added, new file systems created, or properties changed all while
running
Where can I use ZFS?


                                                               zfs-fuse.net




                             Nexenta                code.google.com/p/maczfs

Thursday, January 14, 2010                                                                   3

The operating systems on the left all support ZFS natively.


Apple originally was porting ZFS to OS X, but apparently there was an unsolved licensing
dispute and that is no longer the case. A group of enthusiasts are continuing to work with
the code to make it available to Mac users.
KQ Infotech announced they would be porting ZFS to Linux and maintaining the port.

Blog at kqinfotech.wordpress.com
ZFS Basic Terms
                       Volume - block device
                       File system - standard POSIX FS layer
                       Snapshot - read-only copy of a FS
                       Clone - read-write copy of a FS
                       Dataset - any of the 4 terms above
                       Pool - logical set of vdevs
                       VDev - block storage (redundancy done here)


Thursday, January 14, 2010                                                 4



ZFS volumes are typically used to support iSCSI luns or for swap devices
Copy-on-Write
          1. Initial tree blocks               2. CoW some blocks




        4. Rewrite uberblock                  3. CoW indirect blocks




Thursday, January 14, 2010                                                   5

Using the copy-on-write mechanism allows ZFS to operate very safely.

In this example, the original data blocks are blue, and new data is green.
Pooled Storage


                              Manage disks
                               more like
                                 RAM

Thursday, January 14, 2010                                                                     6

Pooled storage means that as you add storage to ZFS you don’t need to worry about micro-
managing it. The storage is made available to all the file systems using the pool, similar to
how when you add DIMMs to a system you don’t need to reconfigure anything.

No dimmconfig

No /etc/dimmtab

No fdimm

You can create multiple pools of storage per server.
Pooled Storage
                        Underlying storage is manipulated via zpool
                        # zpool create
                        # zpool list
                        # zpool status
                        # zpool add




Thursday, January 14, 2010                                                                 7

There are also additional sub-commands for tasks such as replacing drives or scrubbing
data.

Redundancy is handled at the pool level. When you create a pool you can add drives in a
striped fashion, as mirrors, or in a parity configuration similar to RAID5 or 6.

You can also have multiple pools per a machine. An example is where you have a pool
mirrored storage to support a high-performance database using 15k RPM disks and another
pool that uses slower SATA based storage in a RAID5 like configuration holding archived data.
Vdev Types
                                       Data Parity

                   Non-redundant                              Redundant

         Single disk                                Mirror



         Striped                                   RAIDZ


Thursday, January 14, 2010                                                                        8

Here we are showing the types of vdevs that can be used as building blocks for ZFS pools.

If we start with a single disk, we can expand it later either to a mirrored vdev by attaching a
disk or we could change to a striped configuration by adding a disk.

One common complaint with ZFS is that you can’t remove disks from striped or RAIDZ
configurations, even if you have plenty of available space. This will be remedied when a
feature called “block pointer rewrite” gets integrated.

There are double and triple parity versions of RAIDZ called RAIDZ2 and RAIDZ3.
Pooled Storage
                        # zpool create data mirror c1t0d0 c2t0d0
                        # zpool list data
            NAME             SIZE   ALLOC    FREE      CAP   DEDUP   HEALTH   ALTROOT
            data             496G    164K    496G       0%   1.00x   ONLINE   -

                       # df -h /data
       Filesystem                   size    used    avail capacity   Mounted on
       data                         488G     24K     488G     1%     /data




Thursday, January 14, 2010                                                                    9

Here we will create a pool consisting of mirrored storage and then run a zpool list command
to see how much space is available.

A file system mounted on the name of the pool will be available by default
Pooled Storage
             # zpool status
     pool: data
     state: ONLINE
     scrub: none requested
     config:
             NAME        STATE                      READ WRITE CKSUM
             data        ONLINE                        0     0     0
               mirror-0 ONLINE                         0     0     0
                  c1t0d0 ONLINE                        0     0     0
                  c2t0d0 ONLINE                        0     0     0

     errors: No known data errors



Thursday, January 14, 2010                                                                  10

The status command tells us which drives are part of the pool and if they have had any errors
Pooled Storage
                        # zpool create data mirror c1t0d0 c2t0d0
                        # zpool list data
          NAME                SIZE   ALLOC       FREE   CAP   DEDUP   HEALTH   ALTROOT
          data                496G    164K       496G    0%   1.00x   ONLINE   -

                             # zpool add data mirror c3t0d0 c4t0d0
                             # zpool list data
          NAME                SIZE   ALLOC       FREE   CAP   DEDUP   HEALTH   ALTROOT
          data                992G    164K       992G    0%   1.00x   ONLINE   -




Thursday, January 14, 2010                                                               11
Pooled Storage
             # zpool status
     pool: data
     state: ONLINE
     scrub: none requested
     config:
             NAME        STATE            READ WRITE CKSUM
             data        ONLINE              0     0     0
               mirror-0 ONLINE               0     0     0
                  c1t0d0 ONLINE              0     0     0
                  c2t0d0 ONLINE              0     0     0
                mirror-1 ONLINE              0     0     0
                  c3t0d0 ONLINE              0     0     0
                  c4t0d0 ONLINE              0     0     0

     errors: No known data errors




Thursday, January 14, 2010                                                                  12

The status command tells us which drives are part of the pool and if they have had any errors
Pool Evolution
                                        zpool create data c1t0d0

                                        zpool attach data c2t0d0

                                        zpool add data mirror 
                                            c3t0d0 c4t0d0

                                         zpool destroy data



Thursday, January 14, 2010                                                                  13

Here is an example where we start with a single disk.

Using the zpool attach command we can add a mirror to the original disk.

If we want more space or better performance, we can also add another pair of mirrored disks.

If we decide we are all done with the pool and want to remove all the data we can use the
zpool destroy command to free up the disks
File Systems
                        FS manipulation done via zfs command
                        # zfs create data/web
                        # zfs set compression=on data/web
                        # zfs snapshot data/web@before_upgrade
                        # zfs create data/home
                        # zfs create data/home/slaney




Thursday, January 14, 2010                                                          14

zfs has several sub commands, the most common used are create, set, get, and list
ZFS Properties
                        All objects have props that change behavior
                        Properties are typically inherited


                        # zfs set property=value $dataset
                        # zfs get <$propname|all> $dataset


                        # zfs set mountpoint=/apache data/web




Thursday, January 14, 2010                                            15

All ZFS objects have properties that can control their behavior.

Most inherit from their parent.
ZFS Properties
                        # zfs get all data/web
                        NAME       PROPERTY         VALUE                 SOURCE
                        data/web   type             filesystem            -
                        data/web   used             329M                  -
                        data/web   available        992G                  -
                        data/web   compressratio    1.75x                 -
                        data/web   quota            none                  default
                        data/web   mountpoint       /apache               local
                        data/web   checksum         on                    default
                        data/web   compression      on                    local
                        data/web   atime            off      inherited from data




Thursday, January 14, 2010                                                                   16

This example shows some properties for one of our file systems.
The first few lines contain read-only properties and can’t be set.
The compress ratio shows how much space is being saved by compression if it is active

We can see that the mountpoint is set to /apache and the source is local, meaning it is due to
a setting we did explicitly to this file system

Lower we can see that the atime property is disabled and that the source shows it is inherited
from a parent object
File Systems
                       # zfs list
                       NAME               USED    AVAIL    REFER    MOUNTPOINT

                       data               131K     488G      23K    /data

                       data/home           21K     488G      21K    /data/home

                       data/home/slaney    21K     488G      21K    /data/home/slaney

                       data/web            21K     488G      21K    /apache

                       # zfs set mountpoint=/home data/home
                       # zfs list | grep home
                       NAME                USED    AVAIL    REFER    MOUNTPOINT

                       data/home           21K     488G      21K    /home

                       data/home/slaney    21K     488G      21K    /home/slaney




Thursday, January 14, 2010                                                              17
ZFS File Systems
                        zfs set quota=10g data/home
                        zfs set compression=on data/home
                        zfs create data/postgres
                        zfs set reservation=50g data/postgres
                        zfs set atime=off data/home/slaney



Thursday, January 14, 2010                                      18
Snapshots
                        A read-only copy of a filesystem
                        Can be used to roll-back to a previous state
                        # zfs snapshot $fs@$name
                        # zfs snapshot data/web@pre_upgrade
                        # zfs snapshot data/web@post_upgrade
                        # zfs snapshot data/home@`date +%F`



Thursday, January 14, 2010                                             19
Managing Snapshots
                        # zfs list -t snapshot
                        NAME                    USED   AVAIL   REFER    MOUNTPOINT

                        data/web@pre_upgrade     19K    -        26K          -

                        data/web@post_upgrade    0      -        213M         -

                        data/home@2010-01-03     18k    -         17M         -

                        # zfs rollback data/web@post_upgrade
                        # zfs destroy data/home@2010-01-03


Thursday, January 14, 2010                                                           20
Clones
                        A clone is a read-write copy based on a
                        snapshot.


                        # zfs snapshot data/postgres@for_test
                        # zfs clone data/postgres@for_test data/pgtest
                        # zfs set mountpoint=/postgres2 data/pg_test



Thursday, January 14, 2010                                               21

Clones have a dependency on the snapshot they are built from.
Data Replication
                1. Take a snapshot
                        # zfs snapshot data/postgres@2009-12-31
                2. Use zfs send/recieve
                             # zfs send data/posgres@2009-12-31 | 
                                ssh $remote_host zfs receive $dataset
                3. Later .... use optional incremental update
                        # zfs snapshot data/postgres@2010-01-02
                        # zfs send -i data/postgres@2009-12-31 data/postgres@2010-01-02 | 
                                 ssh $remote_host zfs receive $dataset




Thursday, January 14, 2010                                                                    22

The zfs send/receive stream can be piped over SSH or your transport of choice

You can obviously also use rsync
De-Duplication
                        PAIN WARNING: Still in heavy development as of
                        2010/01/12
                        To activate:
                               # zfs set dedup=on $dataset
                        To view space savings:
                               # zpool list $dataset
                        NAME     SIZE   ALLOC   FREE   CAP   DEDUP   HEALTH   ALTROOT

                        tpool    136G   33.7G   102G   24%   3.16x   ONLINE   -




Thursday, January 14, 2010                                                              23
Solid State Disk
        Leverages SSD + standard drives
        SSD can be used as either (or both)
        • Write accelerator for intent log (ZIL)
        • 2nd level cache for reads (L2ARC)




Thursday, January 14, 2010                                                                      24

ZFS uses the best parts of hard disk drives (large capacity) and the best parts of SSDs (fast
access speed)

A SSD can also be partitioned so that a small portion is used for the intent log and a larger
section is used for L2ARC
ZFS in OpenSolaris

                    •        Packaging system is ZFS aware

                    •        OS upgrades works on a clone of /

                    •        Adds extra grub entry

                    •        Reboot into new OS rev

                    •        If trouble, just reboot and pick previous rev




Thursday, January 14, 2010                                                   25
ZFS Resources

                    • LMGTFY “ZFS best practice guide”
                    • LMGTFY “ZFS evil tuning guide”
                    • zfs-discuss @ opensolaris.org
                    • http://tinyurl.com/zfshome

Thursday, January 14, 2010                               26

Mais conteúdo relacionado

Mais procurados

A glimpse of cassandra 4.0 features netflix
A glimpse of cassandra 4.0 features   netflixA glimpse of cassandra 4.0 features   netflix
A glimpse of cassandra 4.0 features netflixVinay Kumar Chella
 
Lisa 2015-gluster fs-introduction
Lisa 2015-gluster fs-introductionLisa 2015-gluster fs-introduction
Lisa 2015-gluster fs-introductionGluster.org
 
Ceph Introduction 2017
Ceph Introduction 2017  Ceph Introduction 2017
Ceph Introduction 2017 Karan Singh
 
Argus Production Monitoring at Salesforce
Argus Production Monitoring at SalesforceArgus Production Monitoring at Salesforce
Argus Production Monitoring at SalesforceHBaseCon
 
Ceph Object Storage Performance Secrets and Ceph Data Lake Solution
Ceph Object Storage Performance Secrets and Ceph Data Lake SolutionCeph Object Storage Performance Secrets and Ceph Data Lake Solution
Ceph Object Storage Performance Secrets and Ceph Data Lake SolutionKaran Singh
 
Gluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & TricksGluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & TricksGlusterFS
 
Red Hat Gluster Storage Performance
Red Hat Gluster Storage PerformanceRed Hat Gluster Storage Performance
Red Hat Gluster Storage PerformanceRed_Hat_Storage
 
AWS RDS Benchmark - Instance comparison
AWS RDS Benchmark - Instance comparisonAWS RDS Benchmark - Instance comparison
AWS RDS Benchmark - Instance comparisonRoberto Gaiser
 
Comparison of MPP Data Warehouse Platforms
Comparison of MPP Data Warehouse PlatformsComparison of MPP Data Warehouse Platforms
Comparison of MPP Data Warehouse PlatformsDavid Portnoy
 
Xây dụng và kết hợp Kafka, Druid, Superset để đua vào ứng dụng phân tích dữ l...
Xây dụng và kết hợp Kafka, Druid, Superset để đua vào ứng dụng phân tích dữ l...Xây dụng và kết hợp Kafka, Druid, Superset để đua vào ứng dụng phân tích dữ l...
Xây dụng và kết hợp Kafka, Druid, Superset để đua vào ứng dụng phân tích dữ l...Đông Đô
 
DPDK layer for porting IPS-IDS
DPDK layer for porting IPS-IDSDPDK layer for porting IPS-IDS
DPDK layer for porting IPS-IDSVipin Varghese
 
Tuning PostgreSQL for High Write Throughput
Tuning PostgreSQL for High Write Throughput Tuning PostgreSQL for High Write Throughput
Tuning PostgreSQL for High Write Throughput Grant McAlister
 
Nick Fisk - low latency Ceph
Nick Fisk - low latency CephNick Fisk - low latency Ceph
Nick Fisk - low latency CephShapeBlue
 
The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchTe-Yen Liu
 
a Secure Public Cache for YARN Application Resources
a Secure Public Cache for YARN Application Resourcesa Secure Public Cache for YARN Application Resources
a Secure Public Cache for YARN Application ResourcesDataWorks Summit
 
Transparent Hugepages in RHEL 6
Transparent Hugepages in RHEL 6 Transparent Hugepages in RHEL 6
Transparent Hugepages in RHEL 6 Raghu Udiyar
 
Google cluster architecture
Google cluster architecture Google cluster architecture
Google cluster architecture Abhijeet Desai
 
Large scale overlay networks with ovn: problems and solutions
Large scale overlay networks with ovn: problems and solutionsLarge scale overlay networks with ovn: problems and solutions
Large scale overlay networks with ovn: problems and solutionsHan Zhou
 

Mais procurados (20)

A glimpse of cassandra 4.0 features netflix
A glimpse of cassandra 4.0 features   netflixA glimpse of cassandra 4.0 features   netflix
A glimpse of cassandra 4.0 features netflix
 
Lisa 2015-gluster fs-introduction
Lisa 2015-gluster fs-introductionLisa 2015-gluster fs-introduction
Lisa 2015-gluster fs-introduction
 
Storage basics
Storage basicsStorage basics
Storage basics
 
Ceph Introduction 2017
Ceph Introduction 2017  Ceph Introduction 2017
Ceph Introduction 2017
 
Argus Production Monitoring at Salesforce
Argus Production Monitoring at SalesforceArgus Production Monitoring at Salesforce
Argus Production Monitoring at Salesforce
 
Ceph Object Storage Performance Secrets and Ceph Data Lake Solution
Ceph Object Storage Performance Secrets and Ceph Data Lake SolutionCeph Object Storage Performance Secrets and Ceph Data Lake Solution
Ceph Object Storage Performance Secrets and Ceph Data Lake Solution
 
Gluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & TricksGluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & Tricks
 
Gcp data engineer
Gcp data engineerGcp data engineer
Gcp data engineer
 
Red Hat Gluster Storage Performance
Red Hat Gluster Storage PerformanceRed Hat Gluster Storage Performance
Red Hat Gluster Storage Performance
 
AWS RDS Benchmark - Instance comparison
AWS RDS Benchmark - Instance comparisonAWS RDS Benchmark - Instance comparison
AWS RDS Benchmark - Instance comparison
 
Comparison of MPP Data Warehouse Platforms
Comparison of MPP Data Warehouse PlatformsComparison of MPP Data Warehouse Platforms
Comparison of MPP Data Warehouse Platforms
 
Xây dụng và kết hợp Kafka, Druid, Superset để đua vào ứng dụng phân tích dữ l...
Xây dụng và kết hợp Kafka, Druid, Superset để đua vào ứng dụng phân tích dữ l...Xây dụng và kết hợp Kafka, Druid, Superset để đua vào ứng dụng phân tích dữ l...
Xây dụng và kết hợp Kafka, Druid, Superset để đua vào ứng dụng phân tích dữ l...
 
DPDK layer for porting IPS-IDS
DPDK layer for porting IPS-IDSDPDK layer for porting IPS-IDS
DPDK layer for porting IPS-IDS
 
Tuning PostgreSQL for High Write Throughput
Tuning PostgreSQL for High Write Throughput Tuning PostgreSQL for High Write Throughput
Tuning PostgreSQL for High Write Throughput
 
Nick Fisk - low latency Ceph
Nick Fisk - low latency CephNick Fisk - low latency Ceph
Nick Fisk - low latency Ceph
 
The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitch
 
a Secure Public Cache for YARN Application Resources
a Secure Public Cache for YARN Application Resourcesa Secure Public Cache for YARN Application Resources
a Secure Public Cache for YARN Application Resources
 
Transparent Hugepages in RHEL 6
Transparent Hugepages in RHEL 6 Transparent Hugepages in RHEL 6
Transparent Hugepages in RHEL 6
 
Google cluster architecture
Google cluster architecture Google cluster architecture
Google cluster architecture
 
Large scale overlay networks with ovn: problems and solutions
Large scale overlay networks with ovn: problems and solutionsLarge scale overlay networks with ovn: problems and solutions
Large scale overlay networks with ovn: problems and solutions
 

Destaque

ZFS Tutorial LISA 2011
ZFS Tutorial LISA 2011ZFS Tutorial LISA 2011
ZFS Tutorial LISA 2011Richard Elling
 
Zettabyte File Storage System
Zettabyte File Storage SystemZettabyte File Storage System
Zettabyte File Storage SystemAmdocs
 
ZFS Tutorial USENIX LISA09 Conference
ZFS Tutorial USENIX LISA09 ConferenceZFS Tutorial USENIX LISA09 Conference
ZFS Tutorial USENIX LISA09 ConferenceRichard Elling
 
Introduction to BTRFS and ZFS
Introduction to BTRFS and ZFSIntroduction to BTRFS and ZFS
Introduction to BTRFS and ZFSTsung-en Hsiao
 
ZFS: O sistema de arquivos do futuro - Por Fernando Massen
ZFS: O sistema de arquivos do futuro - Por Fernando MassenZFS: O sistema de arquivos do futuro - Por Fernando Massen
ZFS: O sistema de arquivos do futuro - Por Fernando MassenTchelinux
 
Btrfs by Chris Mason
Btrfs by Chris MasonBtrfs by Chris Mason
Btrfs by Chris MasonTerry Wang
 
Glusterfs 구성제안 및_운영가이드_v2.0
Glusterfs 구성제안 및_운영가이드_v2.0Glusterfs 구성제안 및_운영가이드_v2.0
Glusterfs 구성제안 및_운영가이드_v2.0sprdd
 
Flight control system
Flight control systemFlight control system
Flight control systemApoorv Anand
 
Thinking Outside the Sand[box]
Thinking Outside the Sand[box]Thinking Outside the Sand[box]
Thinking Outside the Sand[box]Juniper Networks
 
產業實習 網路產品行銷
產業實習   網路產品行銷產業實習   網路產品行銷
產業實習 網路產品行銷guest27c7fb
 
I Phone Challenge V01
I Phone Challenge V01I Phone Challenge V01
I Phone Challenge V01ericzapata
 
2-9 Adding and Subtracting Greater Whole Numbers
2-9 Adding and Subtracting Greater Whole Numbers2-9 Adding and Subtracting Greater Whole Numbers
2-9 Adding and Subtracting Greater Whole NumbersRudy Alfonso
 
Landscape, Building Facade, And Parking Lot
Landscape, Building Facade, And Parking LotLandscape, Building Facade, And Parking Lot
Landscape, Building Facade, And Parking LotLightman1
 

Destaque (20)

ZFS Tutorial LISA 2011
ZFS Tutorial LISA 2011ZFS Tutorial LISA 2011
ZFS Tutorial LISA 2011
 
Zettabyte File Storage System
Zettabyte File Storage SystemZettabyte File Storage System
Zettabyte File Storage System
 
ZFS Tutorial USENIX LISA09 Conference
ZFS Tutorial USENIX LISA09 ConferenceZFS Tutorial USENIX LISA09 Conference
ZFS Tutorial USENIX LISA09 Conference
 
Introduction to BTRFS and ZFS
Introduction to BTRFS and ZFSIntroduction to BTRFS and ZFS
Introduction to BTRFS and ZFS
 
GlusterFS
GlusterFSGlusterFS
GlusterFS
 
ZFS: O sistema de arquivos do futuro - Por Fernando Massen
ZFS: O sistema de arquivos do futuro - Por Fernando MassenZFS: O sistema de arquivos do futuro - Por Fernando Massen
ZFS: O sistema de arquivos do futuro - Por Fernando Massen
 
ZFS
ZFSZFS
ZFS
 
ZFS Talk Part 1
ZFS Talk Part 1ZFS Talk Part 1
ZFS Talk Part 1
 
freeNas
freeNasfreeNas
freeNas
 
Btrfs by Chris Mason
Btrfs by Chris MasonBtrfs by Chris Mason
Btrfs by Chris Mason
 
Glusterfs 구성제안 및_운영가이드_v2.0
Glusterfs 구성제안 및_운영가이드_v2.0Glusterfs 구성제안 및_운영가이드_v2.0
Glusterfs 구성제안 및_운영가이드_v2.0
 
Flocker
FlockerFlocker
Flocker
 
Zfs intro v2
Zfs intro v2Zfs intro v2
Zfs intro v2
 
Flight control system
Flight control systemFlight control system
Flight control system
 
Thinking Outside the Sand[box]
Thinking Outside the Sand[box]Thinking Outside the Sand[box]
Thinking Outside the Sand[box]
 
產業實習 網路產品行銷
產業實習   網路產品行銷產業實習   網路產品行銷
產業實習 網路產品行銷
 
I Phone Challenge V01
I Phone Challenge V01I Phone Challenge V01
I Phone Challenge V01
 
2-9 Adding and Subtracting Greater Whole Numbers
2-9 Adding and Subtracting Greater Whole Numbers2-9 Adding and Subtracting Greater Whole Numbers
2-9 Adding and Subtracting Greater Whole Numbers
 
Landscape, Building Facade, And Parking Lot
Landscape, Building Facade, And Parking LotLandscape, Building Facade, And Parking Lot
Landscape, Building Facade, And Parking Lot
 
Networking
NetworkingNetworking
Networking
 

Semelhante a ZFS: A Modern Take on Storage

Using ZFS file system with MySQL
Using ZFS file system with MySQLUsing ZFS file system with MySQL
Using ZFS file system with MySQLMydbops
 
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
 
ZFS Workshop
ZFS WorkshopZFS Workshop
ZFS WorkshopAPNIC
 
ZFS for Databases
ZFS for DatabasesZFS for Databases
ZFS for Databasesahl0003
 
SSD based storage tuning for databases
SSD based storage tuning for databasesSSD based storage tuning for databases
SSD based storage tuning for databasesAngelo Rajadurai
 
Database performance tuning for SSD based storage
Database  performance tuning for SSD based storageDatabase  performance tuning for SSD based storage
Database performance tuning for SSD based storageAngelo Rajadurai
 
Network Storage dan Filesystem.pdf
Network Storage dan Filesystem.pdfNetwork Storage dan Filesystem.pdf
Network Storage dan Filesystem.pdfTaseigerKu
 
Spinning Brown Donuts
Spinning Brown DonutsSpinning Brown Donuts
Spinning Brown DonutsDavid Pechon
 
Spinning Brown Donuts: Why Storage Still Counts
Spinning Brown Donuts: Why Storage Still CountsSpinning Brown Donuts: Why Storage Still Counts
Spinning Brown Donuts: Why Storage Still CountsSparkhound Inc.
 
Zettabyte File Storage System
Zettabyte File Storage SystemZettabyte File Storage System
Zettabyte File Storage SystemAmdocs
 
Lavigne bsdmag apr13
Lavigne bsdmag apr13Lavigne bsdmag apr13
Lavigne bsdmag apr13Dru Lavigne
 
Vancouver bug enterprise storage and zfs
Vancouver bug   enterprise storage and zfsVancouver bug   enterprise storage and zfs
Vancouver bug enterprise storage and zfsRami Jebara
 

Semelhante a ZFS: A Modern Take on Storage (20)

Using ZFS file system with MySQL
Using ZFS file system with MySQLUsing ZFS file system with MySQL
Using ZFS file system with MySQL
 
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...
 
Flourish16
Flourish16Flourish16
Flourish16
 
ZFS Workshop
ZFS WorkshopZFS Workshop
ZFS Workshop
 
Tlf2014
Tlf2014Tlf2014
Tlf2014
 
Scale2014
Scale2014Scale2014
Scale2014
 
Nycbsdcon14
Nycbsdcon14Nycbsdcon14
Nycbsdcon14
 
Asiabsdcon14
Asiabsdcon14Asiabsdcon14
Asiabsdcon14
 
Olf2013
Olf2013Olf2013
Olf2013
 
Posscon2013
Posscon2013Posscon2013
Posscon2013
 
Fossetcon14
Fossetcon14Fossetcon14
Fossetcon14
 
ZFS for Databases
ZFS for DatabasesZFS for Databases
ZFS for Databases
 
SSD based storage tuning for databases
SSD based storage tuning for databasesSSD based storage tuning for databases
SSD based storage tuning for databases
 
Database performance tuning for SSD based storage
Database  performance tuning for SSD based storageDatabase  performance tuning for SSD based storage
Database performance tuning for SSD based storage
 
Network Storage dan Filesystem.pdf
Network Storage dan Filesystem.pdfNetwork Storage dan Filesystem.pdf
Network Storage dan Filesystem.pdf
 
Spinning Brown Donuts
Spinning Brown DonutsSpinning Brown Donuts
Spinning Brown Donuts
 
Spinning Brown Donuts: Why Storage Still Counts
Spinning Brown Donuts: Why Storage Still CountsSpinning Brown Donuts: Why Storage Still Counts
Spinning Brown Donuts: Why Storage Still Counts
 
Zettabyte File Storage System
Zettabyte File Storage SystemZettabyte File Storage System
Zettabyte File Storage System
 
Lavigne bsdmag apr13
Lavigne bsdmag apr13Lavigne bsdmag apr13
Lavigne bsdmag apr13
 
Vancouver bug enterprise storage and zfs
Vancouver bug   enterprise storage and zfsVancouver bug   enterprise storage and zfs
Vancouver bug enterprise storage and zfs
 

Último

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
"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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
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
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 

Último (20)

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
"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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
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
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
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
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
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
 

ZFS: A Modern Take on Storage

  • 1. In ~ 30 Minutes bill.hathaway@gmail.com Thursday, January 14, 2010 1
  • 2. What is ZFS? A modern take on storage Safe - transaction based, checksums Simple - 2 main commands Efficient - share resources well Dynamic - change on the fly Thursday, January 14, 2010 2 Zettabyte is 2^70 bytes ZFS was developed in response to dealing with 20+ years of complexity and limitations around storage. Todays disk drives are a roughly a million times bigger than the first hard disks. File systems have all sorts of whacky limitations like the number of inodes or items in a directory. Sysadmins have to make choices about how much space to assign to volumes and file systems and then later shrink or add space if they were wrong. Troubleshooting physical hardware, logical volume managers, and file systems increases complexity. Fsck times mean outages can that take hours or days. With filesystems, safety is a hard constraint. ZFS provides safety through two mechanisms a Copy-on-Write architecture that uses transactions to keep the on-disk format consistent and checksums that can tell if any data is corrupted. If you have redundancy, then the problem can be fixed. No FSCK is needed. Ever. ZFS is easy to administer because it simplifies the administration model. There are only 2 main commands. Each of these have sub-commands, but the usage is consistent and tries to be intuitive. ZFS is efficient in that it uses a concept called pooled storage. This means that disk space and disk bandwidth can be easily shared among multiple file systems. Dynamic - storage can be added, new file systems created, or properties changed all while running
  • 3. Where can I use ZFS? zfs-fuse.net Nexenta code.google.com/p/maczfs Thursday, January 14, 2010 3 The operating systems on the left all support ZFS natively. Apple originally was porting ZFS to OS X, but apparently there was an unsolved licensing dispute and that is no longer the case. A group of enthusiasts are continuing to work with the code to make it available to Mac users. KQ Infotech announced they would be porting ZFS to Linux and maintaining the port. Blog at kqinfotech.wordpress.com
  • 4. ZFS Basic Terms Volume - block device File system - standard POSIX FS layer Snapshot - read-only copy of a FS Clone - read-write copy of a FS Dataset - any of the 4 terms above Pool - logical set of vdevs VDev - block storage (redundancy done here) Thursday, January 14, 2010 4 ZFS volumes are typically used to support iSCSI luns or for swap devices
  • 5. Copy-on-Write 1. Initial tree blocks 2. CoW some blocks 4. Rewrite uberblock 3. CoW indirect blocks Thursday, January 14, 2010 5 Using the copy-on-write mechanism allows ZFS to operate very safely. In this example, the original data blocks are blue, and new data is green.
  • 6. Pooled Storage Manage disks more like RAM Thursday, January 14, 2010 6 Pooled storage means that as you add storage to ZFS you don’t need to worry about micro- managing it. The storage is made available to all the file systems using the pool, similar to how when you add DIMMs to a system you don’t need to reconfigure anything. No dimmconfig No /etc/dimmtab No fdimm You can create multiple pools of storage per server.
  • 7. Pooled Storage Underlying storage is manipulated via zpool # zpool create # zpool list # zpool status # zpool add Thursday, January 14, 2010 7 There are also additional sub-commands for tasks such as replacing drives or scrubbing data. Redundancy is handled at the pool level. When you create a pool you can add drives in a striped fashion, as mirrors, or in a parity configuration similar to RAID5 or 6. You can also have multiple pools per a machine. An example is where you have a pool mirrored storage to support a high-performance database using 15k RPM disks and another pool that uses slower SATA based storage in a RAID5 like configuration holding archived data.
  • 8. Vdev Types Data Parity Non-redundant Redundant Single disk Mirror Striped RAIDZ Thursday, January 14, 2010 8 Here we are showing the types of vdevs that can be used as building blocks for ZFS pools. If we start with a single disk, we can expand it later either to a mirrored vdev by attaching a disk or we could change to a striped configuration by adding a disk. One common complaint with ZFS is that you can’t remove disks from striped or RAIDZ configurations, even if you have plenty of available space. This will be remedied when a feature called “block pointer rewrite” gets integrated. There are double and triple parity versions of RAIDZ called RAIDZ2 and RAIDZ3.
  • 9. Pooled Storage # zpool create data mirror c1t0d0 c2t0d0 # zpool list data NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT data 496G 164K 496G 0% 1.00x ONLINE - # df -h /data Filesystem size used avail capacity Mounted on data 488G 24K 488G 1% /data Thursday, January 14, 2010 9 Here we will create a pool consisting of mirrored storage and then run a zpool list command to see how much space is available. A file system mounted on the name of the pool will be available by default
  • 10. Pooled Storage # zpool status pool: data state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM data ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c1t0d0 ONLINE 0 0 0 c2t0d0 ONLINE 0 0 0 errors: No known data errors Thursday, January 14, 2010 10 The status command tells us which drives are part of the pool and if they have had any errors
  • 11. Pooled Storage # zpool create data mirror c1t0d0 c2t0d0 # zpool list data NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT data 496G 164K 496G 0% 1.00x ONLINE - # zpool add data mirror c3t0d0 c4t0d0 # zpool list data NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT data 992G 164K 992G 0% 1.00x ONLINE - Thursday, January 14, 2010 11
  • 12. Pooled Storage # zpool status pool: data state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM data ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c1t0d0 ONLINE 0 0 0 c2t0d0 ONLINE 0 0 0 mirror-1 ONLINE 0 0 0 c3t0d0 ONLINE 0 0 0 c4t0d0 ONLINE 0 0 0 errors: No known data errors Thursday, January 14, 2010 12 The status command tells us which drives are part of the pool and if they have had any errors
  • 13. Pool Evolution zpool create data c1t0d0 zpool attach data c2t0d0 zpool add data mirror c3t0d0 c4t0d0 zpool destroy data Thursday, January 14, 2010 13 Here is an example where we start with a single disk. Using the zpool attach command we can add a mirror to the original disk. If we want more space or better performance, we can also add another pair of mirrored disks. If we decide we are all done with the pool and want to remove all the data we can use the zpool destroy command to free up the disks
  • 14. File Systems FS manipulation done via zfs command # zfs create data/web # zfs set compression=on data/web # zfs snapshot data/web@before_upgrade # zfs create data/home # zfs create data/home/slaney Thursday, January 14, 2010 14 zfs has several sub commands, the most common used are create, set, get, and list
  • 15. ZFS Properties All objects have props that change behavior Properties are typically inherited # zfs set property=value $dataset # zfs get <$propname|all> $dataset # zfs set mountpoint=/apache data/web Thursday, January 14, 2010 15 All ZFS objects have properties that can control their behavior. Most inherit from their parent.
  • 16. ZFS Properties # zfs get all data/web NAME PROPERTY VALUE SOURCE data/web type filesystem - data/web used 329M - data/web available 992G - data/web compressratio 1.75x - data/web quota none default data/web mountpoint /apache local data/web checksum on default data/web compression on local data/web atime off inherited from data Thursday, January 14, 2010 16 This example shows some properties for one of our file systems. The first few lines contain read-only properties and can’t be set. The compress ratio shows how much space is being saved by compression if it is active We can see that the mountpoint is set to /apache and the source is local, meaning it is due to a setting we did explicitly to this file system Lower we can see that the atime property is disabled and that the source shows it is inherited from a parent object
  • 17. File Systems # zfs list NAME USED AVAIL REFER MOUNTPOINT data 131K 488G 23K /data data/home 21K 488G 21K /data/home data/home/slaney 21K 488G 21K /data/home/slaney data/web 21K 488G 21K /apache # zfs set mountpoint=/home data/home # zfs list | grep home NAME USED AVAIL REFER MOUNTPOINT data/home 21K 488G 21K /home data/home/slaney 21K 488G 21K /home/slaney Thursday, January 14, 2010 17
  • 18. ZFS File Systems zfs set quota=10g data/home zfs set compression=on data/home zfs create data/postgres zfs set reservation=50g data/postgres zfs set atime=off data/home/slaney Thursday, January 14, 2010 18
  • 19. Snapshots A read-only copy of a filesystem Can be used to roll-back to a previous state # zfs snapshot $fs@$name # zfs snapshot data/web@pre_upgrade # zfs snapshot data/web@post_upgrade # zfs snapshot data/home@`date +%F` Thursday, January 14, 2010 19
  • 20. Managing Snapshots # zfs list -t snapshot NAME USED AVAIL REFER MOUNTPOINT data/web@pre_upgrade 19K - 26K - data/web@post_upgrade 0 - 213M - data/home@2010-01-03 18k - 17M - # zfs rollback data/web@post_upgrade # zfs destroy data/home@2010-01-03 Thursday, January 14, 2010 20
  • 21. Clones A clone is a read-write copy based on a snapshot. # zfs snapshot data/postgres@for_test # zfs clone data/postgres@for_test data/pgtest # zfs set mountpoint=/postgres2 data/pg_test Thursday, January 14, 2010 21 Clones have a dependency on the snapshot they are built from.
  • 22. Data Replication 1. Take a snapshot # zfs snapshot data/postgres@2009-12-31 2. Use zfs send/recieve # zfs send data/posgres@2009-12-31 | ssh $remote_host zfs receive $dataset 3. Later .... use optional incremental update # zfs snapshot data/postgres@2010-01-02 # zfs send -i data/postgres@2009-12-31 data/postgres@2010-01-02 | ssh $remote_host zfs receive $dataset Thursday, January 14, 2010 22 The zfs send/receive stream can be piped over SSH or your transport of choice You can obviously also use rsync
  • 23. De-Duplication PAIN WARNING: Still in heavy development as of 2010/01/12 To activate: # zfs set dedup=on $dataset To view space savings: # zpool list $dataset NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT tpool 136G 33.7G 102G 24% 3.16x ONLINE - Thursday, January 14, 2010 23
  • 24. Solid State Disk Leverages SSD + standard drives SSD can be used as either (or both) • Write accelerator for intent log (ZIL) • 2nd level cache for reads (L2ARC) Thursday, January 14, 2010 24 ZFS uses the best parts of hard disk drives (large capacity) and the best parts of SSDs (fast access speed) A SSD can also be partitioned so that a small portion is used for the intent log and a larger section is used for L2ARC
  • 25. ZFS in OpenSolaris • Packaging system is ZFS aware • OS upgrades works on a clone of / • Adds extra grub entry • Reboot into new OS rev • If trouble, just reboot and pick previous rev Thursday, January 14, 2010 25
  • 26. ZFS Resources • LMGTFY “ZFS best practice guide” • LMGTFY “ZFS evil tuning guide” • zfs-discuss @ opensolaris.org • http://tinyurl.com/zfshome Thursday, January 14, 2010 26