QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 554|回复: 1

一个radi 1的问题

[复制链接]
发表于 2004-4-26 17:51:42 | 显示全部楼层 |阅读模式
下面是我在rhce guide上面看到的一个exercise
Mirror the /home Partition Using Software RAID
Don’t do this exercise on a production computer. If you have a computer with Red
Hat Linux already installed that you can use for testing, that is best. One alternative
is to use virtual machine technology such as VMWare, which can allow you to set
up these exercises with minimal risk to a production system. When you’re ready, use
the Linux fdisk techniques discussed in Chapter 3 to configure the following two-drive
partition scheme:
Drive 1:
hda1 256 /
hda2 64 swap
hda3 500 /home
hda4 256 /var
Drive 2:
hdb1 1200 /usr
hdb2 64 swap
hdb3 100 /tmp
hdb4 500 (not allocated)
Now create a mirror of hda3 to hdb4 partition. (The partition sizes do not have to
be identical.)
RAID Configuration 257
If you’re making fdisk changes on a production computer, back up the /home
partition first. Otherwise, all data on the current /dev/hda3 will be lost.
1. Mark the two partition IDs as type 0xFD using the Linux fdisk utility.
[root]# fdisk /dev/hda
Command (m for help) : t
Partition number (1-4)
3
Partition ID (L to list options): FD
Command (m for help) : w
Command (m for help) : q
# fdisk /dev/hdb
Command (m for help) : t
Partition number (1-4)
4
Partition ID (L to list options): FD
Command (m for help) : w
Command (m for help) :q
2. Update the configuration file /etc/raidtab with these lines of code:
[root]# vi /etc/raidtab
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 1
chunk-size 4
device /dev/hda3
raid-disk 0
device /dev/hdb4
raid-disk 1
3. Now make the RAID device file md0 and format it this way:
[root]# mkraid /dev/md0
[root]# mke2fs -b 4096 -R stride=8 /dev/md0
4. Update each device to the ext3 filesystem by adding journaling.
(Alternatively, you could have just added the -j switch when using mke2fs to
format the /dev/md0 device.):
tune2fs -j /dev/hda3
tune2fs -j /dev/hdb4
5. All that’s left is to restore the files to the device, mount it, and you are done!
我的问题是第二步,为什么是hdb4而不是hdb3?而且不是说mirrow必须分区都完全一致吗?[/
发表于 2004-4-27 17:48:34 | 显示全部楼层
raid 1 嘛。你本来就是规划 /dev/hda3 和 /dev/hdb4 。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-8 18:44 , Processed in 0.040771 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表