Translation

(itstool) path: sect2/para
In this example, everything is normal.
17/380
Context English Chinese (Simplified) (zh_CN) State
This completes the <acronym>RAID-Z</acronym> configuration. Daily status updates about the file systems created can be generated as part of the nightly <citerefentry><refentrytitle>periodic</refentrytitle><manvolnum>8</manvolnum></citerefentry> runs. Add this line to <filename>/etc/periodic.conf</filename>: 这个动作完成 <acronym>RAID-Z</acronym> 最后的设置。 有关已建立的文件系统每日状态更新可以做为 <citerefentry><refentrytitle>periodic</refentrytitle><manvolnum>8</manvolnum></citerefentry> 的一部份在每天晚上执行。加入此行到 <filename>/etc/periodic.conf</filename>:
daily_status_zfs_enable="YES" daily_status_zfs_enable="YES"
Recovering <acronym>RAID-Z</acronym> 还原<acronym>RAID-Z</acronym>
Every software <acronym>RAID</acronym> has a method of monitoring its <literal>state</literal>. The status of <acronym>RAID-Z</acronym> devices may be viewed with this command: 每个软 <acronym>RAID</acronym> 都有监控其状态(<literal>state</literal>)的方式,而 <acronym>RAID-Z</acronym> 设备的状态可以使用这个命令来查看:
<prompt>#</prompt> <userinput>zpool status -x</userinput> <prompt>#</prompt> <userinput>zpool status -x</userinput>
If all pools are <link linkend="zfs-term-online">Online</link> and everything is normal, the message shows: 如果所有的存储池都在线(<link linkend="zfs-term-online">Online</link>)且正常运行, 则显示下列信息:
all pools are healthy all pools are healthy
If there is an issue, perhaps a disk is in the <link linkend="zfs-term-offline">Offline</link> state, the pool state will look similar to: 如果发生问题,可能磁盘处于离线(<link linkend="zfs-term-offline">Offline</link>)状态,则此时存储池的状态将可能是:
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

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:39788
String age
a year ago
Source string age
a year ago
Translation file
books/zh_CN/handbook.po, string 6654