[HPADM] RE: HP B132L+ Can't Boot Normally After lvextend

From: Guan, Ping (Penney) (pguan@lucent.com)
Date: Fri Dec 20 2002 - 04:37:26 EST


Sorry to say all the methods below did not resolve my problem. I am now
reinstalling the host with an ignite server and will reconfigure it. Anyway,
thanks so much to everyone who replied and below is the summary:

===============
Look at the command vgcfgrestore. looks like your
volume group info is bad.
===============
rm /etc/mnttab
mount

should fix your mnttab (/dev/root should become /dev/vg00/lvol3)

Also, check lvlnboot -v , as in

pluto ## lvlnboot -v vg00
 Boot Definitions for Volume Group /dev/vg00:
 Physical Volumes belonging in Root Volume Group:
        /dev/dsk/c1t3d0 (16/5.3.0) -- Boot Disk
 Boot: lvol1 on: /dev/dsk/c1t3d0
 Root: lvol3 on: /dev/dsk/c1t3d0
 Swap: lvol2 on: /dev/dsk/c1t3d0
 Dump: lvol2 on: /dev/dsk/c1t3d0, 0

Fix with
   lvlnboot -r /dev/vg00/lvol3 #specifies the root LV
   lvlnboot -b /dev/vg00/lvol1 #specifies the boot LV
   lvlnboot -s /dev/vg00/lvol2 #specifies the swap LV
   lvlnboot -d /dev/vg00/lvol2 #specifies the dump LV
   lvlnboot -R #recovers any BDRAs
===============
To fix:
$ rm /etc/mnttab # remove mnttab, but all filesystems are still
mounted
$ mount -a
$ bdf # rebuilds mnttab
/dev/vg00/lvol3 should be mounted as / now.
===============
/dev/root is a BIG problem. This is an emergency device file used when
the real logical volume cannot be determined. It should never appear
on a normal system. Try this:

  1. rm /etc/mnttab
  2. mount -a

Then check bdf to see if / comes back as a normal logical volume.
If so, then reboot and it should stay OK.

Note: extending any lvol (except the last) will always be discontiguous
since there is no room to add space except at the end of the disk.
===============
For the /dev/root
  As mentioned rm /etc/mnttab then do mount -u.
  If this doesn't help then repeat the rm and do a reboot -rq.
  OR go to single user mode remove /etc/mnttab and reboot.

As for the lvol6 use lvchange to remove the restriction for contiguous
===============
/dev/root is a filesystem created when it can't mount normal root
/dev/vg00/lvol2 - try lvdisplay this...

Again - try running a manual fsck on /dev/vg00/lvol1 and seeing whether that
fixes your problem...
===============
If this was /dev/vg00/lvol1 then that could be the reason for the error -
unless the LV is set to strict contiguous you may have the lvol split on the
disc. As ISL has a simple knowledge of filesystems so can't handle split
filesystems, but Unix can.

Or, it could be that the FS is just a bit confused - to do this just do a
'fsck -y' when its booted.
================
The boot LVOL (lvol1) and SWAP LVOL are supposed to be contiguous.
If you just do lvextend ... /dev/vg00/lvol1 , then it will (most likely)
not be contiguous.
You must first free some space behind lvol1 (*contiguous* to it), before
doing the lvextend. This is done by first removing lvol2 (swap, which
normally follows lvol1, after an install), increasing /stand, then
re-creating lvol2/swap.

The correct way to extend lvol1 (/stand) is as follows:

Interrupt normal boot and boot into LVM maintenance mode:
at ISL, "hpux -lm"
===================
What is setboot output?
================
> 1. Extended a file system with commands lvextend and extendfs (I did not
> enter into single user mode before doing this).

lvol1 can only be extended CONTIGUOUSly, which normally means you have to
remove
the volume "physically AFTER it" on the disk first.
As THAT is the primary swap (lvol2), this can only be done when the system
is
running from a DIFFERENT disk.
So you probably totally f'd up your boot and will have to go to the recovery
system or instant ignite tape to try to get it working again (which may
involve
totally reinstalling the system or at least restoring it from the backup).

> Unable to mount /stand - please check entries in /etc/fstab

