From 77e9a754e4e01d94b7e8d8e606df1f58b84639ea Mon Sep 17 00:00:00 2001 From: Tom Rhodes Date: Tue, 22 Jan 2008 03:44:53 +0000 Subject: [PATCH] Update the gmirror section: 1: Pass -O 2 to newfs for UFS2; 2: Add a dd command to clear the primary disk; 3: Remove the creation of boot.config, it's unneeded and causes problems; 4: Describe how to view the status of the mirror build. PR: 112267 [3] --- .../books/handbook/geom/chapter.sgml | 39 ++++++++----------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/en_US.ISO8859-1/books/handbook/geom/chapter.sgml b/en_US.ISO8859-1/books/handbook/geom/chapter.sgml index c67ec49619..e0f1af7a67 100644 --- a/en_US.ISO8859-1/books/handbook/geom/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/geom/chapter.sgml @@ -298,7 +298,7 @@ Done. Use the &man.newfs.8; utility to construct a default UFS file system on the gm0s1a device node: - &prompt.root; newfs -U /dev/mirror/gm0s1a + &prompt.root; newfs -U -O 2 /dev/mirror/gm0s1a This should have caused the system to spit out some information and a bunch of numbers. This is good. Examine the @@ -333,36 +333,27 @@ Done. #/dev/da0s2b none swap sw 0 0 /dev/mirror/gm0s1a / ufs rw 1 1 - Now create a boot.config file on both the - current and new root partitions. This file will - help the system BIOS - boot the correct drive: - - &prompt.root; echo "1:da(1,a)/boot/loader" > /boot.config - - &prompt.root; echo "1:da(1,a)/boot/loader" > /mnt/boot.config - - - We have placed it on both root partitions to ensure proper - boot up. If for some reason the system cannot read from the - new root partition, a failsafe is available. - - Ensure the geom_mirror.ko module will load on boot by running the following command: &prompt.root; echo 'geom_mirror_load="YES"' >> /mnt/boot/loader.conf + &prompt.root; echo 'geom_mirror_load="YES"' >> /boot/loader.conf Reboot the system: &prompt.root; shutdown -r now + At the boot screen, select option four (4) to gain access to + single user mode. At the console, ensure that the system booted + from the gm0s1a. This can be done by + viewing the output from &man.df.1;. + If all has gone well, the system should have booted from the - gm0s1a device and a login - prompt should be waiting. If something went wrong, see review - the forthcoming troubleshooting section. Now add the - da0 disk to gm0 - device: + gm0s1a device. From here, the primary + disk may be cleared and inserted into the mirror using the + following commands: + + &prompt.root; dd if=/dev/zero of=/dev/da0 bs=512 count=79 &prompt.root; gmirror configure -a gm0 &prompt.root; gmirror insert gm0 /dev/da0 @@ -373,9 +364,13 @@ Done. replace disks, although it uses data in place of gm0. + As the mirror is built the status may be checked using + the following command: + + &prompt.root; gmirror status + Troubleshooting - System refuses to boot