Print this page
5882 Temporary pool names
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
   1 ZPOOL(1M)                    Maintenance Commands                    ZPOOL(1M)
   2 
   3 NAME
   4      zpool - configure ZFS storage pools
   5 
   6 SYNOPSIS
   7      zpool -?
   8      zpool add [-fn] pool vdev...
   9      zpool attach [-f] pool device new_device
  10      zpool checkpoint [-d, --discard] pool
  11      zpool clear pool [device]
  12      zpool create [-dfn] [-B] [-m mountpoint] [-o property=value]...
  13            [-O file-system-property=value]... [-R root] pool vdev...

  14      zpool destroy [-f] pool
  15      zpool detach pool device
  16      zpool export [-f] pool...
  17      zpool get [-Hp] [-o field[,field]...] all|property[,property]... pool...
  18      zpool history [-il] [pool]...
  19      zpool import [-D] [-d dir]
  20      zpool import -a [-DfmN] [-F [-n]] [-c cachefile|-d dir] [-o mntopts]
  21            [-o property=value]... [-R root]
  22      zpool import [-Dfm] [-F [-n]] [--rewind-to-checkpoint]
  23            [-c cachefile|-d dir] [-o mntopts] [-o property=value]... [-R root]
  24            pool|id [newpool]
  25      zpool initialize [-cs] pool [device...]
  26      zpool iostat [-v] [-T u|d] [pool]... [interval [count]]
  27      zpool labelclear [-f] device
  28      zpool list [-Hpv] [-o property[,property]...] [-T u|d] [pool]...
  29            [interval [count]]
  30      zpool offline [-t] pool device...
  31      zpool online [-e] pool device...
  32      zpool reguid pool
  33      zpool reopen pool
  34      zpool remove [-np] pool device...
  35      zpool remove -s pool
  36      zpool replace [-f] pool device [new_device]
  37      zpool scrub [-s | -p] pool...
  38      zpool set property=value pool
  39      zpool split [-n] [-o property=value]... [-R root] pool newpool
  40      zpool status [-Dvx] [-T u|d] [pool]... [interval [count]]
  41      zpool upgrade
  42      zpool upgrade -v


 523              Checkpoints the current state of pool , which can be later
 524              restored by zpool import --rewind-to-checkpoint.  The existence
 525              of a checkpoint in a pool prohibits the following zpool commands:
 526              remove, attach, detach, split, and reguid.  In addition, it may
 527              break reservation boundaries if the pool lacks free space.  The
 528              zpool status command indicates the existence of a checkpoint or
 529              the progress of discarding a checkpoint from a pool.  The zpool
 530              list command reports how much space the checkpoint takes from the
 531              pool.
 532 
 533              -d, --discard
 534                      Discards an existing checkpoint from pool.
 535 
 536      zpool clear pool [device]
 537              Clears device errors in a pool.  If no arguments are specified,
 538              all device errors within the pool are cleared.  If one or more
 539              devices is specified, only those errors associated with the
 540              specified device or devices are cleared.
 541 
 542      zpool create [-dfn] [-B] [-m mountpoint] [-o property=value]... [-O
 543              file-system-property=value]... [-R root] pool vdev...

 544              Creates a new storage pool containing the virtual devices
 545              specified on the command line.  The pool name must begin with a
 546              letter, and can only contain alphanumeric characters as well as
 547              underscore ("_"), dash ("-"), and period (".").  The pool names
 548              mirror, raidz, spare and log are reserved, as are names beginning
 549              with the pattern c[0-9].  The vdev specification is described in
 550              the Virtual Devices section.
 551 
 552              The command verifies that each device specified is accessible and
 553              not currently in use by another subsystem.  There are some uses,
 554              such as being currently mounted, or specified as the dedicated
 555              dump device, that prevents a device from ever being used by ZFS.
 556              Other uses, such as having a preexisting UFS file system, can be
 557              overridden with the -f option.
 558 
 559              The command also checks that the replication strategy for the
 560              pool is consistent.  An attempt to combine redundant and non-
 561              redundant storage in a single pool, or to mix disks and files,
 562              results in an error unless -f is specified.  The use of
 563              differently sized devices within a single raidz or mirror group


 593                      legacy, or none.  For more information on dataset mount
 594                      points, see zfs(1M).
 595 
 596              -n      Displays the configuration that would be used without
 597                      actually creating the pool.  The actual pool creation can
 598                      still fail due to insufficient privileges or device
 599                      sharing.
 600 
 601              -o property=value
 602                      Sets the given pool properties.  See the Properties
 603                      section for a list of valid properties that can be set.
 604 
 605              -O file-system-property=value
 606                      Sets the given file system properties in the root file
 607                      system of the pool.  See the Properties section of
 608                      zfs(1M) for a list of valid properties that can be set.
 609 
 610              -R root
 611                      Equivalent to -o cachefile=none -o altroot=root
 612 









 613      zpool destroy [-f] pool
 614              Destroys the given pool, freeing up any devices for other use.
 615              This command tries to unmount any active datasets before
 616              destroying the pool.
 617 
 618              -f      Forces any active datasets contained within the pool to
 619                      be unmounted.
 620 
 621      zpool detach pool device
 622              Detaches device from a mirror.  The operation is refused if there
 623              are no other valid replicas of the data.
 624 
 625      zpool export [-f] pool...
 626              Exports the given pools from the system.  All devices are marked
 627              as exported, but are still considered in use by other subsystems.
 628              The devices can be moved between systems (even those of different
 629              endianness) and imported as long as a sufficient number of
 630              devices are present.
 631 
 632              Before exporting the pool, all datasets within the pool are


 746                      does not actually perform the pool recovery.  For more
 747                      details about pool recovery mode, see the -F option,
 748                      above.
 749 
 750              -N      Import the pool without mounting any file systems.
 751 
 752              -o mntopts
 753                      Comma-separated list of mount options to use when
 754                      mounting datasets within the pool.  See zfs(1M) for a
 755                      description of dataset properties and mount options.
 756 
 757              -o property=value
 758                      Sets the specified property on the imported pool.  See
 759                      the Properties section for more information on the
 760                      available pool properties.
 761 
 762              -R root
 763                      Sets the cachefile property to none and the altroot
 764                      property to root.
 765 
 766      zpool import [-Dfm] [-F [-n]] [--rewind-to-checkpoint] [-c cachefile|-d
 767              dir] [-o mntopts] [-o property=value]... [-R root] pool|id
 768              [newpool]
 769              Imports a specific pool.  A pool can be identified by its name or
 770              the numeric identifier.  If newpool is specified, the pool is
 771              imported using the name newpool.  Otherwise, it is imported with
 772              the same name as its exported name.
 773 
 774              If a device is removed from a system without running zpool export
 775              first, the device appears as potentially active.  It cannot be
 776              determined if this was a failed export, or whether the device is
 777              really in use from another host.  To import a pool in this state,
 778              the -f option is required.
 779 
 780              -c cachefile
 781                      Reads configuration from the given cachefile that was
 782                      created with the cachefile pool property.  This cachefile
 783                      is used instead of searching for devices.
 784 
 785              -d dir  Searches for devices or files in dir.  The -d option can
 786                      be specified multiple times.  This option is incompatible


 806              -n      Used with the -F recovery option.  Determines whether a
 807                      non-importable pool can be made importable again, but
 808                      does not actually perform the pool recovery.  For more
 809                      details about pool recovery mode, see the -F option,
 810                      above.
 811 
 812              -o mntopts
 813                      Comma-separated list of mount options to use when
 814                      mounting datasets within the pool.  See zfs(1M) for a
 815                      description of dataset properties and mount options.
 816 
 817              -o property=value
 818                      Sets the specified property on the imported pool.  See
 819                      the Properties section for more information on the
 820                      available pool properties.
 821 
 822              -R root
 823                      Sets the cachefile property to none and the altroot
 824                      property to root.
 825 






 826              --rewind-to-checkpoint
 827                      Rewinds pool to the checkpointed state.  Once the pool is
 828                      imported with this flag there is no way to undo the
 829                      rewind.  All changes and data that were written after the
 830                      checkpoint are lost!  The only exception is when the
 831                      readonly mounting option is enabled.  In this case, the
 832                      checkpointed state of the pool is opened and an
 833                      administrator can see how the pool would look like if
 834                      they were to fully rewind.
 835 
 836      zpool initialize [-cs] pool [device...]
 837              Begins initializing by writing to all unallocated regions on the
 838              specified devices, or all eligible devices in the pool if no
 839              individual devices are specified.  Only leaf data or log devices
 840              may be initialized.
 841 
 842              -c, --cancel
 843                      Cancel initializing on the specified devices, or all
 844                      eligible devices if none are specified.  If one or more
 845                      target devices are invalid or are not currently being


   1 ZPOOL(1M)                    Maintenance Commands                    ZPOOL(1M)
   2 
   3 NAME
   4      zpool - configure ZFS storage pools
   5 
   6 SYNOPSIS
   7      zpool -?
   8      zpool add [-fn] pool vdev...
   9      zpool attach [-f] pool device new_device
  10      zpool checkpoint [-d, --discard] pool
  11      zpool clear pool [device]
  12      zpool create [-dfn] [-B] [-m mountpoint] [-o property=value]...
  13            [-O file-system-property=value]... [-R root] [-t tempname]
  14            pool vdev...
  15      zpool destroy [-f] pool
  16      zpool detach pool device
  17      zpool export [-f] pool...
  18      zpool get [-Hp] [-o field[,field]...] all|property[,property]... pool...
  19      zpool history [-il] [pool]...
  20      zpool import [-D] [-d dir]
  21      zpool import -a [-DfmN] [-F [-n]] [-c cachefile|-d dir] [-o mntopts]
  22            [-o property=value]... [-R root]
  23      zpool import [-Dfmt] [-F [-n]] [--rewind-to-checkpoint]
  24            [-c cachefile|-d dir] [-o mntopts] [-o property=value]... [-R root]
  25            pool|id [newpool]
  26      zpool initialize [-cs] pool [device...]
  27      zpool iostat [-v] [-T u|d] [pool]... [interval [count]]
  28      zpool labelclear [-f] device
  29      zpool list [-Hpv] [-o property[,property]...] [-T u|d] [pool]...
  30            [interval [count]]
  31      zpool offline [-t] pool device...
  32      zpool online [-e] pool device...
  33      zpool reguid pool
  34      zpool reopen pool
  35      zpool remove [-np] pool device...
  36      zpool remove -s pool
  37      zpool replace [-f] pool device [new_device]
  38      zpool scrub [-s | -p] pool...
  39      zpool set property=value pool
  40      zpool split [-n] [-o property=value]... [-R root] pool newpool
  41      zpool status [-Dvx] [-T u|d] [pool]... [interval [count]]
  42      zpool upgrade
  43      zpool upgrade -v


 524              Checkpoints the current state of pool , which can be later
 525              restored by zpool import --rewind-to-checkpoint.  The existence
 526              of a checkpoint in a pool prohibits the following zpool commands:
 527              remove, attach, detach, split, and reguid.  In addition, it may
 528              break reservation boundaries if the pool lacks free space.  The
 529              zpool status command indicates the existence of a checkpoint or
 530              the progress of discarding a checkpoint from a pool.  The zpool
 531              list command reports how much space the checkpoint takes from the
 532              pool.
 533 
 534              -d, --discard
 535                      Discards an existing checkpoint from pool.
 536 
 537      zpool clear pool [device]
 538              Clears device errors in a pool.  If no arguments are specified,
 539              all device errors within the pool are cleared.  If one or more
 540              devices is specified, only those errors associated with the
 541              specified device or devices are cleared.
 542 
 543      zpool create [-dfn] [-B] [-m mountpoint] [-o property=value]... [-O
 544              file-system-property=value]... [-R root] [-t tempname] pool
 545              vdev...
 546              Creates a new storage pool containing the virtual devices
 547              specified on the command line.  The pool name must begin with a
 548              letter, and can only contain alphanumeric characters as well as
 549              underscore ("_"), dash ("-"), and period (".").  The pool names
 550              mirror, raidz, spare and log are reserved, as are names beginning
 551              with the pattern c[0-9].  The vdev specification is described in
 552              the Virtual Devices section.
 553 
 554              The command verifies that each device specified is accessible and
 555              not currently in use by another subsystem.  There are some uses,
 556              such as being currently mounted, or specified as the dedicated
 557              dump device, that prevents a device from ever being used by ZFS.
 558              Other uses, such as having a preexisting UFS file system, can be
 559              overridden with the -f option.
 560 
 561              The command also checks that the replication strategy for the
 562              pool is consistent.  An attempt to combine redundant and non-
 563              redundant storage in a single pool, or to mix disks and files,
 564              results in an error unless -f is specified.  The use of
 565              differently sized devices within a single raidz or mirror group


 595                      legacy, or none.  For more information on dataset mount
 596                      points, see zfs(1M).
 597 
 598              -n      Displays the configuration that would be used without
 599                      actually creating the pool.  The actual pool creation can
 600                      still fail due to insufficient privileges or device
 601                      sharing.
 602 
 603              -o property=value
 604                      Sets the given pool properties.  See the Properties
 605                      section for a list of valid properties that can be set.
 606 
 607              -O file-system-property=value
 608                      Sets the given file system properties in the root file
 609                      system of the pool.  See the Properties section of
 610                      zfs(1M) for a list of valid properties that can be set.
 611 
 612              -R root
 613                      Equivalent to -o cachefile=none -o altroot=root
 614 
 615              -t tempname
 616                      Sets the in-core pool name to tempname while the on-disk
 617                      name will be the name specified as the pool name pool.
 618                      This will set the default cachefile property to none.
 619                      This is intended to handle name space collisions when
 620                      creating pools for other systems, such as virtual
 621                      machines or physical machines whose pools live on network
 622                      block devices.
 623 
 624      zpool destroy [-f] pool
 625              Destroys the given pool, freeing up any devices for other use.
 626              This command tries to unmount any active datasets before
 627              destroying the pool.
 628 
 629              -f      Forces any active datasets contained within the pool to
 630                      be unmounted.
 631 
 632      zpool detach pool device
 633              Detaches device from a mirror.  The operation is refused if there
 634              are no other valid replicas of the data.
 635 
 636      zpool export [-f] pool...
 637              Exports the given pools from the system.  All devices are marked
 638              as exported, but are still considered in use by other subsystems.
 639              The devices can be moved between systems (even those of different
 640              endianness) and imported as long as a sufficient number of
 641              devices are present.
 642 
 643              Before exporting the pool, all datasets within the pool are


 757                      does not actually perform the pool recovery.  For more
 758                      details about pool recovery mode, see the -F option,
 759                      above.
 760 
 761              -N      Import the pool without mounting any file systems.
 762 
 763              -o mntopts
 764                      Comma-separated list of mount options to use when
 765                      mounting datasets within the pool.  See zfs(1M) for a
 766                      description of dataset properties and mount options.
 767 
 768              -o property=value
 769                      Sets the specified property on the imported pool.  See
 770                      the Properties section for more information on the
 771                      available pool properties.
 772 
 773              -R root
 774                      Sets the cachefile property to none and the altroot
 775                      property to root.
 776 
 777      zpool import [-Dfmt] [-F [-n]] [--rewind-to-checkpoint] [-c cachefile|-d
 778              dir] [-o mntopts] [-o property=value]... [-R root] pool|id
 779              [newpool]
 780              Imports a specific pool.  A pool can be identified by its name or
 781              the numeric identifier.  If newpool is specified, the pool is
 782              imported using the name newpool.  Otherwise, it is imported with
 783              the same name as its exported name.
 784 
 785              If a device is removed from a system without running zpool export
 786              first, the device appears as potentially active.  It cannot be
 787              determined if this was a failed export, or whether the device is
 788              really in use from another host.  To import a pool in this state,
 789              the -f option is required.
 790 
 791              -c cachefile
 792                      Reads configuration from the given cachefile that was
 793                      created with the cachefile pool property.  This cachefile
 794                      is used instead of searching for devices.
 795 
 796              -d dir  Searches for devices or files in dir.  The -d option can
 797                      be specified multiple times.  This option is incompatible


 817              -n      Used with the -F recovery option.  Determines whether a
 818                      non-importable pool can be made importable again, but
 819                      does not actually perform the pool recovery.  For more
 820                      details about pool recovery mode, see the -F option,
 821                      above.
 822 
 823              -o mntopts
 824                      Comma-separated list of mount options to use when
 825                      mounting datasets within the pool.  See zfs(1M) for a
 826                      description of dataset properties and mount options.
 827 
 828              -o property=value
 829                      Sets the specified property on the imported pool.  See
 830                      the Properties section for more information on the
 831                      available pool properties.
 832 
 833              -R root
 834                      Sets the cachefile property to none and the altroot
 835                      property to root.
 836 
 837              -t      Used with newpool.  Specifies that newpool is temporary.
 838                      Temporary pool names last until export.  Ensures that the
 839                      original pool name will be used in all label updates and
 840                      therefore is retained upon export.  Will also set
 841                      cachefile property to none when not explicitly specified.
 842 
 843              --rewind-to-checkpoint
 844                      Rewinds pool to the checkpointed state.  Once the pool is
 845                      imported with this flag there is no way to undo the
 846                      rewind.  All changes and data that were written after the
 847                      checkpoint are lost!  The only exception is when the
 848                      readonly mounting option is enabled.  In this case, the
 849                      checkpointed state of the pool is opened and an
 850                      administrator can see how the pool would look like if
 851                      they were to fully rewind.
 852 
 853      zpool initialize [-cs] pool [device...]
 854              Begins initializing by writing to all unallocated regions on the
 855              specified devices, or all eligible devices in the pool if no
 856              individual devices are specified.  Only leaf data or log devices
 857              may be initialized.
 858 
 859              -c, --cancel
 860                      Cancel initializing on the specified devices, or all
 861                      eligible devices if none are specified.  If one or more
 862                      target devices are invalid or are not currently being