HP-UX — Complete Guide to Enterprise UNIX
In this tutorial, you'll learn about HP. We cover key concepts, practical examples, and best practices to help you understand and apply this topic effectively.
HP-UX is Hewlett-Packard's enterprise UNIX operating system for HP Integrity and PA-RISC servers, featuring the LVM storage stack, Ignite-UX automated provisioning, Serviceguard clustering for 99.999% uptime, and comprehensive system administration tools like SAM and swinstall.
What You'll Learn & Why It Matters
In this tutorial, you'll master HP-UX 11i v3's core capabilities: LVM for flexible storage management, Ignite-UX for network-based OS deployment, Serviceguard for high-availability clustering, and the SAM/swinstall toolchain for day-to-day administration. HP-UX powers the world's most demanding HP-UX environments — from airline reservation systems to hospital patient databases — where a minute of downtime can mean millions in losses.
Real-world use: Emirates Airlines runs its entire reservation and flight operations on HP-UX. Siemens healthcare uses HP-UX for MRI and CT scan image processing. The London Ambulance Service trusts HP-UX for its emergency dispatch systems. When lives are on the line, HP-UX delivers.
The HP-UX Legacy
HP-UX debuted in 1984 as Hewlett-Packard's version of AT&T System V UNIX. It has since evolved through three major lineages — on HP 9000 (PA-RISC), HP Integrity (Itanium), and now HP Integrity with x86 compatibility layers.
graph LR
HPUX1["HP-UX 1.0 (1984)
Series 200/500"] --> HPUX10["HP-UX 10.0 (1995)
SAM, CDE, LVM"]
HPUX10 --> HPUX11["HP-UX 11.0 (1997)
64-bit, JFS,
Volume Manager"]
HPUX11 --> HPUX11iv1["HP-UX 11i v1 (2000)
Serviceguard,
Ignite-UX"]
HPUX11iv1 --> HPUX11iv2["HP-UX 11i v2 (2003)
Itanium support,
Virtual Partitions"]
HPUX11iv2 --> HPUX11iv3["HP-UX 11i v3 (2007)
Current major release
TSUE, VxFS,
Multi-core support"]
style HPUX11iv3 fill:#1565C0,color:#fff
style HPUX11 fill:#FF9800,color:#fff
HP-UX LVM: Storage Management Done Right
HP-UX's Logical Volume Manager is the foundation of its storage stack. While Linux LVM was inspired by HP-UX LVM, the HP-UX version is more battle-tested and feature-rich in enterprise scenarios.
Physical Volumes, Volume Groups, and Logical Volumes
The hierarchy is familiar if you've used any LVM system:
- Physical Volume (PV) — a disk or disk partition
- Volume Group (VG) — a pool of PVs
- Logical Volume (LV) — a virtual disk carved from the VG
HP-UX LVM Commands
# List all volume groups
vgdisplay
# Show details of a specific VG
vgdisplay -v /dev/vg00
# Create a new volume group
mkdir /dev/vgapps
mknod /dev/vgapps/group c 64 0x020000
pvcreate /dev/disk/disk3
vgextend /dev/vgapps /dev/disk/disk3
# Create a logical volume (2GB, contiguous allocation)
lvcreate -n appdata -L 2048 -C y /dev/vgapps
# Create a file system on it
newfs -F vxfs /dev/vgapps/rappdata
# Mount it
mount /dev/vgapps/rappdata /apps
Expected output (vgdisplay -v /dev/vg00):
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 256
Cur LV 12
Open LV 12
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 2048
VGDA 4
PE Size (Mbytes) 4
Total PE 3560
Alloc PE 2848
Free PE 712
Total PVG 0
### Stripping and Mirroring
```bash
# Create a striped LV across 3 disks for database performance
lvcreate -n dblv -L 10240 -i 3 -I 64 /dev/vgapps
# Create a mirrored LV with 2 copies
lvcreate -n mitroredlv -L 5120 -m 1 /dev/vgapps
# Convert an existing LV to mirrored on-the-fly
lvextend -m 1 /dev/vgapps/appdata
# Check mirror status
lvdisplay -v /dev/vgapps/appdata | grep "Mirror"
Online File System Growth
One of HP-UX's hallmark features — grow file systems without unmounting:
# Extend the LV by 500MB
lvextend -L +500 /dev/vgapps/appdata
# Grow the VxFS file system online
fsadm -b 500M /apps
# Verify
bdf /apps
Expected output (bdf /apps):
Filesystem kbytes used avail %used Mounted on
/dev/vgapps/appdata 5242880 1234567 4008313 23% /apps
Serviceguard: High-Availability Clustering
Serviceguard is HP-UX's clustering solution — it monitors applications, servers, and networks, and automatically fails over services to a healthy node if something fails. It's designed for 99.999% uptime (five nines), which means less than 5 minutes of downtime per year.
How Serviceguard Works
A Serviceguard cluster has:
- Active nodes — servers running applications
- Standby nodes — servers waiting to take over
- Package — an application + its IP address, volume group, and file system
- Heartbeat — network signals that prove a node is alive
Serviceguard Cluster Configuration
# Check cluster status
cmviewcl -v
# Verify cluster configuration
cmcheckconf -v /etc/cmcluster/cluster.ascii
# Apply configuration
cmapplyconf -v /etc/cmcluster/cluster.ascii
# Start the cluster
cmruncl
# Start a specific package
cmpkg -a myapp_pkg
# View package status
cmviewcl -p myapp_pkg
Expected output (cmviewcl -v):
Cluster: PROD_CLUSTER
Nodes: node1 (node2)
State: up
Package: myapp_pkg
Node: node1
State: running
Node: node2
State: up
What Happens During Failover
sequenceDiagram
participant C as Client
participant N1 as Node 1 (Primary)
participant N2 as Node 2 (Standby)
participant VG as Shared Storage
N1->>N2: I'm alive (heartbeat)
N2->>N1: I'm alive (heartbeat)
C->>N1: Request data
N1->>C: Response
Note over N1: Server crashes!
N2->>N2: Heartbeat timeout (3 missed)
N2->>VG: Acquire volume group (vgchange -a e)
N2->>VG: fsck file system
N2->>N2: Start application
N2->>VG: Mount file system
N2->>C: New owner — service restored
Note over N2: Total failover: 30-90 seconds
Ignite-UX: Network OS Provisioning
Ignite-UX is HP-UX's answer to Solaris NIM or Linux Kickstart — a network-based system for installing, configuring, and recovering HP-UX machines.
Key Ignite-UX Concepts
| Component | Purpose |
|---|---|
| Ignite server | Central depot with OS images |
| Ignite client | Machine being installed |
| Depot | Repository of software (OS, patches, apps) |
| Configuration file | Defines installation parameters |
| Archive | System backup for recovery |
Installing a Client with Ignite-UX
# On the Ignite server, create a configuration
cat > /var/opt/ignite/config/client.conf << EOF
hostname = client01
ip_address = 192.168.1.100
netmask = 255.255.255.0
gateway = 192.168.1.1
root_disk = disk0
install_type = hpux.11.31
EOF
# Add software depots
swpackage -s /tmp/hpux-11.31.depot \*
swpackage -s /tmp/patches.depot \*
# Start the Ignite server
/usr/lbin/ignite/ignite -f /var/opt/ignite/config/client.conf
# Boot the client from the network (at client console):
# -> Main Menu -> Boot from LAN
System Recovery with make_archive
# Create a full system archive for disaster recovery
make_archive -a /var/opt/ignite/archives/prodserver.archive -v
# Restore from archive (boot client from Ignite server)
# At the Ignite menu, select "Recover from archive"
System Administration: SAM, swinstall, and parstatus
SAM (System Administration Manager)
SAM is HP-UX's equivalent of AIX's SMIT — a menu-driven tool that simplifies complex admin tasks:
# Launch SAM interactively
sam
# Run SAM for a specific area
sam -r storage
sam -r networking
sam -r users
sam -r kernel
SAM groups operations into logical categories: Users and Accounts, Disks and File Systems, Networking, Kernel Configuration, and Performance Monitoring.
swinstall — Software Management
HP-UX uses the Software Distributor (SD) system for package management. It's more granular than RPM or APT:
# List installed software bundles
swlist
# List a specific bundle's filesets
swlist -l fileset HPUXBase64
# Install software from a depot
swinstall -s /depot/gcc-12.3.0.depot -x mount_all_filesystems=false \*
# Remove software
swremove GCC
# Verify software integrity
swverify GCC
Expected output (swlist):
# Initializing...
# Contacting target "node1"...
Target: node1:/
HPUXBase64 11.31 HP-UX Base OS (64-bit)
HPUXBaseAudi 11.31 HP-UX Audio Support
HPUXBaseNet 11.31 HP-UX Base Networking
HPUXBaseSec 11.31 HP-UX Base Security
GCC 12.3.0 GNU Compiler Collection
parstatus — Partition Management
HP-UX on Integrity servers uses hardware partitioning (nPars, vPars) for isolation:
# View all hardware partitions
parstatus
# View details of a specific partition
parstatus -p 0 -v
# Create a virtual partition
vparcreate -p vpar1 -a cpu::1 -a mem::2048 -a io:0::0:0.0.0
# Start a virtual partition
vparboot -p vpar1
Expected output (parstatus):
Partition Status CPUs Memory (MB) I/O
0 (nPar) active 4 8192 3 cells
1 (nPar) active 2 4096 1 cell
HP-UX 11i v3 Key Features
HP-UX 11i v3 (the current major release) introduced several enterprise-critical capabilities:
| Feature | What It Does |
|---|---|
| TSUE (Technical Security Upgrade for Enterprise) | Enhanced encryption, FIPS 140-2 compliance |
| VxFS (Veritas File System) | Journaled, online resize, snapshot-capable file system |
| Online JFS Resize | Grow/shrink JFS without unmounting |
| Multi-core support | Full utilization of multi-core Itanium processors |
| Virtual Server Environment | Integrated partitioning, workload management |
| Secure Shell (SSH) by default | Encrypted remote access out of the box |
Common Errors & Mistakes
1. Modifying Kernel Parameters Incorrectly
Mistake: Editing /stand/system directly and creating a kernel that won't boot.
Fix: Always use sam → Kernel Configuration → Configurable Parameters, or run kmtune to change parameters safely. After changes, run mkboot -m to rebuild the kernel. Keep at least one backup kernel in /stand/vmunix.prev.
2. Running Out of Device Special Files
Mistake: Creating many LVs without running insf -e to generate device files, then wondering why mount fails with "no such device."
Fix: After creating new LVs, always run insf -e to create the corresponding device special files in /dev. Use ls /dev/vg*/r* to verify they exist.
3. Ignoring VGDA and Quorum
Mistake: Losing a disk in a 2-disk volume group and having the VG become unavailable because quorum is lost.
Fix: In Serviceguard environments, set vgchange -Q n on shared volume groups to disable strict quorum enforcement. A storage admin should always understand quorum: with 2 PVs in a VG, losing one disk loses majority — the VG deactivates. With 3 PVs, losing one preserves majority.
4. Forgetting to Run fsck After an Abrupt Shutdown
Mistake: Recovering from a power outage and mounting file systems directly without checking them first.
Fix: Always run fsck -F vxfs -o full on VxFS file systems after an unclean shutdown. For JFS, use fsck -F jfs. Boot to maintenance mode (hpux -lm) and check all file systems before mounting.
5. Not Configuring Serviceguard Heartbeat Over Dedicated Networks
Mistake: Sharing heartbeat traffic with production network traffic, causing false failovers during peak loads.
Fix: Use dedicated network interfaces for Serviceguard heartbeats — ideally two separate physical networks (LAN and RS-232 serial link). Configure cmcld.conf with HEARTBEAT_INTERVAL=1 and NODE_TIMEOUT=6 for faster failure detection.
Practice Questions
Question 1
What are the three layers of HP-UX's LVM, and what does each do?
Show answer
Physical Volume (PV) — a physical disk or partition. Volume Group (VG) — a pool of PVs that provides a shared storage capacity. Logical Volume (LV) — a virtual disk carved from the VG that holds a file system. This hierarchy enables flexible, online storage management.Question 2
What is Serviceguard and what problem does it solve?
Show answer
Serviceguard is HP-UX's high-availability clustering solution. It monitors application, server, and network health. If a failure is detected, it automatically moves (fails over) the application and its resources (IP, storage, services) to a healthy node in the cluster — typically restoring service within 30-90 seconds.Question 3
How do you grow a file system in HP-UX without unmounting it?
Show answer
First extend the logical volume with `lvextend -L +size /dev/vg/lv`, then grow the file system with `fsadm -b size /mountpoint`. For VxFS, the file system grows online without disruption. Use `bdf /mountpoint` to verify the new size.Question 4
What is Ignite-UX used for?
Show answer
Ignite-UX is HP-UX's network-based OS provisioning tool. It allows administrators to install, configure, and recover HP-UX systems over the network from a central server — eliminating the need for physical installation media and enabling consistent, automated deployment across hundreds of servers.Question 5
What's the difference between nPars and vPars?
Show answer
nPars (hardware/nodal partitions) provide complete electrical isolation between partitions — each has its own CPUs, memory, and I/O with no shared components. vPars (virtual partitions) share hardware resources but have separate OS instances. nPars offer stronger isolation; vPars offer more flexible resource allocation.Challenge
Design and implement a two-node HP-UX Serviceguard cluster:
- Configure shared storage via LVM with a dedicated volume group for cluster data
- Set up Serviceguard with heartbeat on two dedicated network links
- Create a package that includes an Apache web server, its IP address, and its file system
- Write a test script that induces failover (kill the Apache process) and verifies the service moves to the standby node
- Configure Ignite-UX to capture and restore the complete configuration as an archive
Real-World Task
Your healthcare organization is deploying a new patient records system on HP-UX Integrity servers. Create the infrastructure plan:
- Design the LVM layout — separate volume groups for OS, application, and patient data (with mirroring for the data VG)
- Configure Serviceguard for automatic failover (target: <60 second recovery)
- Use Ignite-UX to create a gold image of the configured system for rapid deployment
- Set up SAM-based user administration with role-based groups for doctors, nurses, and administrators
- Create Bash scripts that monitor critical services and email alerts on failure
- Document the full disaster recovery procedure using Ignite-UX archives
Mini Project: HP-UX Resource Monitor Script
Write a shell script that collects key system metrics from HP-UX:
#!/bin/sh
# hpux-monitor.sh — HP-UX System Resource Monitor
echo "=========================================="
echo " HP-UX Resource Monitor"
echo " Host: $(hostname)"
echo " OS: $(uname -r)"
echo "=========================================="
echo ""
echo "--- CPU Partition Info ---"
parstatus 2>/dev/null || echo "No hardware partitions found"
echo ""
echo "--- Memory ---"
echo "Physical: $(dmesg | grep "Physical:" | awk '{print $2}') MB"
echo "Available: $(vmstat -s | grep "available pages" | awk '{print $1*4/1024}') MB"
echo "Active processes: $(ps -ef | wc -l)"
echo ""
echo "--- Volume Groups ---"
vgdisplay | grep -E "VG Name|Total PE|Alloc PE|Free PE"
echo ""
echo "--- Top 5 Large File Systems ---"
bdf | tail -n +2 | sort -k2 -rn | head -5
echo ""
echo "--- Software Patches Installed ---"
swlist -l patch | grep -c "PH" 2>/dev/null
echo "patches currently installed"
echo ""
echo "--- Serviceguard Status ---"
cmviewcl -l 2>/dev/null || echo "Serviceguard not running"
echo ""
echo "=========================================="
echo " Report generated: $(date)"
echo "=========================================="
Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro.
📖 Author: DodaTech | Last updated: June 15, 2026
DodaTech tutorials are built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro — security tools used by millions worldwide.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro