Operating System - HP-UX
1833995 Members
2771 Online
110063 Solutions
New Discussion

informative question on LVM maintenance boot

 
SOLVED
Go to solution
martin_215
Frequent Advisor

informative question on LVM maintenance boot

i have a question out of curiousity
suppose my lvm boot disk lose the LABEL file in lif and I am doing a maintenance boot from ISL to repair it

now I understand the root location is found from /stand/rootconf file
but how does it know the location of /stand filesystem so that it can locate /stand/rootconf in the first place

explaining further since lvm volume group wont be activated in maintenance boot,I guess the start and size of /stand filesystem should be know to the bootprogram so that it can locate the rootconf file from the filesystem
so how does it figure this out with LABEL file not available

thanks very much
10 REPLIES 10
Florian Heigl (new acc)
Honored Contributor

Re: informative question on LVM maintenance boot

If I remember correctly, the LABEL file is not involved in locating the /stand/rootconf, the mechanism for that should be directly in ISL.
The location of /stand to my understanding is easy - the first thing after the LIF area, marked by PAD. But I'll have to read up on this tomorrow - You got me curious now, too.
yesterday I stood at the edge. Today I'm one step ahead.
martin_215
Frequent Advisor

Re: informative question on LVM maintenance boot

well it need not have to be always that stand comes right after pad
further to get the filesystem data i think it should know the offset and size of filesystem

so even if offset of stand is standard,how about the size of /stand
which can vary as you define how large stand should be when you install the OS

so icant find an easy logic for its explanation
bet you guys would know it

this support forum has always been exciting

Solution

Re: informative question on LVM maintenance boot

Of course the hpux secondary system loader can know the size of the filesystem - it knows that the /stand filesystem will be the first thing on the disk after the LIF area, and it can get filesystem sizes from the header of the filesystem (the information is in there as well as in the LVM headers - otherwise every filesystem would *have* to be the same size as its volume - which it doesn't - I can create a LV of 1GB and then create a 800MB filesystem on it if I want...)

As long as hpux understands filesystem structures (which it does) its fine - incidentally this is why historically the /stand filesystem had to be hfs rather than vxfs like all the other filesystems - the hpux SSL didn't understand it...

HTH

DUncan

I am an HPE Employee
Accept or Kudo
Florian Heigl (new acc)
Honored Contributor

Re: informative question on LVM maintenance boot

The size of /stand is no problem - after the kernel is loaded and initialized LVM it gets the root location of of /stand/rootconf.

If You read up on the (very few) howtos for recreating the rootconf file, You'll see the address in there is enough data to find an absolute location.

You're right that the PAD file is no real indication, I was mistaken on that. on our root mirrors the PAD file is not there.
yesterday I stood at the edge. Today I'm one step ahead.
Florian Heigl (new acc)
Honored Contributor

Re: informative question on LVM maintenance boot

Write content of LABEL file, i.e set root, boot, swap and dump device:
NOTE:This step can be omitted if you replace a failed mirror disk. Then this information has already
been restored by vgcfgrestore. To be sure to have the latest information on the disk just do the
following steps.
# lvlnboot -r /dev//lvol3
# lvlnboot -b /dev//lvol1
# lvlnboot -s /dev//lvol2
# lvlnboot -d /dev//lvol2
# lvlnboot â v (to ckeck it)

You're right about the LABEL file.
But You could easily recreate it, unless root would be NOT lvol3, which iirc is unsupported.

On the other hand I have no idea, what this will look like with VxVM, but it should be simil
yesterday I stood at the edge. Today I'm one step ahead.
martin_215
Frequent Advisor

Re: informative question on LVM maintenance boot

thanks for all ur answers
so I understand this now a bit
the lvm header or filesystem super block is read in by ISL and then it locates the size of filesystem
and then find location of /stand/rootconf and there it goes..

by the way I dont see why is root restricted to be always on lvol3?
as long as LABEL file has the offset and size of root filesystem and rootconf has it
what difference does it makes what logical volume name it is

in this matter I find solaris very straightforward.mainly bcos of the volume table of contents( part table) and device naming including the slices like
/dev/dsk/c0t0d0s0 thru /dev/dsk/c0t0d0s6

but as long as it works it doesnt matter how they implement it
Patrick Wallek
Honored Contributor

Re: informative question on LVM maintenance boot

It's not the name that matters so much as the location on the disk of the LVOLs. You could very well have /dev/vg00/stand /dev/vg00/swap and /dev/vg00/root and things should still work perfectly. They key is that those 3 LVs must be the first 3 on the disk and must be contiguous.

And actually you don't even have to name the VG vg00. I had a machine, set up by a previous admin, that was configured as vgboot or vgroot or something like that.
martin_215
Frequent Advisor

Re: informative question on LVM maintenance boot

So is it mandatory that
stand should come first
then root
and then swap

I can understand why stand should come first
what about root and swap
as long as rootconf points to right location of root does it matter if root or swap comes first
Florian Heigl (new acc)
Honored Contributor

Re: informative question on LVM maintenance boot

To my understanding the position of the pri swap space is needed to be hardcoded, because a GSP-initiated dump goes there (Tranfser of Control). The GSP (luckily in terms of patching) knows nothing of filesystems, but simply fills the swap space with as much as he can squeeze in there.
yesterday I stood at the edge. Today I'm one step ahead.
martin_215
Frequent Advisor

Re: informative question on LVM maintenance boot

thankyou everybody for the answers
igot a good understanding of it now
appreciate all ur inputs