|
下面是我在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必须分区都完全一致吗?[/ |
|