Translation

(itstool) path: sect2/para
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.
40/2000
Context English Chinese (Simplified) (zh_CN) State
pool: storage
state: DEGRADED
status: One or more devices has been taken offline by the administrator.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Online the device using 'zpool online' or replace the device with
'zpool replace'.
scrub: none requested
config:

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

errors: No known data errors
pool: storage
state: DEGRADED
status: One or more devices has been taken offline by the administrator.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Online the device using 'zpool online' or replace the device with
'zpool replace'.
scrub: none requested
config:

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

errors: No known data errors
This indicates that the device was previously taken offline by the administrator with this command: 这表示设备在之前已经被管理人员用以下命令下线:
<prompt>#</prompt> <userinput>zpool offline storage da1</userinput> <prompt>#</prompt> <userinput>zpool offline storage da1</userinput>
Now the system can be powered down to replace <filename>da1</filename>. When the system is back online, the failed disk can replaced in the pool: 现在系统可以关机然后更换 <filename>da1</filename>,当系统回复上线,就可以替换掉存储池中故障的磁盘:
<prompt>#</prompt> <userinput>zpool replace storage da1</userinput> <prompt>#</prompt> <userinput>zpool replace storage da1</userinput>
From here, the status may be checked again, this time without <option>-x</option> so that all pools are shown: 到此可以再次检查状态,这时不需要使用 <option>-x</option> 来显示所有的存储池:
<prompt>#</prompt> <userinput>zpool status storage</userinput>
pool: storage
state: ONLINE
scrub: resilver completed with 0 errors on Sat Aug 30 19:44:11 2008
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: resilver completed with 0 errors on Sat Aug 30 19:44:11 2008
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
In this example, everything is normal. 在这个例子中,所有磁盘均正常工作。
Data Verification 数据校验
<acronym>ZFS</acronym> uses checksums to verify the integrity of stored data. These are enabled automatically upon creation of file systems. <acronym>ZFS</acronym> 使用校验码(checksums)来验证存储数据的完整性。校验码在文件创建时一起生成。
Checksums can be disabled, but it is <emphasis>not</emphasis> recommended! Checksums take very little storage space and provide data integrity. Many <acronym>ZFS</acronym> features will not work properly with checksums disabled. There is no noticeable performance gain from disabling these checksums. 校验码(Checksum)可以关闭,但 <emphasis>不建议</emphasis>,校验码只会占用非常少的存储空间来确保数据的完整性。若关闭校验码会使许多 <acronym>ZFS</acronym> 功能无法正常工作。关闭校验功能不会使性能有明显的提升。
Checksum verification is known as <emphasis>scrubbing</emphasis>. Verify the data integrity of the <literal>storage</literal> pool with this command: 检验校验码这个动作即所谓的清理(<emphasis>scrubbing</emphasis>),可以使用以下命令来检验 <literal>storage</literal> 存储池的数据完整性:
<prompt>#</prompt> <userinput>zpool scrub storage</userinput> <prompt>#</prompt> <userinput>zpool scrub storage</userinput>
The duration of a scrub depends on the amount of data stored. Larger amounts of data will take proportionally longer to verify. Scrubs are very <acronym>I/O</acronym> intensive, and only one scrub is allowed to run at a time. After the scrub completes, the status can be viewed with <command>status</command>: 完成清理所需要的时间视数据量的大小而定。较大的数据量将使用更多的时间完成校验,清理会对 <acronym>I/O</acronym> 有非常密集的操作且同时只能进行一个清理操作。在清理完成后,可以使用<command>status</command> 来查看状态:
<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建立之后加入磁盘。

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/para
Source string location
book.translate.xml:39835
String age
a year ago
Source string age
a year ago
Translation file
books/zh_CN/handbook.po, string 6662