The translation is temporarily closed for contributions due to maintenance, please come back later.

Translation

(itstool) path: sect2/title
English
Adding and Removing Devices
Context English Chinese (Simplified) (zh_CN) State
<prompt>#</prompt> <userinput>zpool status storage</userinput>
pool: storage
state: ONLINE
scrub: scrub completed with 0 errors on Sat Jan 26 19:57:37 2013
config:

NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1 ONLINE 0 0 0
da0 ONLINE 0 0 0
da1 ONLINE 0 0 0
da2 ONLINE 0 0 0

errors: No known data errors
<prompt>#</prompt> <userinput>zpool status storage</userinput>
pool: storage
state: ONLINE
scrub: scrub completed with 0 errors on Sat Jan 26 19:57:37 2013
config:

NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1 ONLINE 0 0 0
da0 ONLINE 0 0 0
da1 ONLINE 0 0 0
da2 ONLINE 0 0 0

errors: No known data errors
The completion date of the last scrub operation is displayed to help track when another scrub is required. Routine scrubs help protect data from silent corruption and ensure the integrity of the pool. 查询结果会显示上次清理时间来协助判断是否还需要清理,定期清理可以确保数据完整性。
Refer to <citerefentry><refentrytitle>zfs</refentrytitle><manvolnum>8</manvolnum></citerefentry> and <citerefentry><refentrytitle>zpool</refentrytitle><manvolnum>8</manvolnum></citerefentry> for other <acronym>ZFS</acronym> options. 请参考 <citerefentry><refentrytitle>zfs</refentrytitle><manvolnum>8</manvolnum></citerefentry> 和 <citerefentry><refentrytitle>zpool</refentrytitle><manvolnum>8</manvolnum></citerefentry> 来获取 <acronym>ZFS</acronym> 更多操作。
<command>zpool</command> Administration <command>zpool</command> 管理
<acronym>ZFS</acronym> administration is divided between two main utilities. The <command>zpool</command> utility controls the operation of the pool and deals with adding, removing, replacing, and managing disks. The <link linkend="zfs-zfs"><command>zfs</command></link> utility deals with creating, destroying, and managing datasets, both <link linkend="zfs-term-filesystem">file systems</link> and <link linkend="zfs-term-volume">volumes</link>. <acronym>ZFS</acronym> 管理主要用两个工具。<command>zpool</command> 工具来控制存储池运行并可智力磁盘的新增,移除更新与管理。<link linkend="zfs-zfs"><command>zfs</command></link> 工具用来建立,删除与管理文件系统(<link linkend="zfs-term-filesystem">file systems</link>)与磁盘卷 <link linkend="zfs-term-volume">volumes</link> 的数据集。
Creating and Destroying Storage Pools 创建与删除存储池
Creating a <acronym>ZFS</acronym> storage pool (<emphasis>zpool</emphasis>) involves making a number of decisions that are relatively permanent because the structure of the pool cannot be changed after the pool has been created. The most important decision is what types of vdevs into which to group the physical disks. See the list of <link linkend="zfs-term-vdev">vdev types</link> for details about the possible options. After the pool has been created, most vdev types do not allow additional disks to be added to the vdev. The exceptions are mirrors, which allow additional disks to be added to the vdev, and stripes, which can be upgraded to mirrors by attaching an additional disk to the vdev. Although additional vdevs can be added to expand a pool, the layout of the pool cannot be changed after pool creation. Instead, the data must be backed up and the pool destroyed and recreated. 创建一个<acronym>ZFS</acronym> 存储池(<emphasis>zpool</emphasis>)要提前做好几个长远决定。因为存储池的结构建立以后无法再次更改。最重要的决定是哪一种vdev型号。
Create a simple mirror pool: 创建一个简单的存储池:
<prompt>#</prompt> <userinput>zpool create <replaceable>mypool</replaceable> mirror <replaceable>/dev/ada1</replaceable> <replaceable>/dev/ada2</replaceable></userinput>
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0

