Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3793
  • Last Modified:

mount HPUX drive on linux

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
  • 5
  • 3
  • 2
  • +3
1 Solution
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)
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.
rshinwellAuthor Commented:
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.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.

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)
rshinwellAuthor Commented:
No I dont have the HPUX system installed all I have is the hard drive with HPUX file system and a linux box
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.

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
rshinwellAuthor Commented:
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
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
Oops, should be capital "C" in `ioscan -fnC disk`...
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.

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 5
  • 3
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now