/stand (lvol1 in HP's standard layout) is essential to the boot. It has to
be physically first on the disk, contiguous and of the hfs file system.

Without a correct /stand that disk will not boot anymore, as you did find
out.

> I think there should be no problem with the hard disk on this host, right?
I

Next reboot you will have the same problem. The hardware (firmware,
actually)
cannot access your extended lvol1, so no automatic reboots are possible
anymore.
The trick you used you will have to use every time (and whenever you change
your
kernel, even that may not work anymore, that it currently works is due to
the
fact the kernel is still in the "old" part of the volume and the extended
part
of the volume isn't needed YET for the boot.

> my question is, can we recover the host to make it reboot normally without
> manually interference?

Only by backing up the /stand partition, RE-sizing the volume so that it is
totally contiguous (which probably means downsizing it to the original
size),
creating a new file system IN it and restoring the files in that fs from the
backup. As /stand isn't needed during running (only during BOOTING and
recon-
figuration of the kernel) you can probably do all that in one session (that
is
actually also the reason the "extendfs" worked, the file system is not
active
when the system is running normally).
Don't forget to rewrite the boot afterwards!
================

-----Original Message-----
From: Guan, Ping (Penney)
Sent: 2002年12月18日 18:24
To: hpux-admin@DutchWorks.nl
Subject: RE: [HPADM] HP B132L+ Can't Boot Normally After lvextend

I got some reply about my question, thanks a lot for all the kindly help!
I think I should make my problem more specific. Here is the output of bdf
and fstab file on the HP box (I made some cuts):

# bdf
Filesystem kbytes used avail %used Mounted on
/dev/root 86016 17214 64533 21% /
/dev/vg00/lvol10 1007616 200820 757542 21% /var
/dev/vg00/lvol9 512000 290344 207850 58% /usr
/dev/vg00/lvol8 86016 1407 79583 2% /tmp
/dev/vg00/lvol1 83733 27578 47781 37% /stand
/dev/vg00/lvol7 458752 163951 276426 37% /opt
/dev/vg00/lvol6 565248 8804 521726 2% /home1

# cat /etc/fstab
/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol6 /home1 vxfs delaylog 0 2
/dev/vg00/lvol7 /opt vxfs delaylog 0 2
/dev/vg00/lvol8 /tmp vxfs delaylog 0 2
/dev/vg00/lvol9 /usr vxfs delaylog 0 2
/dev/vg00/lvol10 /var vxfs delaylog 0 2

It's lvol6 that I extended, and now lvdisplay says lvol6 is not contiguous
but all the other file systems are contiguous. lvdisplay can display
/dev/vg00/lvol3, but can not display /dev/root.

# lvdisplay -vk /dev/root
lvdisplay: Cannot figure out the name of volume group to which
logical volume "/dev/root" belongs.
lvdisplay: Couldn't find the volume group to which
logical volume "/dev/root" belongs.
lvdisplay: Cannot display logical volume "/dev/root".

TIA, Penney

-----Original Message-----
From: Guan, Ping (Penney) [mailto:pguan@lucent.com]
Sent: 2002年12月17日 19:01
To: hpux-admin@DutchWorks.nl
Subject: [HPADM] HP B132L+ Can't Boot Normally After lvextend

Hello,

We have an HP B132L+ workstation with HP-UX 10.20 installed. Here is what I
have done with it and the problem:

1. Extended a file system with commands lvextend and extendfs (I did not
enter into single user mode before doing this).
2. After reboot, can not startup.
3. Boot from CD-ROM, at ISL prompt, enter 700support menu, rebuild only the
bootlif.
4. Reboot the host, here is the excerpt of the output:
    /dev/vg00/lvol1: CAN'T CHECK FILE SYSTEM
    /dev/vg00/lvol1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY
    /dev/vg00/lvol1: No such device address
    Unable to mount /stand - please check entries in /etc/fstab
5. # vgdisplay
       vgdisplay: Volume group not activated
       vgdisplay: Can not display volume group: "/dev/vg00"
6. After run the following commands, the machine can startup and all
services seems normal
    # vgchange -a y
    # init 3

I think there should be no problem with the hard disk on this host, right? I
suspect the problem can be resolved with reinstallation, but, there are some
special configurations with the host, it will take a lot of effort to
reconfigure it, besides, usually there is no console connected with it. So,
my question is, can we recover the host to make it reboot normally without
manually interference?

Thanks a lot in advance!
Penney

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact
majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner:
owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse
only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse &
search)
--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:23 EDT