How to mount HPUX 10.20 VxFS logical volumes in a modern linux environment

This is a problem that I’ve wanted to tackle for quite some time. Since I’m using SCSI2SD and also messing around with a few different logic analyzers, I’ve got several HDD images that include both data files and operating system files. When they are sitting on my machine, they are just these huge masses of data, essentially HDD-sized chunks. Of 4GB, 16GB, 32GB and so on. Sometimes, I want to peer into them, or compare contents…..or literally any other manipulation beyond just coping/moving them around.

To capture a disk image,I use a SCSI card inside my linux box. The support for these older parallel SCSI cards is actually quite good, despite falling out of favor to newer interfaces. You should be able to find either a used one or NOS(new old stock) on ebay for under $30 shipped, I’d think.

While dd is quite useful, any time I deal with old disk drives, you never know when your next read is your last read. I highly suggest using ddrescue, which is a tool that allows for smart recovery of corrupted, compromised drives. It will allow you to recover the good parts quickly, skipping over the bad parts in order to retrieve the bulk(hopefully) of the disk first. Then it makes multiple trimming, scraping, and retrying passes until you tell it to stop. My most recent 16700A HDD was damaged, so I elected to make (10) passes on each unreadable sector(or group of sectors)  before truly declaring it unreadable. I recovered 99.99%, losing only 500kb on a 4.55GB drive. Really amazing and smart software!

HPUX 10.20 uses a few different file system types, not unlike modern linux systems. It uses both HFS for /stand, which contains the kernel. And VxFS, the Veritas File System for some other logical volumes.

This is the logical volume layout for an HP 16700A logic analyzer :

LVM_DISK “SEAGATE ST34520N ” /dev/dsk/c0t6d0 8/16/5.6.0 4340 /dev/vg00
LVM_LAYOUT /dev/vg00: ” ” ” ” ” ”
LVM_LAYOUT /dev/vg00/lvol1 /stand 48 hfs
LVM_LAYOUT /dev/vg00/lvol2 swap 1536 ” ”
LVM_LAYOUT /dev/vg00/lvol3 / 800 vxfs
LVM_LAYOUT /dev/vg00/lvol4 /hplogic 1948 vxfs
LVM_LAYOUT /dev/vg00/lvol5 /home 4 vxfs

You have physical volumes (PVs) which are disks, usually SCSI. You’ve got VG’s, which are volume groups, which house the logical volumes (LVs).

You can mount those last three, lvol3, lvol4, and lvol5 easily on a modern Ubuntu box.

You need two things:

  • a copy of linux-vxfs, which a standard user application that looks inside the entire disk image, and separates the logical volumes. It uses dmsetup to set starting and ending blocks of each logical volume. This is distributed as source-only, but compiles using make/gcc easy enough.
  • the native built-in-to-many-kernels support for freevxfs in Ubuntu. (modprobe freevxfs; lsmod | grep vxfs) Note that certain distributions DO NOT (Manjaro based on Arch, and Fedora 30/32 do not!) include support any longer for VXFS, but even the latest Debian-based ones do. I’ve tested this on Ubuntu 18.04 LTS, and that would be my suggestion to ensure compatibility.

Setup instructions.

  1. Download linux-vxfs, and untar it into a folder.
  2. There’s a slight modification required for the linux-vxfs-160607.tgz version to run on Ubuntu. See the PATCH section below.
  3. Ensure that you have the latest version, linux-vxfs-200324.tgz.
  4. “make” and ignore the warning about pxspace being unused
  5. “./hpux_dmsetup create <fulldiskimagegoeshere>.bin
  6. It should list out several volumes and then say “VG VG%d Activated succesfully with %d lvols.”
  7. You should see a series of entries in /dev/mapper, which are symlinks to /dev/dm-0, /dev/dm-1, etc
  8. Next mount the image: “mount -t vxfs /dev/mapper/blahfromsteps5and6 <insert mountpoint here>”

Note that vxfs has read-only support — so you cannot write to these mounts!

PATCH to hpux_dmsetup.c.

There’s a minor bug/compatibility issue with linux-vxfs in a modern Ubuntu environment. While we’re not sure the exact mechanism for the problem, this small fix handles it.

You need to find and edit simply two lines — replace the top line with the bottom line:

< n = snprintf(cmd, 255, “echo -e \””);

> n = snprintf(cmd, 255, “echo \””);
< n += snprintf(cmd + n, sizeof(cmd) – n – 1, “%d %d linear %s %d\n “,

> n += snprintf(cmd + n, sizeof(cmd) – n – 1, “%d %d linear %s %d”,

Note that none of this would be possible without the hard work of Krzysztof Błaszkowski and Christoph Hellwig before him. Great work guys!

UPDATE: I’m working with the developer to increase the robustness and reliability of the userspace tool linux-vxfs. I’ve tested the changes successfully, and it will be published soon. The patch above will work until a newer version is released.


Amateur Electronics Design Engineer and Hacker


  • I’ve been looking for this info for about a week now. I’ve seen your site before but I must have just missed this. I’m working on a couple of 16700Bs. I’m hoping to have a working HPUX with a real desktop environment with some kind of editor, SSH and bash. I’m still using leftover mechanical scsi drives. I appreciate you sharing this info. I’m going to give this a try right away.

    • BigK,

      No problem. Happy to know someone finds it useful!

      You need to to check out

      if you haven’t already, as it contains binaries pre-built for 10.20. I’d recommend first getting wget, unzip, bzip2, and so on because it will be required for some downloads.

      BASH(I’ve tried all good) and SSH(I’m still using telnet) is out there.

      SCSI2SD’s replacing the HDD’s does help — order from inertial computing in the US. Between the drive, and doing a fan replacement should really add life and quiet down the chassis. Replace your coin cell too, if you haven’t.

      Good luck and reach out via email if you get stuck!

  • What file should I be looking for to make the changes you describe in your patch?

    As a test bed I’m running XUbuntu 18.04. I have a good 9.2 GB raw IMG file created with DDrescue.

    This is a paste from my terminal:

    bigk@TestBed:~/Downloads/work$ sudo ./hpux_dmsetup create LA1original.img
    One or more lvols could not be activated.

    Obviously I’ve missed something. I’m way out of my element regarding this type of filesystem.

    Any help would be appreciated.

    • Show me lines 70-85 after you’ve applied the patch to hpux_dmsetup.c. If you didn’t apply the patch, it will definitely error out.

      Add -vv to the command so hpux_dmsetup create -vv imgname and show me the output.

    • Hey Keith

      Making good progress. Thank you!

      Should I use cli swinstall to install bash? I’ve got from but I’m struggling with this “software depot” thing.

      How did you go about it?

      • Are you following the instructions from that site? Directly above the downloads?

        swinstall -s `pwd`/ foo

        Replace foo with bash.

        That last trailing foo is important — if you exclude it, it will launch the console-based install GUI, which isn’t hard to use but will take you 3 times as long to install. I don’t know what the significance of that is, but I’ve been choosing relevant names in case I need to come up with it in the future.