From b99e83b0a7c48690c2e6b7699bbd549e9a2c8da1 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Wed, 15 Mar 2006 19:38:56 +0000 Subject: Mass synchnorization to the English revisions: Makefile 1.95 -> 1.97 book.sgml 1.162 -> 1.164 chapters.ent 1.32 -> 1.33 advanced-networking/chapter.sgml 1.367 -> 1.380 audit/chapter.sgml 1.5 -> 1.13 basics/chapter.sgml 1.137 -> 1.143 [1] boot/chapter.sgml 1.59 -> 1.64 config/chapter.sgml 1.212 -> 1.216 [2] cutting-edge/chapter.sgml 1.217 -> 1.222 [3] [4] [5] desktop/chapter.sgml 1.56 -> 1.64 disks/chapter.sgml 1.241 -> 1.251 eresources/chapter.sgml 1.174 -> 1.175 firewalls/chapter.sgml 1.62 -> 1.66 geom/chapter.sgml 1.7 -> 1.22 install/chapter.sgml 1.329 -> 1.331 [6] [7] [8] [1] introduction/chapter.sgml 1.110 -> 1.111 kernelconfig/chapter.sgml 1.158 -> 1.163 [1] l10n/chapter.sgml 1.111 -> 1.118 linuxemu/chapter.sgml 1.124 -> 1.129 mac/chapter.sgml 1.47 -> 1.49 mail/chapter.sgml 1.129 -> 1.133 mirrors/Makefile (add proper original revision) mirrors/chapter.sgml 1.386 -> 1.411 multimedia/chapter.sgml 1.110 -> 1.115 network-servers/chapter.sgml 1.69 -> 1.78 [9] [10] pgpkeys/chapter.sgml 1.270 -> 1.286 ports/chapter.sgml 1.243 -> 1.253 [8] ppp-and-slip/Makefile (correct original revision) ppp-and-slip/chapter.sgml 1.170 -> 1.172 preface/preface.sgml 1.29 -> 1.30 printing/chapter.sgml 1.93 -> 1.95 security/chapter.sgml 1.281 -> 1.292 serialcomms/chapter.sgml 1.100 -> 1.112 users/chapter.sgml 1.52 -> 1.54 x11/chapter.sgml 1.166 -> 1.169 [8] Obtained from: The FreeBSD Simplified Chinese Project Merging work done by: delphij, intron with language suggestions from: alakee [1], Qiang LI [2], liushk@gmail.com [3], Ye ZHANG [4], zhaoyongjie [5], sharkwang at gmail.com [6], Heng DUANMU [7], [8], mengkezhi [9], [10] --- zh_CN.GB2312/books/handbook/geom/chapter.sgml | 105 +++++++++++++------------- 1 file changed, 53 insertions(+), 52 deletions(-) (limited to 'zh_CN.GB2312/books/handbook/geom/chapter.sgml') diff --git a/zh_CN.GB2312/books/handbook/geom/chapter.sgml b/zh_CN.GB2312/books/handbook/geom/chapter.sgml index 89974b51ef..6aa6745e14 100644 --- a/zh_CN.GB2312/books/handbook/geom/chapter.sgml +++ b/zh_CN.GB2312/books/handbook/geom/chapter.sgml @@ -2,9 +2,8 @@ The FreeBSD Documentation Project The FreeBSD Simplified Chinese Project - Original Revision: 1.7 + Original Revision: 1.22 $FreeBSD$ - --> @@ -31,14 +30,14 @@ GEOM - 本章将介绍以 &os; 新的 GEOM 框架来使用磁盘。 + 本章将介绍以 &os; GEOM 框架来使用磁盘。 这包括了使用这一框架来配置的主要的 RAID 控制工具。 这一仗不会深入讨论 GEOM 如何处理或控制 I/O、 其下层的子系统或代码。 您可以从 &man.geom.4; 联机手册及其众多 SEE ALSO 参考文献中得到这些信息。 这一章也不是对 RAID 配置的权威介绍, - 它只介绍由 GEOM 支持的 RAID + 它只介绍由 支持GEOM 的 RAID 级别。 读完这章, 您将了解: @@ -145,7 +144,7 @@ 确信存在合适的挂接点 (mount point)。 如果这个卷将成为根分区, 那么暂时把它挂接到其他位置i, 如 /mnt + role="directory">/mnt: &prompt.root; mkdir /mnt @@ -165,12 +164,6 @@ XXX: What message? Put it inside the screen output above. --> - 如果卷将被用于作为根设备来启动系统, - 还必须在创建文件系统之前执行下面的命令: - - &prompt.root; fdisk -vBI /dev/stripe/st0 - - 此外还需要用下面的命令在新卷上创建分区表: &prompt.root; bsdlabel -wB /dev/stripe/st0 @@ -179,20 +172,20 @@ XXX: What message? Put it inside the screen output above. 上述过程将在 /dev/stripe - 目录中的 st0 设备基础上建立两个新设备。 - 这包括 st0a 和 - st0c。 现在需要在 - st0a 设备上用下述 - newfs 命令建立文件系统: + 目录中的 st0 设备基础上建立两个新设备。 + 这包括 st0a 和 + st0c。 现在需要在 + st0a 设备上用下述 + newfs 命令来建立文件系统: &prompt.root; newfs -U /dev/stripe/st0a 在屏幕上将滚过一些数字, 整个操作应该能在数秒内完成。 - 现在可以挂接刚刚做好的卷了: + 现在可以挂接刚刚做好的卷了。 - 下列命令可以用来手工挂接新创建的条带盘。 + 下列命令可以用来手工挂接新创建的条带盘: &prompt.root; mount /dev/stripe/st0a /mnt @@ -203,9 +196,9 @@ XXX: What message? Put it inside the screen output above. &prompt.root; echo "/dev/stripe/st0a /mnt ufs rw 2 2" \ >> /etc/fstab - 此外, geom 模块也必须在系统初始化过程中自动加载, - 这可以通过在 - /boot/loader.conf 中进行适当的设置来达到。 + 此外, geom_stripe 模块也必须通过在 + /boot/loader.conf 中增加下述设置, + 以便在系统初始化过程中自动加载。 &prompt.root; echo 'geom_stripe_load="YES"' >> /boot/loader.conf @@ -235,7 +228,7 @@ XXX: What message? Put it inside the screen output above. 首先需要把 &os; 安装到第一块磁盘上, 并建立两个分区。 第一个分区将成为交换区, 其尺寸应该是两倍的 RAM 尺寸, 而余下的空间, - 则作为根 (/ 文件系统来使用。 + 则作为根 (/) 文件系统来使用。 当然, 也可以为其他挂接点划分不同的分区; 但是, 这将使难度提高一个量级, 因为您将不得不手工修改 &man.bsdlabel.8; 和 &man.fdisk.8; @@ -250,21 +243,25 @@ XXX: What message? Put it inside the screen output above. &prompt.root; gmirror label -vnb round-robin gm0 /dev/da1 - - 这个命令将在 - /dev/mirror - 目录中创建 gm0gm0s1、 - gm0s1a, 以及 gm0s1c - 设备节点。 - + 系统应会给出下列回应: + +Metadata value stored on /dev/da1. +Done. 初始化 GEOM, 这将加载 /boot/kernel/geom_mirror.ko 内核模块: - &prompt.root; geom load + &prompt.root; gmirror load + + + 这个命令应该会在 + /dev/mirror + 目录中创建 + gm0 设备节点。 + - 安装通用的 fdisk 标签和引导区代码到刚刚创建的 - gm0 设备上: + 安装通用的 fdisk 标签以及引导区代码, + 到刚刚创建的 gm0 设备上: &prompt.root; fdisk -vBI /dev/mirror/gm0 @@ -279,8 +276,8 @@ XXX: What message? Put it inside the screen output above. 它们必须与另一个盘上对应的区段和分区匹配。 - 使用 &man.newfs.8; 工具来创建默认的文件系统到 - gm0s1a 设备节点上: + 使用 &man.newfs.8; 工具来, + 在 gm0s1a 设备节点上创建默认的文件系统: &prompt.root; newfs -U /dev/mirror/gm0s1a @@ -288,26 +285,30 @@ XXX: What message? Put it inside the screen output above. 只需看看是否有错误提示就可以了, 如果没问题, 接下来把它挂到 /mnt 挂接点上面: - &prompt.root mount /dev/mirror/gm0s1a /mnt + &prompt.root; mount /dev/mirror/gm0s1a /mnt - 现在需要把酥藕有引导盘上的数据迁移到新的文件系统上了。 + 现在需要把所有引导盘上的数据迁移到新的文件系统上了。 下面的例子使用了 &man.dump.8; 和 &man.restore.8; - 这两个命令; 不过, 用 &man.dd.1; 在这里也可以达到完全一样的目的。 - 我们并不使用 &man.tar.1; 因为它并不覆盖引导区的代码, - 而那样一定会造成出错的。 + 这两个命令; 不过, 用 &man.dd.1; 在这里也可以达到完全一样的目的。 - &prompt.root; dump -L -0 -f- / |(cd /mnt && restore -r -v -f-) + &prompt.root; dump -L -0 -f- / |(cd /mnt && restore -r -v -f-) 这个操作必须在所有文件系统上都作一遍。 您可以将前述命令中的文件系统, 改为所希望的文件系统的位置。 接下来应该编辑复制出来的 /mnt/etc/fstab - 文件, 并删去或注释掉交换分区。 此外应该修改文件系统信息, + 文件, 并删去或注释掉交换文件 + + 需要注意的是, + 在 fstab 注释掉交换文件, + 通常会需要您以其他方式重建交换空间。 + 请参见 以了解进一步的细节。 + 。 修改其他文件系统对应的信息, 以便让它们使用新盘。 参考下面的例子: # Device Mountpoint FStype Options Dump Pass# #/dev/da0s2b none swap sw 0 0 -/dev/mirror/gm0sa1 / ufs rw 1 1 +/dev/mirror/gm0s1a / ufs rw 1 1 接下来需要建一个 boot.conf 文件, 在当前和新盘的根分区上各放一份。 这个文件将 @@ -324,22 +325,22 @@ XXX: What message? Put it inside the screen output above. 则还有一根救命稻草。 - 然后再到 - /boot/loader.conf: 中加入一些设置: + 接下来, 在 + /boot/loader.conf 中加入一些新的设置: - &prompt.root; echo 'geom_mirror_load="YES"' >> /boot/loader.conf + &prompt.root; echo 'geom_mirror_load="YES"' >> /mnt/boot/loader.conf - 这将让 &man.loader.8; 在系统初始化过程中自动加载 - geom_mirror.ko + 者将让 &man.loader.8; 在系统初始化过程中自动加载 + geom_mirror.ko 模块。 最后重新启动系统: &prompt.root; shutdown -r now 如果一切顺利, 系统将从 - gm0s1a 设备启动, 并给出 login - 提示等待用户登录。 如果发生错误, 请查阅接下来的故障排除环节。 我们继续将 - da0 磁盘加入 gm0 + gm0s1a 设备启动, 并给出 login + 提示等待用户登录。 如果发生错误, 请查阅接下来的故障排除环节。 我们接着将 + da0 磁盘也加入 gm0 设备: &prompt.root; gmirror configure -a gm0 @@ -347,8 +348,8 @@ XXX: What message? Put it inside the screen output above. 此处 告诉 &man.gmirror.8; 采用自动同步, 或换言之: 自动地将磁盘的写操作做镜像处理。 联机手册中详细解释了如何重建, - 以及替换磁盘, 只不过它用 data - 表示这里的 gm0 + 以及替换磁盘, 只不过它用 data + 表示这里的 gm0 故障排除 -- cgit v1.2.3