errors: No known data errors
<prompt>#</prompt> <userinput>zpool create <replaceable>mypool</replaceable> mirror <replaceable>/dev/ada1</replaceable> <replaceable>/dev/ada2</replaceable></userinput>
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0

errors: No known data errors
Multiple vdevs can be created at once. Specify multiple groups of disks separated by the vdev type keyword, <literal>mirror</literal> in this example: 可以一次性创建多个vdev,磁盘组之间使用vdev类型关键字区分,在这个例子中用<literal>mirror</literal>:
<prompt>#</prompt> <userinput>zpool create <replaceable>mypool</replaceable> mirror <replaceable>/dev/ada1</replaceable> <replaceable>/dev/ada2</replaceable> mirror <replaceable>/dev/ada3</replaceable> <replaceable>/dev/ada4</replaceable></userinput>
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0

errors: No known data errors
<prompt>#</prompt> <userinput>zpool create <replaceable>mypool</replaceable> mirror <replaceable>/dev/ada1</replaceable> <replaceable>/dev/ada2</replaceable> mirror <replaceable>/dev/ada3</replaceable> <replaceable>/dev/ada4</replaceable></userinput>
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0

errors: No known data errors
Pools can also be constructed using partitions rather than whole disks. Putting <acronym>ZFS</acronym> in a separate partition allows the same disk to have other partitions for other purposes. In particular, partitions with bootcode and file systems needed for booting can be added. This allows booting from disks that are also members of a pool. There is no performance penalty on FreeBSD when using a partition rather than a whole disk. Using partitions also allows the administrator to <emphasis>under-provision</emphasis> the disks, using less than the full capacity. If a future replacement disk of the same nominal size as the original actually has a slightly smaller capacity, the smaller partition will still fit, and the replacement disk can still be used. 存储池也可以不使用整个磁盘而改使用分区来建里。把 <acronym>ZFS</acronym> 放到不同的分区可让其他分区用于其他用途。尤其是有 Bootcode 与文件系统要用来开机的分区,这让磁盘可以用来开机也同样可以做为存储池的一部份。在 FreeBSD 用分区来替代整个磁盘并不会对性能有影响。使用分区也让管理者可以对磁盘容量做 少算的预备,使用比完整容量少的容量,未来若要替换的磁盘号称与原磁盘相同,但实际上却比较小时,也可符合这个较小的分区容量,以使用替换的磁盘。
Create a <link linkend="zfs-term-vdev-raidz">RAID-Z2</link> pool using partitions: 用分区创建一个<link linkend="zfs-term-vdev-raidz">RAID-Z2</link> 存储池:
<prompt>#</prompt> <userinput>zpool create <replaceable>mypool</replaceable> raidz2 <replaceable>/dev/ada0p3</replaceable> <replaceable>/dev/ada1p3</replaceable> <replaceable>/dev/ada2p3</replaceable> <replaceable>/dev/ada3p3</replaceable> <replaceable>/dev/ada4p3</replaceable> <replaceable>/dev/ada5p3</replaceable></userinput>
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0
ada2p3 ONLINE 0 0 0
ada3p3 ONLINE 0 0 0
ada4p3 ONLINE 0 0 0
ada5p3 ONLINE 0 0 0

errors: No known data errors
<prompt>#</prompt> <userinput>zpool create <replaceable>mypool</replaceable> raidz2 <replaceable>/dev/ada0p3</replaceable> <replaceable>/dev/ada1p3</replaceable> <replaceable>/dev/ada2p3</replaceable> <replaceable>/dev/ada3p3</replaceable> <replaceable>/dev/ada4p3</replaceable> <replaceable>/dev/ada5p3</replaceable></userinput>
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0
ada2p3 ONLINE 0 0 0
ada3p3 ONLINE 0 0 0
ada4p3 ONLINE 0 0 0
ada5p3 ONLINE 0 0 0

