mount HPUX drive on linux

Posted on 2003-03-10
Medium Priority
Last Modified: 2013-12-06
I have a SCSI drive with HPUX file system. I need to backup the content of the drive. Is there any way I can mount the HD using my linux box. Or is there any other way
Question by:rshinwell
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +3
LVL 21

Expert Comment

ID: 8102138
If they are networked, you can NFS export the filesystems from the HP and mount them on the Linux server.

I would suggest exporting them Read-only but allowing the Linux box root-equivalence so it has full permissions (-o ro, root=linuxhostname)
LVL 21

Expert Comment

ID: 8102180
Oops - I see you only have the disk, NOT an HP system!

If the disk has an hfs filesystem on it, I suspect you'll need an HP system to recognise the filesystems. If it uses vxfs, you may have more luck getting another operating system to recognise the filesystems (assuming the Linux box has Veritas software on it)

Otherwise, you can use "dd" to read from the raw filesystem & dump to tape, e.g. `dd if=/dev/rdsk/devname of=/dev/rmt/0m`. But this won't really help you read the actual contents of the drive.

Author Comment

ID: 8102229
The problem is the Drive is faulty so all I need to do is backup the content. How do I tell what the devname is of the drive or even if the drive is being recognised.
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

LVL 21

Expert Comment

ID: 8104216
I'm still confused about your setup:
Do you have an HP system with this disk in it? If so, can you boot the system & fsck + mount filesystems from the faulty disk? Are the filesystems jfs (vxfs) or hfs? Does the system have a tape drive?

The disk should do some bad block reallocation automatically, but LVM can also de-allocate bad blocks.

However, if the disk is now attached to a Linux system, trying to repair it may cause further loss of data. I don't know Linux administration, but hopefully someone else can tell you how to add a disk. It may help if you give some details of the Linux system.

LVL 14

Expert Comment

ID: 8104927
If the drive is faulty, then all is lost.

Otherwise, HP's filesystems are slightly bastardized versions of standard filesystem designes.

So your best bet is to get/borrow/whatever an HP box, mount the disk, and copy the data off the filesystem either via the network (SAMBA, NFS, rsh, ssh, etc.) or tape (tar, cpio, etc)

Author Comment

ID: 8105320
No I dont have the HPUX system installed all I have is the hard drive with HPUX file system and a linux box
LVL 14

Expert Comment

ID: 8105512
I know you don't have an HP-UX system. But you're going to need one. Whether it's owned by you (about $500 on eBay for a rock-bottom system), a friend, or a company specializing in data recovery.

Expert Comment

ID: 8109463

This might be a stupid question. If you don't have a HPUX system, why do you need a backup of the data on the drive ?

If the drive failed in a HPUX system and was replaced and now you want to mount it in Linux, if the HPUX system wasn't able to access drive anymore, why should any other OS be able to access it ?

/Hans - Erik Skyttberg

Author Comment

ID: 8109658
Ive been given the drive to restore I can however get access to  a HPUX box. How do I mount the drive. Where do  SCSI drive come under in the /dev/ folder
LVL 21

Accepted Solution

tfewster earned 820 total points
ID: 8110083
Run `ioscan -fC disk`, then `insf -e` to install the special device files. You can then create a new volume group manually and vgimport (see below) the disk into the new volume group. lvdisplay will then show you the Logical Volumes on the disk, each of which will need to be fsck'd and mounted.

To add the disk:
Compare the output of `ioscan -fnc disk` and `strings /etc/lvmtab` to identify disks that are NOT yet in a volume group.

Check the minor numbers on the importing system with:

    # ll /dev/*/group

Create the directory and the group special file:

    # mkdir /dev/vgXY
    # mknod /dev/vgXY/group c 64 0xXY0000

(XY is the next available "group" number)

Import without map file
    # vgimport vgXY /dev/dsk/cCtTdD
    # vgchange -a y vgXY
    # vgcfgbackup vgXY
LVL 21

Expert Comment

ID: 8110093
Oops, should be capital "C" in `ioscan -fnC disk`...

Expert Comment

ID: 8143321
Ummm , Hope I am wrong , you will not possible to mount hpux (may be hfs or vxfs ) file system to linux which is us ext2 or ext3 file system.
May be you can find 3rd party for linux that can served this. But normally it is not possile.

Expert Comment

ID: 8145758

OK, very simple steps, just follow:

(1) Let say,
* hosta (HP-UX) and hostb(Linux)
* You wanna share hosta@/tmp to hostb(Linux)

(2) In hostb(Linux),
(root@hostb) # cd /mnt
(root@hostb) # mkdir hpux
(root@hostb) # chmod 755 hpux

(3) In hosta(HP-UX),
(root@hosta) # cd /sbin/init.d
(root@hosta) # ./nfs.core stop
(root@hosta) # ./nfs.server stop
(root@hosta) # ./nfs_client stop
(root@hosta) # ./nfs.core start
(root@hosta) # ./nfs.server start
(root@hosta) # ./nfs.client start
(root@hosta) # cd /etc/exports
               #-- add a entry --#
               /tmp    -root=hostb
               #-- end --#
(root@hosta) # exportfs -va

(4) In hostb(Linux),
(root@hostb) # cd /etc/init.d
(root@hostb) # ./nfs stop
(root@hostb) # ./nfs start
(root@hostb) # mount -t nfs hosta:/tmp /mnt/hpux
(root@hostb) # df -k  #-- you should see /mnt/hpux is mounted.

(5) In hostb(Linux), you could copy or tar from /mnt/hpux to your destination filesystem or DIR.

(6) Done. Easy?


Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded‚Ķ
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question