ITEM: D4199L

Need help recovering from drive failure - missing hd5, hd7, and hd8.


Question:

We had a drive failure that required us to replace hdisk0 on our system.
Our records show that hd5, hd7, and hd8 were on hdisk0. How can we get our
system back up as we do not have a backup to restore from?

Response:

You are pretty lucky that these were the only logical volumes on hdisk0. This
is probably very unusual. If one of the standard systems filesystems
(hd2 or hd4) had ANY partitions on hdisk0, you would at this point be in
very bad shape. However, in your particular case, there is a way to get
your system operational again.

You are on an AIX version 3.1.5 system, so you cannot run the "getrootfs".
Usually under 3.1.5, we would run /etc/continue, but this tries to fsck and
mount all the normal filesystems which requires a log logical volume to exist.
Since the log logical volume (hd8) is gone, /etc/continue will not work.

Instead we did the following:

        \# importvg -y rootvg hdisk1
        \# varyongvg -f -n rootvg

Now we need to create the new log logical volume and the new boot logical
volume. The 'mklv' program did not appear to exist in maintenance mode.
We were able to restore /etc/mklv fromt he tape by doing the following:

        \# restbyname -xvf/dev/rmt0.1 ./etc/mklv

From here we did

        \# mklv -y hd81 -t jfslog rootvg 1 hdisk1
        \# mklv -y hd51 -t boot rootvg 2 hdisk1
        \# /etc/aix/logform /dev/hd81
        \# mount -o log=/dev/hd81 /dev/hd4 /mnt
        \# mount -o log=/dev/hd81 /dev/hd2 /mnt/usr

By using vi, we were able to edit /mnt/etc/filesystems and change all 
occurrences of "/dev/hd8" to "/dev/hd81". We also created a second "/blv" 
stanza, changing the device for the second one to "/dev/hd51". 

In order to run the bosboot command, we will need to do a 'chroot'
to /mnt. However, the devices that we created in maintenance mode do not
exist in the hard drive version of /dev - they only exist in the ram0
partition /dev. So we need to create device entry points for hd81 and hd51
in /mnt/dev. In addition, the major and minor number for hdisk1 have probably
changed now that you have removed and replaced hdisk0. We will need to
fix the device entry for hdisk1 as well. We used the following steps to do
this:

        \# ls -l /dev/hd81
        brw-rw----   1 root     system    10,  9 Aug 02 11:13 /dev/hd8
        \# cd /mnt/dev
        \# mknod rhd81 c 10 9
        \# mknod hd81 b 10 9
        \# ls -l /dev/hd51
        brw-rw----   1 root     system    10, 10 Aug 02 11:13 /dev/hd51
        \# mknod rhd51 c 10 10
        \# mknod hd51 b 10 10
        \# rm /mnt/dev/hdisk1
        \# ls -l /dev/hdisk1
        brw-rw----   1 root     system    14,  1 Aug 02 11:13 /dev/hdisk1
        \# mknod rhdisk1 c 14 1
        \# mknod hdisk1 b 14 1

With the device entries fixed, we can issue a chroot and run use bosboot
to recreate the boot logical volume.

        \# /mnt/bin/chroot /mnt /bin/ksh
        \# bosboot -a -d /dev/rhdisk1 -l /dev/hd51
        \# bootlist -m normal hdisk1

After doing this, we were able to boot the system.

NOTE: there are a number of problems which this solution creates. It
would probably be best at this point to backup all data on your system and
re-install AIX.


Support Line: Need help recovering from drive failure - missing hd5, hd7, and hd8. ITEM: D4199L
Dated: August 1993 Category: N/A
This HTML file was generated 99/06/24~13:30:57
Comments or suggestions? Contact us