errors: No known data errors
A pool that is no longer needed can be destroyed so that the disks can be reused. Destroying a pool involves first unmounting all of the datasets in that pool. If the datasets are in use, the unmount operation will fail and the pool will not be destroyed. The destruction of the pool can be forced with <option>-f</option>, but this can cause undefined behavior in applications which had open files on those datasets. 不需要的存储池可以删除以获得更多可用空间。删除一个存储池需要先卸载所有该存储池上的数据集。若数据集在使用中,卸载操作不会完成,存储池也不会被删除。可以使用 <option>-f</option> 选项来强制卸载数据集,但正在运行的应用程序可能会对数据集做出未定义的操作。
Adding and Removing Devices 添加和移除设备
There are two cases for adding disks to a zpool: attaching a disk to an existing vdev with <command>zpool attach</command>, or adding vdevs to the pool with <command>zpool add</command>. Only some <link linkend="zfs-term-vdev">vdev types</link> allow disks to be added to the vdev after creation. 添加磁盘到zpool中有两种情况:用 <command>zpool attach</command> 命令将磁盘加入一个现有的vdev中。只有部分 <link linkend="zfs-term-vdev">vdev types</link> 允许在vdev建立之后加入磁盘。
A pool created with a single disk lacks redundancy. Corruption can be detected but not repaired, because there is no other copy of the data. The <link linkend="zfs-term-copies">copies</link> property may be able to recover from a small failure such as a bad sector, but does not provide the same level of protection as mirroring or <acronym>RAID-Z</acronym>. Starting with a pool consisting of a single disk vdev, <command>zpool attach</command> can be used to add an additional disk to the vdev, creating a mirror. <command>zpool attach</command> can also be used to add additional disks to a mirror group, increasing redundancy and read performance. If the disks being used for the pool are partitioned, replicate the layout of the first disk on to the second, <command>gpart backup</command> and <command>gpart restore</command> can be used to make this process easier. 由单一磁盘建立的存储池缺乏冗余备份功能,可以检测到数据损坏单无法修复,因为数据没有其他备份。备份(<link linkend="zfs-term-copies">copies</link>)属性可以让您从较小的故障(比如磁盘坏道)。单无法提供与镜像和 <acronym>RAID-Z</acronym> 同样级别的保护。由单一磁盘所建立的存储池可用 <command>zpool attach</command> 加入新设备,建里镜像。<command>zpool attach</command> 也可用来加入额外的磁盘到镜像群组以增加备份和读取速度。若使用的磁盘已有分区,可以复制给磁盘分区到另一个,使用 <command>gpart backup</command> 与 <command>gpart restore</command> 可以让这个过程更简单。
Upgrade the single disk (stripe) vdev <replaceable>ada0p3</replaceable> to a mirror by attaching <replaceable>ada1p3</replaceable>: 加入 <replaceable>ada0p3</replaceable> 来升级单一磁盘串通(strip)vdev <replaceable>ada1p3</replaceable> 采用镜像型态:
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
ada0p3 ONLINE 0 0 0

errors: No known data errors
<prompt>#</prompt> <userinput>zpool attach <replaceable>mypool</replaceable> <replaceable>ada0p3</replaceable> <replaceable>ada1p3</replaceable></userinput>
Make sure to wait until resilver is done before rebooting.

If you boot from pool 'mypool', you may need to update
boot code on newly attached disk 'ada1p3'.

Assuming you use GPT partitioning and 'da0' is your new boot disk
you may use the following command:

gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0
<prompt>#</prompt> <userinput>gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 <replaceable>ada1</replaceable></userinput>
bootcode written to ada1
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
status: One or more devices is currently being resilvered. The pool will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scan: resilver in progress since Fri May 30 08:19:19 2014
527M scanned out of 781M at 47.9M/s, 0h0m to go
527M resilvered, 67.53% done
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0 (resilvering)

errors: No known data errors
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: resilvered 781M in 0h0m with 0 errors on Fri May 30 08:15:58 2014
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0

errors: No known data errors
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
ada0p3 ONLINE 0 0 0

