Hello -
I went through the steps recommended (included at the bottom here) and
got as far as rebooting my system after making a fresh initrd with the
patch provided to mkinitrd and I get a kernel panic that seems to be a
common problem for people installing Fedora core 4. If I switch the
BIOS back to booting from my auxilliary drive, everything works fine.
I don't have the exact error message in front of me (unfortunately), but
it's almost identical to this where it can't find a vg and lvm throws
error 5 (and the /dev/console complaint):
-----------------------------------------------------------
Red Hat nash version 4.2.15 starting
Reading all physical volumes. This may take a while...
No volume groups found
Unable to find volume group "VolGroup00"
ERROR: /bin/lvm exited abnormally with value 5 ! (pid 454)
mount: error 6 mounting ext3
ERROR opening /dev/console!!!!: 2
error dup2'ing fd of 0 to 0
error dup2'ing fd of 0 to 1
error dup2'ing fd of 0 to 2
switchroot: mount failed: 22
Kernel panic - not syncing: Attempted to kill init!
------------------------------------------------------------
Except in my case, it finds "VolGroup00", which is my old "/" filesystem
on an lv on the old drives, and does not find my new vg on the SATA mirror.
Couple questions here. I've changed fstab and grub.conf -- I've
disabled the other drives in Bios and/or unplugged them -- is it vgscan
that is picking them up or is there a stale pointer somewhere I may have
copied over in my:
|find / -xdev -print0 | cpio -pa0V --sparse /mnt/temp
And is _everything_ in /dev dynamic or does there need to be something
in there on the new drives?
The way I have fstab and the partitions setup is I have:
/dev/mapper/sil_<something>1 as /boot
/dev/mapper/sil_<something>2 as swap
/dev/myvg/mylv which contains the PV /dev/mapper/sil_<something>3 which is /
I did _not_ change the labels on the old LV/static partitions and
perhaps that is causing issues (because they are the same)?
In a small stab in the dark, I also tweaked mkinitrd so the raid stuff
came before the lvm stuff (since my lv is on the sil 3114 mirror) and I
was sure to run mkinitrd against the new fstab in /mnt that I had
changed appropriately.
Any ideas?
Thanks,
Steve
|
Lin, Weichuan wrote:
On my SIL 3114 chip, I have successfully migrated a system to raid, here
is the operation step:
Steps to port an existed system to SATA RAID:
1. Prepare an auxiliary hard disk with a system installed, for
example, EL4.
2. Make Stripe (RAID 0) with the help of utility of Silicon Image at
the stage right after Power on self test and before the start of grub.
3. Boot up the EL4 host on the auxiliary hard disk.
4. Active the RAID with the help of dmraid, and the new device called
/dev/dm-0 can be seen.
5. Use fdisk or parted to slice hard disk partitions on device of
/dev/dm-0. Typically one for /boot, the other on for swap, and the last
one for /, don't forget to active boot flag of the partition for /boot.
After doing that, device called /dev/dm-1, /dev/dm-2 and /dev/dm-3 can
be seen, also device mapper under /dev/mapper appears. For controller of
SIL 3114 CTU, there are sil_afageidcdibjb and sil_afageidcdibjb1 etc.
6. Make file system on /dev/dm-1 and /dev/dm-3 with the utility of
mkfs.
7. Mount /dev/dm-1 foo and mount /dev/dm-3 bar.
8. Copy all files under /boot to foo and files under / to bar, with
cp -au, like cp -au /boot foo. For the copying of /, the top level
directories need to be copied separately to exclude the mount point of
/dev/dm-1 and mount point of /dev/dm-3.
9. manually install GRUB to the device of dm-0, like:
9.1 Call grub --device=/dev/null to enter grub shell.
9.2 Grub>device /dev/mapper/sil_afageidcdibjb (hd0) [Caution: can't
use /dev/dm-0 here]
9.3 Grub>geometry (hd0) [check if the right device is mapped to
(hd0), if it is right, you can see that there are three partitions]
9.4 Grub>root (hd0,0) [successfully execution, grub can recognize
the file system on /dev/dm-1]
9.5 Grub>setup (hd0) [install the grub to /dev/dm-0, ie.
/dev/mapper/sil_afageidcdibjb , every stage should be successful]
9.6 Grub>quit
Note: before install the grub, the grub.conf may be kept as simple as
possible. It is better to comment some options like splashimage and
hiddenmenu to ensure the successfully display of the grub menu after
reboot.
10. Copy the dmraid.static to /sbin. This utility is the static link
version of dmraid and is needed at intird stage. It is not included in
the distribution of EL4, but it can be found at the distribution of
Fedora4, just copy it.
11. Path the mkinird, see the end.
12. make initrd with mkinitrd, like mkinitrd initrd.new `uname -r`
13. copy the initrd.new to foo.
14. edit the foo/grub/grub.conf to provide entry of current kernel and
the new initrd.img. Like:
title SATA RAID
root (hd0,0)
kernel /vmlinuz-2.6.9-5...... root=/dev/dm-3 ....
initrd /initrd.new
15. Edit the bar/ect/fstab to change the device of root file system,
like:
/dev/dm-3 / ext3 defaults 1 1
/dev/dm-1 /boot ext2 defaults 1 2
/dev/dm-2 swap swap defaults 0 0
....................................
16. halt -p to stop the current system.
17. Detach the auxiliary hard disk. And re-power on the machine. Enjoy
it!
patch for /sbin/mkinitrd
--- mkinitrd 2004-10-25 06:01:52.000000000 +0800
+++ mkinitrd.new 2005-07-01 07:12:33.000000000 +0800
@@ -733,6 +733,18 @@ elif [ -n "$root_lvm" ]; then
fi
fi
+#add to active dmraid
+if [ -x /sbin/dmraid.static -a -x /sbin/dmsetup -a -e
/dev/mapper/control ]; then
+ dmout=$(/sbin/dmsetup ls 2>/dev/null)
+ if [ "$dmout" != "No devices found" -a "$dmout" != "" ]; then
+ inst /sbin/dmraid.static $MNTIMAGE/sbin/dmraid
+ echo "echo Making device-mapper control node" >> $RCFILE
+ echo "mkdmnod" >>$RCFILE
+ echo "echo Running dmraid to active reid" >>$RCFILE
+ echo "/sbin/dmraid -ay" >>$RCFILE
+ fi
+fi
+
echo "echo Creating root device" >> $RCFILE
echo "mkrootdev /dev/root" >> $RCFILE
rootdev=/dev/root
_______________________________________________
Ataraid-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ataraid-list