From 9fd98e24c2c06049cbb5120c04f42d8893250346 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Sun, 26 Mar 2006 01:32:50 +0000 Subject: MFen 1.251 -> 1.254 Obtained from: The FreeBSD Simplified Chinese Project --- zh_CN.GB2312/books/handbook/disks/chapter.sgml | 121 +++++++++++-------------- 1 file changed, 55 insertions(+), 66 deletions(-) (limited to 'zh_CN.GB2312/books') diff --git a/zh_CN.GB2312/books/handbook/disks/chapter.sgml b/zh_CN.GB2312/books/handbook/disks/chapter.sgml index 9602d96e03..5a5fcfe458 100644 --- a/zh_CN.GB2312/books/handbook/disks/chapter.sgml +++ b/zh_CN.GB2312/books/handbook/disks/chapter.sgml @@ -2,7 +2,7 @@ The FreeBSD Documentation Project The FreeBSD Simplified Chinese Project - Original Revision: 1.251 + Original Revision: 1.254 $FreeBSD$ --> @@ -2401,7 +2401,7 @@ mkdir /mnt/var # if [ ! -x /sys/compile/MINI/kernel ] then - cat << EOM + cat << EOM The MINI kernel does not exist, please create one. Here is an example config file: # @@ -2449,14 +2449,14 @@ fi cp -f /sys/compile/MINI/kernel /mnt -gzip -c -best /sbin/init > /mnt/sbin/init -gzip -c -best /sbin/fsck > /mnt/sbin/fsck -gzip -c -best /sbin/mount > /mnt/sbin/mount -gzip -c -best /sbin/halt > /mnt/sbin/halt -gzip -c -best /sbin/restore > /mnt/sbin/restore +gzip -c -best /sbin/init > /mnt/sbin/init +gzip -c -best /sbin/fsck > /mnt/sbin/fsck +gzip -c -best /sbin/mount > /mnt/sbin/mount +gzip -c -best /sbin/halt > /mnt/sbin/halt +gzip -c -best /sbin/restore > /mnt/sbin/restore -gzip -c -best /bin/sh > /mnt/bin/sh -gzip -c -best /bin/sync > /mnt/bin/sync +gzip -c -best /bin/sh > /mnt/bin/sh +gzip -c -best /bin/sync > /mnt/bin/sync cp /root/.profile /mnt/root @@ -2483,18 +2483,18 @@ cd / # # create minimum file system table # -cat > /mnt/etc/fstab <<EOM +cat > /mnt/etc/fstab < /mnt/etc/passwd < /mnt/etc/master.passwd < - FreeBSD 5.X 下的 File-Backed 文件系统 + 采用文件后端的文件系统 - 磁盘 - file-backed (5.X) + disks (磁盘) + file-backed (采用文件作为后端) - 在 FreeBSD 5.X 系统中使用应用程序 &man.mdconfig.8; -  被用来配置和启用内存磁盘,&man.md.4;,使用 - &man.mdconfig.8;你需要在你的内核配置文件中添加 &man.md.4; 模块来支持它: + 在 FreeBSD 5.X 和更新版本的系统中, 可以用 &man.mdconfig.8; + 程序来配置和启用内存磁盘, &man.md.4;。 要使用 + &man.mdconfig.8;, 就需要在内核配置文件中添加 &man.md.4; 模块来支持它: device md @@ -2684,7 +2684,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on 挂接一个存在的文件系统映像: - 在 FreeBSD 5.X 中使用 <command>mdconfig</command> 命令来挂接一个存在的文件系统映像。 + 使用 <command>mdconfig</command> 挂载已经存在的文件系统映像 &prompt.root; mdconfig -a -t vnode -f diskimage -u 0 &prompt.root; mount /dev/md0 /mnt @@ -2699,16 +2699,16 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on 5120+0 records in 5120+0 records out &prompt.root; mdconfig -a -t vnode -f newimage -u 0 -&prompt.root; disklabel -r -w md0 auto -&prompt.root; newfs md0c -/dev/md0c: 5.0MB (10240 sectors) block size 16384, fragment size 2048 - using 4 cylinder groups of 1.27MB, 81 blks, 256 inodes. +&prompt.root; bsdlabel -w md0 auto +&prompt.root; newfs md0a +/dev/md0a: 5.0MB (10224 sectors) block size 16384, fragment size 2048 + using 4 cylinder groups of 1.25MB, 80 blks, 192 inodes. super-block backups (for fsck -b #) at: - 32, 2624, 5216, 7808 -&prompt.root; mount /dev/md0c /mnt + 160, 2720, 5280, 7840 +&prompt.root; mount /dev/md0a /mnt &prompt.root; df /mnt -Filesystem 1K-blocks Used Avail Capacity Mounted on -/dev/md0c 4846 2 4458 0% /mnt +Filesystem 1K-blocks Used Avail Capacity Mounted on +/dev/md0a 4710 4 4330 0% /mnt 如果你没有使用 选项指定一个单位号 @@ -2718,21 +2718,13 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on md4。想得到更多的关于 &man.mdconfig.8; 的信息请参考手册页。 - 从 &os; 5.1-RELEASE 开始, &man.bsdlabel.8; - 程序代替了旧版的 &man.disklabel.8; 程序。相应的 - &man.bsdlabel.8; 中的许多陈旧的选项和参数也被取消; - 在上面的例子中选项 - 应该被删掉。想获得更多的信息, - 请参考 &man.bsdlabel.8; 的手册页。 - - 应用程序 &man.mdconfig.8; 是非常有作的,然而它 - 需要许多命令行来创建一个 file-backed 文件系统。 - FreeBSD 5.0 也提供了一个被称作 &man.mdmfs.8; 的工具, - 这个程序配置一个 &man.md.4; 磁盘使用 - &man.mdconfig.8;,在它上面安装一个 UFS 文件系统使用 - &man.newfs.8;,挂接它使用 &man.mount.8;。例如, - 如果你想创建和挂接像上面一样的文件系统映像, - 简单的执行下面的步骤: + 应用程序 &man.mdconfig.8; 功能很强大, + 但在创建采用文件后端的文件系统时需要使用许多多行命令。 为此 + FreeBSD 5.0 也提供了一个名为 &man.mdmfs.8; 的工具, 该程序使用 + &man.mdconfig.8; 来配置 &man.md.4; 盘, 并在其上用 + &man.newfs.8; 创建 UFS 文件系统, 然后用 &man.mount.8; 挂接它。 例如, + 如果想创建和挂接像上面那样的文件系统映像, + 只需简单地执行下面的步骤: 使用 <command>mdmfs</command> 命令配置和挂接一个 File-Backed 磁盘 @@ -2742,7 +2734,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on &prompt.root; mdmfs -F newimage -s 5m md0 /mnt &prompt.root; df /mnt Filesystem 1K-blocks Used Avail Capacity Mounted on -/dev/md0 4846 2 4458 0% /mnt +/dev/md0 4718 4 4338 0% /mnt 如果你使用没有加单位号的 选项, @@ -2782,49 +2774,46 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on - FreeBSD 5.X 下的内存后备式文件系统 + 以内存为后端的文件系统 - 磁盘 - 内存文件系统(5.X) + disks (磁盘) + 内存文件系统 - 同样的工具也可以用来创建内存后备式文件系统: - &man.mdconfig.8; 或 &man.mdmfs.8;。内存后备文件系统的 - 内存分配要使用 &man.malloc.9; 来完成。 + 同样的工具既可以用来创建以文件为后端的文件系统, + 也可以用来创建基于内存的文件系统: &man.mdconfig.8; 和 &man.mdmfs.8;。 + 一般来说在建立以内存为后端的文件系统时, 应使用 交换区作为后端 + (swap backing)。 使用交换区作为后端, + 并不意味着内存盘将被无条件地换出到交换区, + 它只是表示将根据需要从可换出的内存池中分配内存。 + 此外, 也可以使用 + &man.malloc.9; 作为后端的内存盘, 但这种内存盘在内核内存不足时, + 有可能会导致系统崩溃。 用 <command>mdconfig</command> 创建一个新的内存后备磁盘 - &prompt.root; mdconfig -a -t malloc -s 5m -u 1 + &prompt.root; mdconfig -a -t swap -s 5m -u 1 &prompt.root; newfs -U md1 /dev/md1: 5.0MB (10240 sectors) block size 16384, fragment size 2048 - using 4 cylinder groups of 1.27MB, 81 blks, 256 inodes. - with soft updates + using 4 cylinder groups of 1.27MB, 81 blks, 192 inodes. + with soft updates super-block backups (for fsck -b #) at: - 32, 2624, 5216, 7808 + 160, 2752, 5344, 7936 &prompt.root; mount /dev/md1 /mnt &prompt.root; df /mnt Filesystem 1K-blocks Used Avail Capacity Mounted on -/dev/md1 4846 2 4458 0% /mnt +/dev/md1 4718 4 4338 0% /mnt - 用 <command>mdmfs</command> - 创建一个新的内存后备磁盘 - &prompt.root; mdmfs -M -s 5m md2 /mnt + 使用 <command>mdmfs</command> 来新建内存盘 + &prompt.root; mdmfs -s 5m md2 /mnt &prompt.root; df /mnt Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/md2 4846 2 4458 0% /mnt - - 代替使用一个 &man.malloc.9; 后备文件系统,可以使用 - swap,正确的替换使用 替换 - 在命令行 - &man.mdconfig.8; 中。&man.mdmfs.8; 程序默认 - (没有 选项) 创建一个 swap-based - 磁盘。更多的详情,请参考 &man.mdconfig.8; - 和 &man.mdmfs.8; 手册页。 @@ -3719,7 +3708,7 @@ geli_da2_flags="-p -k /root/da2.key" 对于 &os; 6.0-RELEASE 之前的版本, - 还需要在 /etc/rc.conf 中加入: + 还需要在 /etc/rc.conf 中加入: gbde_swap_enable="YES" -- cgit v1.2.3