Operating System - HP-UX
1833838 Members
2449 Online
110063 Solutions
New Discussion

Re: Recovery Shell LVM devices

 
SOLVED
Go to solution
Richard Munn
Frequent Advisor

Recovery Shell LVM devices

If booting into the recovery shell there are devices in /dev/dsk and /dev/rdsk of the form c0t6d0s2lvm which have major numbers of 31 and minor numbers something like 0x006012

The S1lvm device is for stand and s2lvm is for root.

Is it possible, by creating other device files, to mount other logical volumes. I want to do this without chroot'ing to the root lv on the disk.

I have tried this but I'm not sure that the minor numbers actually line up with and simply get not a vxfs filesystem if trying to mount through the block device I create for another logical volume.
6 REPLIES 6
Karvendhan M
Frequent Advisor

Re: Recovery Shell LVM devices


Load the reqd lvm commands and import the vg you want to work with.


# loadfile lvchange vgimport vgcreate vgchange

# mkdir /dev/vg00

# mknod /dev/vg00/group c 64 0x000000

# vgimport /dev/vg00 /dev/dsk/cxtxdx


~ Karvendhan M
Richard Munn
Frequent Advisor

Re: Recovery Shell LVM devices

The suggestion in the last reply sounds good but it won't work. For a start vgimport is linked to pvcreate and there is not enough space on the memory filesystem to loadfile pvcreate let alone anything else even if you delete nearly everything.
U.SivaKumar_2
Honored Contributor

Re: Recovery Shell LVM devices

Hi,
No way ..
Recovery shell is not fully functional like a normal root shell.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Karvendhan M
Frequent Advisor
Solution

Re: Recovery Shell LVM devices




No Say?

I also had problems that loadfile reports not enough space but that is with 10.20 cd set.

You are saying all vg commands are link to pvcreate. Then it is 10.20 if I am correct.

use an 11 or 11i install CD. You might have received one from HP.


Last 2 months i did the same thing lot of times (successfully)



1) I have resized lvs in the same manner.

2) I have created a boot/root vg to boot the INSTALL ignite kernel on machines which didn't boot over the net there is no boot helper.


Don't try anything, Instead DO it.

~ Kars
Dietmar Konermann
Honored Contributor

Re: Recovery Shell LVM devices

It is of course possible to load the lvm commands (it's actually oly one single executable, of course). Maybe you need to remove other commands 1st... OK. I usually remove the fsck and mount command and reload them later.

I you use current CD or Ignite revisions, there should enough space in the RAMFS anyway. But also with older revisions you can increase it. All this stuff is described the "System Recovery" chapter of the Software Recover Handbook.

Concerning the *s1lvm and *s2lvm device files... here some background information:

No, you cannot directly access other lvols using this feature.

The *s1lvm always points to the boot lvol on disk (normally lvol1)... it always starts at offset 2912K, which is the header size of all bootable LVM disks.

The *s2lvm initially points to the same location... but there is a tool called "ioct", which reads /stand/rootconf and configures *s2lvm to point to the root lvol (normally lvol3).

So this is what is actually done:

- mount *s1lvm to get access to the rootconf
- load/run ioct tool to configure *s2lvm
- umount *s1lvm
- mount *s2lvm as /ROOT
- mount *s1lvm as /ROOT/stand

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Richard Munn
Frequent Advisor

Re: Recovery Shell LVM devices

OK it's all sorted out. I tried the 11i recovery shell as suggested and it worked without a hitch even though the system is 10.20 based.

I can quite easily loadfile the lv/vg command required, mount whichever files lvols, newfs root and restore it.

It looks like the April 1999 CD has some real nasty gotchas.

Thanks all.