errors: No known data errors
<prompt>#</prompt> <userinput>zpool attach <replaceable>mypool</replaceable> <replaceable>ada0p3</replaceable> <replaceable>ada1p3</replaceable></userinput>
Make sure to wait until resilver is done before rebooting.

If you boot from pool 'mypool', you may need to update
boot code on newly attached disk 'ada1p3'.

Assuming you use GPT partitioning and 'da0' is your new boot disk
you may use the following command:

gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0
<prompt>#</prompt> <userinput>gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 <replaceable>ada1</replaceable></userinput>
bootcode written to ada1
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
status: One or more devices is currently being resilvered. The pool will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scan: resilver in progress since Fri May 30 08:19:19 2014
527M scanned out of 781M at 47.9M/s, 0h0m to go
527M resilvered, 67.53% done
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0 (resilvering)

errors: No known data errors
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: resilvered 781M in 0h0m with 0 errors on Fri May 30 08:15:58 2014
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0

errors: No known data errors
When adding disks to the existing vdev is not an option, as for <acronym>RAID-Z</acronym>, an alternative method is to add another vdev to the pool. Additional vdevs provide higher performance, distributing writes across the vdevs. Each vdev is responsible for providing its own redundancy. It is possible, but discouraged, to mix vdev types, like <literal>mirror</literal> and <literal>RAID-Z</literal>. Adding a non-redundant vdev to a pool containing mirror or <acronym>RAID-Z</acronym> vdevs risks the data on the entire pool. Writes are distributed, so the failure of the non-redundant disk will result in the loss of a fraction of every block that has been written to the pool. 若不想加入磁盘到现有的vdev,对<acronym>RAID-Z</acronym>来说,可选择另一种方式:加入到另一个vdev存储池。额外的vdev可以提供更好的性能,分散写入数据到vdev之间每个vdev成员负责自己的备份。也可以使用不同的vdev形态,但不建议这么做,例如混合使用<literal>mirror</literal>和<literal>RAID-Z</literal>加入到另一个无备份的vdev到一个含有mirror或RAID-Z vdev的存储池会让数据损坏的风险扩大整个存储池,由于分散写入数据,若在无备份的磁盘上发生故障的结果便是遗失大半写到存储池的数据。
Data is striped across each of the vdevs. For example, with two mirror vdevs, this is effectively a <acronym>RAID</acronym> 10 that stripes writes across two sets of mirrors. Space is allocated so that each vdev reaches 100% full at the same time. There is a performance penalty if the vdevs have different amounts of free space, as a disproportionate amount of the data is written to the less full vdev. 在每个vdev 间的数据是串连的,例如,有两个mirror vdev,便跟 <acronym>RAID</acronym> 10 一样在两个mirror 间分散写入数据,且会做空间的分配,因此 vdev 会在同时达到全满100% 的用量。若 vdev 间的可用空间量不同则会影响到效能,因为数据量会不成比例的写入到使用量较少的 vdev。
When attaching additional devices to a boot pool, remember to update the bootcode. 当连接额外的设备到一个可以开机的存储池,要记得更新 Bootcode。
Attach a second mirror group (<filename>ada2p3</filename> and <filename>ada3p3</filename>) to the existing mirror: 连接第二个mirror群组(<filename>ada2p3</filename> 和 <filename>ada3p3</filename>)到现有的mirror:
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: resilvered 781M in 0h0m with 0 errors on Fri May 30 08:19:35 2014
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0

errors: No known data errors
<prompt>#</prompt> <userinput>zpool add <replaceable>mypool</replaceable> mirror <replaceable>ada2p3</replaceable> <replaceable>ada3p3</replaceable></userinput>
<prompt>#</prompt> <userinput>gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 <replaceable>ada2</replaceable></userinput>
bootcode written to ada2
<prompt>#</prompt> <userinput>gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 <replaceable>ada3</replaceable></userinput>
bootcode written to ada3
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: scrub repaired 0 in 0h0m with 0 errors on Fri May 30 08:29:51 2014
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
ada2p3 ONLINE 0 0 0
ada3p3 ONLINE 0 0 0

