- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Need HELP w/ HPUX 10.20, attaching other disks, vo...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2020 01:05 PM
тАО03-16-2020 01:05 PM
I've got two systems running HPUX 10.20. First system boots fine, second one has a corrupted hard drive. I've ddrescue'd 99.99% of the contents on the second drive onto fresh media. I've attached that drive to the first system.
Drive shows up as /dev/dsk/c0t5d0 w/ "ioscan -fnC disk"
I have no clue how to mount and access the contents of that disk.
What's the full procedure and commands to allow me to do that?
I've tried creating a new volume group, but I have no idea if that's even necessary (does it need activated?) or how to associate the physical disk with it. And then I mount the logical volumes to a mountpoint?
Any document or book references that explain these various concepts?
Are there more modern ways of mounting this disk image in linux?
HELP!@#
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2020 01:47 AM - last edited on тАО06-29-2021 04:49 AM by Ramya_Heera
тАО03-17-2020 01:47 AM - last edited on тАО06-29-2021 04:49 AM by Ramya_Heera
Re: Need HELP w/ HPUX 10.20, attaching other disks, volume groups, logical volumes, and bears oh my!
Greetings,
I am glad to see that you were able to recover 99.99 % of the data on to a new media. I am not sure how you did it but let me first state that this is an unsupported way to recover an unbootable disk. So, results are not guarenteed.
The supported way is to Run a Recovery Shell either from Installatio/Recovery Media or Ignite backup. Recovery Shell is an interactive session with several options including "Recover and Unbootable System" (it varies depending on the version of HP-UX. Since 10.20 its options may be different. By the way it is no longer supported). Here is an example:
s. Search for a file
b. Reboot
l. Load a file
r. Recover an unbootable HP-UX system
x. Exit to shell
c. Instructions on chrooting to a lvm /(root).
The option "r" is the best and easiest way to go. It will then take you to the next session:
HP-UX Recovery MENU
Select one of the following:
a. Rebuild the bootlif (ISL, HPUX, and the AUTO file) and install
all files required to boot and recover HP-UX on the
root file system.
b. Do not rebuild the bootlif, but install files required to boot
and recover HP-UX on the root file system.
c. Rebuild only the bootlif.
d. Replace only the kernel on the root file system.
m. Return to 'HP-UX Recovery
Depending on the nature of the issue, you need to use one of the above.
You may exit to shell (loaded onto RAM) and then use the following commands to import vg00. Some examples of the commands that can be used:
Importing vg00
# loadfile lvchange vgimport vgdisplay vgchange
# loadfile lvlnboot lvrmboot ioscan
# mkdir /dev/vg00
# mknod /dev/vg00/group c 64 0
# vgimport vg00 /dev/dsk/cXtXdX (you need to get this device correct. You may use ioscan that we loaded before to identify)
# vgchange тАУa y vg00
Checking file system on each lvol
# loadfile /sbin/fs/hfs/mount /sbin/fs/hfs/fsck
# loadfile /sbin/fs/vxfs/mount /sbin/fs/vxfs/fsck
# /sbin/fs/hfs/fsck /dev/vg00/rlvol1
# /sbin/fs/vxfs/fsck -o full /dev/vg00/rlvol3 (repeat for other lvols)
Mounting lvols of vg00
# mkdir /ROOT
# /sbin/fs/vxfs/mount /dev/vg00/lvol3 /ROOT
# /sbin/fs/hfs/mount /dev/vg00/lvol1 /ROOT/stand
# /sbin/fs/vxfs/mount /dev/vg00/lvol4 /ROOT/opt
# /sbin/fs/vxfs/mount /dev/vg00/lvol5 /ROOT/tmp
# /sbin/fs/vxfs/mount /dev/vg00/lvol6 /ROOT/usr
# /sbin/fs/vxfs/mount /dev/vg00/lvol7 /ROOT/home
# /sbin/fs/vxfs/mount /dev/vg00/lvol8 /ROOT/var
Changing from RAM to ROOT of the mounted file system
# loadfile chroot
# cd /ROOT
# chroot /ROOT /sbin/sh
Check and ensure the root, boot and swap/dump is configured ok
# lvlnboot -v
Coming to your approach of using " /dev/dsk/c0t5d0" on the other server. As I mentioned this is not a suported way.
Check LIF header
# lifls -l /dev/rdsk/c0t5d0
Compare it with the working root disk. If the contents are looking good, you may copy them using lifcp as follows:
# lifcp -T <type> <sourcedevice:file> <targetdevice:file> {get type and file from the output of lifls of the good root disk}
You can import this disk onto a test vg
# mkdir /dev/vgtest
# mknod /dev/vgtest/group c 64 0
# vgimport vgtest /dev/dsk/c2t0d0
# vgchange тАУa y vgtest
# vgdsiplay -v vgtest
run file system check on all vols of vgtest
# /sbin/fs/hfs/fsck /dev/vgtest/rlvol1
# /sbin/fs/vxfs/fsck -o full /dev/vgtest/rlvol3 (repeat for other lvols)
Create test mount for all lvols of vgtest such as
# mkdir /TESTROOT
# /sbin/fs/vxfs/mount /dev/vgtest/lvol3 /TESTROOT
# /sbin/fs/hfs/mount /dev/vgtest/lvol1 /TESTROOT/stand
# /sbin/fs/vxfs/mount /dev/vgtest/lvol4 /TESTROOT/opt
# /sbin/fs/vxfs/mount /dev/vgtest/lvol5 /TESTROOT/tmp
# /sbin/fs/vxfs/mount /dev/vgtest/lvol6 /TESTROOT/usr
# /sbin/fs/vxfs/mount /dev/vgtest/lvol7 /TESTROOT/home
# /sbin/fs/vxfs/mount /dev/vgtest/lvol8 /TESTROOT/var
Check if root, boot and swap/dump are marked ok
# lvlnboot -v vgtest
If not marked correctly use the following commands:
# lvlnboot -r /dev/vgtest/lvol3 vgtest
# lvlnboot -b /dev/vgtest/lvol1 vgtest
# lvlnboot -s /dev/vgtest/lvol2 vgtest
# lvlnboot -d /dev/vgtest/lvol2 vgtest
Check the output again:
# lvlnboot -v vgtest
If all looks good, you may unount lvols of vgtest and then use it on the other server. It is better to boot the server up in LVM Maintenance Mode (use hpux -lm at ISL)
NOTE : These steps were not tested, as such they are not supported. So, results are not guarenteed. Users/Admins discretion is strictly advised.
I am a HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2020 09:27 PM
тАО03-17-2020 09:27 PM
Re: Need HELP w/ HPUX 10.20, attaching other disks, volume groups, logical volumes, and bears oh my!
Thanks for the detailed response!
In case you were wondering how I was able to achieve such a high level of recovery on a bad disk, I attached the SCSI disk to a Linux box, and used ddrescue to perform multiple reads until all possible sectors could be read. It recovered most of the 4.5GB, with only 500kb being unrecoverable.
I'm struggling in a few ways:
My ignite boot disk gives me an option to Install HP-UX or access the recovery shell. I can't seem to find the option "Recover an unbootable HP-UX system" or "HP-UX Recovery MENU" any place. The corruption seems minor --- but crashes the boot almost immediately once it starts. My goal here is to check to see if there's any user data present on the disk --- I know I can reload this from scratch, but there's possibly some useful things present, which is why I'm trying to mount that disk.
I'm trying to attach the restored disk to the second, working system below:
Notice that my disk name is now c0t3d0 and the vgname I picked was "vgc2"
I struggled with the vgimport step below until I figured out that you can't duplicate a device major number across multiple vg's. This means you have to use a major number other than zero, if there is already one present. This means changing "# mknod /dev/vgtest/group c 64 0" to something like "# mknod /dev/vgtest/group c 64 0xnn0000, where nn is another larger number, like 01,02,03, and so on."
<hostname>:/dev/vgc2> vgimport -v /dev/vgc2 /dev/dsk/c0t3d0
Beginning the import process on Volume Group "/dev/vgc2".
vgimport: Warning: Volume Group belongs to different CPU ID.
Can not determine if Volume Group is in use on another system. Continuing.
Logical volume "/dev/vgc2/lvol1" has been successfully created
with lv number 1.
Logical volume "/dev/vgc2/lvol2" has been successfully created
with lv number 2.
Logical volume "/dev/vgc2/lvol3" has been successfully created
with lv number 3.
Logical volume "/dev/vgc2/lvol4" has been successfully created
with lv number 4.
Logical volume "/dev/vgc2/lvol5" has been successfully created
with lv number 5.
Volume group "/dev/vgc2" has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.
I can't activate my newly created volume group, though, because I can get error:
"<hostname>:/dev> vgchange -a y -q n /dev/vgc2
vgchange: Couldn't activate volume group "/dev/vgc2":
Quorum not present, or some physical volume(s) are missing."
vgscan shows the volume group and the associated physical disk entry. Doing a strings on /etc/lvmtab also shows two entries.
<hostname>:/dev> vgscan -v
vgscan: Warning: couldn't query physical volume "/dev/dsk/c0t3d0":
The specified path does not correspond to physical volume attached to
this volume group
vgscan: Warning: couldn't query all of the physical volumes.
vgscan: The physical volume "/dev/dsk/c0t3d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c0t6d0" is already recorded in the "/etc/lvmtab" file.
Physical Volume "/dev/dsk/c0t0d0" contains no LVM information
Physical Volume "/dev/dsk/c0t4d0" contains no LVM information
/dev/vgc2
/dev/dsk/c0t3d0
/dev/vg00
/dev/dsk/c0t6d0
Scan of Physical Volumes Complete.
vgdisplay -v simply shows
"vgdisplay: Volume group not activated.
vgdisplay: Cannot display volume group "/dev/vgc2"
It shows the other working VG just fine.....
Any thoughts? Thanks again!
Keith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2020 03:15 PM
тАО03-21-2020 03:15 PM
SolutionNever got this to work.
I did end up working the problem another way.
I managed to find a solution (and fix a bug with it!) to mounting an HPUX 10.20 image on a modern linux box. It's easy once you know how, so I posted a blog entry with instructions:
https://www.techtravels.org/2020/03/mount_hpux_in_linux/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2020 07:23 PM
тАО03-22-2020 07:23 PM
Re: Need HELP w/ HPUX 10.20, attaching other disks, volume groups, logical volumes, and bears oh my!
Greetings,
I am sorry I missed your previous post. Quite and interesting way you were able to restore the vg (of course not supported/recommeded by HPE).
All the best and looking forward to work with you again!
I am a HPE Employee