Operating System - HP-UX
1827286 Members
1647 Online
109717 Solutions
New Discussion

Re: How to mount another bootable LVM disk ?

 
SOLVED
Go to solution
Jeroen_D
Regular Advisor

How to mount another bootable LVM disk ?

Hello,

someone (and no, it wasn't me) has removed something (he said in the /tmp)
and it now comes down to a disappearance of the kernel. There is no
kernel.prev either. After reboot, we can get into ISL but that's it.
Starting : hpux -is does not help. The disk has a LVM-layout.

I have the installation CD of HP-UX 10.20 and I could also try to make it rebuild the kernel. Is this safe ?

We really need the data on that disk. I've attached the disk to a working
HP-UX station and want to mount it. If the disk would be using the whole
disk architecture, it would be a simple mount, but this disk has LVM....

I am thinking of vgscan and SAM checking for disks, but I am not certain.
The data on the disk is valuable so mistakes are not allowed. I was thinking
of vgimport too, but I don't think there can be 2 vg00's, so that is
something I will not try.

Anyone experience with this ? Is running SAM ok ? Because SAM does a lot of
things behind your back, I am kinda worried....

Any help will be vastly appreciated,
Jeroen.
5 REPLIES 5
Stefan Farrelly
Honored Contributor

Re: How to mount another bootable LVM disk ?


2 ways to do this.

1. create another boot device/disk using the HP UX install CD or an ignite tape. Boot from it. create a new VG (say VG01), import the old boot disk (which wont boot anymore) into vg01, then you can mount its lvols (except swap) and pull off the data you need.

2. use the recovery CD. Boot from it, it has an option to create a new kernel on your current unbootable disk. Once this is done you will be able to reboot back off your current disk.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Ajitkumar Rane
Trusted Contributor
Solution

Re: How to mount another bootable LVM disk ?

Jeroen,

Well as you have connected this disk to a working system. you can import the disk as a different vol group and mount the filesystems as you wish.I have done this before when some one by mistake had deleted the kernel.And It worked for me fine. This was how I did it.
Connect the root disk from which the kernel was deleted to a working machine.
Import the disk.
#ioscan -fnC disk (note the dev file of this disk)
#mkdir /dev/vgXY
#mknod /dev/vgXY group c 64 0xXY0000
#vgimport -v /dev/vgXY /dev/dsk/cxtyd0
#vgchange -a y vgXY
#mkdir /temp-mount-points,
#mount -F fstype /dev/vgXY/lvolN /temp-mount -point.
If you have a b/u of the root disk of which kernel was deleted you can just restore the kernel and just export the disk and connect it back to the original machine.
#vgchange - a n /dev/vgXY
#vgexport -v /dev/vgXY
Or just b/u your important data data.

I hope this will help

Goodluck
Ajit

Amidsts difficulties lie opportunities
Marcos Tinoco Garcfa
Occasional Advisor

Re: How to mount another bootable LVM disk ?

I think that you can do following:
1.Put and boot the system with CD-Recovery HP-UX 10.20, (if you have HP9000 series 800 with serie 800 only or series 700 if you have one)
2.-In IPL or ISL run support800
3.-Choose the option "Generate Mini-Kernel" and commands minimal"

if you want specific instructions, you can write me.

I hope help you.
Marcos Tinoco Garcfa
Jeroen_D
Regular Advisor

Re: How to mount another bootable LVM disk ?

I got the system back up and running.

I already tried to rebuild the kernel with the boot-CD, but it asked for the rootconf-file which was gone, like all other data in /stand. All other things on the core/recovery CD did not work either. I couldn't get to the vgimport-file as that one is actually another, quite large file that could not be loaded due to not enough space.

When I booted with another bootable disk, attached externally, I got the error : could not load LVM configuration (something like that). Booting with hpux -is did not help as I needed access to its logical volumes.

My solution was reinstalling HP-UX on a spare system using the whole disk architecture. I got the system booted up in single usermode (CDE could not get started) and I could vgimport its volume group. I followed the instruction of the person whom I gave 10 points. A remark though : there is a type there : mknod /dev/vgXY/group c 64 0xXY0000 => there has to be a "/" between vgXY and group. I am too happy to give him a 9 though :)

Anyway : I mounted the logical volumes and had some brainwork to do but I got everything back.
I also checked the .sh_history-file of root.
It appears someone tried to delete the hidden files in /tmp by typing : rm -R .*
As you guru's all know, this can also mean : rm -R .. and as such erasing all data in the upper directory....

They had lost there /stand and data in their /etc which I restored from tape.

Thx to all who helped me on this one !
Jeroen.
Jeroen_D
Regular Advisor

Re: How to mount another bootable LVM disk ?

I got the system back up and running.

I already tried to rebuild the kernel with the boot-CD, but it asked for the rootconf-file which was gone, like all other data in /stand. All other things on the core/recovery CD did not work either. I couldn't get to the vgimport-file as that one is actually another, quite large file that could not be loaded due to not enough space.

When I booted with another bootable disk, attached externally, I got the error : could not load LVM configuration (something like that). Booting with hpux -is did not help as I needed access to its logical volumes.

My solution was reinstalling HP-UX on a spare system using the whole disk architecture. I got the system booted up in single usermode (CDE could not get started) and I could vgimport its volume group. I followed the instruction of the person whom I gave 10 points. A remark though : there is a type there : mknod /dev/vgXY/group c 64 0xXY0000 => there has to be a "/" between vgXY and group. I am too happy to give him a 9 though :)

Anyway : I mounted the logical volumes and had some brainwork to do but I got everything back.
I also checked the .sh_history-file of root.
It appears someone tried to delete the hidden files in /tmp by typing : rm -R .*
As you guru's all know, this can also mean : rm -R .. and as such erasing all data in the upper directory....

They had lost there /stand and data in their /etc which I restored from tape.

Thx to all who helped me on this one !
Jeroen.