errors: No known data errors
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: resilvered 781M in 0h0m with 0 errors on Fri May 30 08:19:35 2014
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0

errors: No known data errors
<prompt>#</prompt> <userinput>zpool add <replaceable>mypool</replaceable> mirror <replaceable>ada2p3</replaceable> <replaceable>ada3p3</replaceable></userinput>
<prompt>#</prompt> <userinput>gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 <replaceable>ada2</replaceable></userinput>
bootcode written to ada2
<prompt>#</prompt> <userinput>gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 <replaceable>ada3</replaceable></userinput>
bootcode written to ada3
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: scrub repaired 0 in 0h0m with 0 errors on Fri May 30 08:29:51 2014
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
ada2p3 ONLINE 0 0 0
ada3p3 ONLINE 0 0 0

errors: No known data errors
Currently, vdevs cannot be removed from a pool, and disks can only be removed from a mirror if there is enough remaining redundancy. If only one disk in a mirror group remains, it ceases to be a mirror and reverts to being a stripe, risking the entire pool if that remaining disk fails. 现在已无法从存储上移除 vdev,且磁盘只能够在有足够剩余空间的情况下从 mirror 移除,若在 mirror 群组中只剩下一个磁盘,便会取消 mirror 然后还原为 stripe,若剩下的那个磁盘故障,便会影响到整个存储池。
Remove a disk from a three-way mirror group: 从一个三方 mirror 群组移除一个磁盘:
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: scrub repaired 0 in 0h0m with 0 errors on Fri May 30 08:29:51 2014
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0
ada2p3 ONLINE 0 0 0

errors: No known data errors
<prompt>#</prompt> <userinput>zpool detach <replaceable>mypool</replaceable> <replaceable>ada2p3</replaceable></userinput>
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: scrub repaired 0 in 0h0m with 0 errors on Fri May 30 08:29:51 2014
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0

errors: No known data errors
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: scrub repaired 0 in 0h0m with 0 errors on Fri May 30 08:29:51 2014
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0
ada2p3 ONLINE 0 0 0

errors: No known data errors
<prompt>#</prompt> <userinput>zpool detach <replaceable>mypool</replaceable> <replaceable>ada2p3</replaceable></userinput>
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: scrub repaired 0 in 0h0m with 0 errors on Fri May 30 08:29:51 2014
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0

errors: No known data errors
Checking the Status of a Pool 检擦存储池状态
Pool status is important. If a drive goes offline or a read, write, or checksum error is detected, the corresponding error count increases. The <command>status</command> output shows the configuration and status of each device in the pool and the status of the entire pool. Actions that need to be taken and details about the last <link linkend="zfs-zpool-scrub"><command>scrub</command></link> are also shown. 存储池的状态很重要,若有磁盘机离线或侦测到读取、写入或校验码(Checksum)错误,对应的错误计数便会增加。 status 会显示存储池中每一个磁盘机的设定与状态及整个存储池的状态。需要处置的方式与有关最近清洁(Scrub)S的详细资讯也会一并显示。
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: scrub repaired 0 in 2h25m with 0 errors on Sat Sep 14 04:25:50 2013
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0
ada2p3 ONLINE 0 0 0
ada3p3 ONLINE 0 0 0
ada4p3 ONLINE 0 0 0
ada5p3 ONLINE 0 0 0

errors: No known data errors
<prompt>#</prompt> <userinput>zpool status</userinput>
pool: mypool
state: ONLINE
scan: scrub repaired 0 in 2h25m with 0 errors on Sat Sep 14 04:25:50 2013
config:

NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0
ada2p3 ONLINE 0 0 0
ada3p3 ONLINE 0 0 0
ada4p3 ONLINE 0 0 0
ada5p3 ONLINE 0 0 0

errors: No known data errors

Loading…

No matching activity found.

Browse all component changes

Glossary

English Chinese (Simplified) (zh_CN)
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect2/title
Source string location
book.translate.xml:39965
String age
a year ago
Source string age
a year ago
Translation file
books/zh_CN/handbook.po, string 6676