nPartition system - boot commands and common tasks

Common nPartition Boot Commands and Tasks

From Service processor console (MP or GSP) , we can use the below commands to boot the npartition

1.RS - Reset an nPartition
2.RR - Reset and perform a shutdown for reconfig of an nPartition.
3.BO — Boot the cells assigned to an nPartition past the "waiting at BIB" state and thus begin the nPartition boot phase.
4.TC — Perform a transfer of control reset of an nPartition.
5.PE — Power on or power off a cabinet, cell, or I/O chassis.

From EFI shell - we can use the below commands,

1.bcfg — List and configure the boot options list for the local nPartition.

2.autoboot — List, enable, or disable the nPartition autoboot configuration value.

3.acpiconfig — List and configure the nPartition ACPI configuration setting, which determines whether HP-UX, OpenVMS, Windows, or Linux can boot on the nPartition.

nPartition Modification Tasks

The below tasks commonly performed by the support team on npartion servers, Most of the interview questions are based on this tasks only.

1.Assigning and Unassigning Cells
2.Setting Cell Attributes
3.Setting Core Cell Choices
4.Setting nPartition Boot Paths
5.Renaming an nPartition
6.Removing an nPartition

 Assigning and Unassigning Cells

    parmodify -p# -a#  : To assign (add) or unassign (remove) cells
    parmodify -p# -d#  :command to remove a cell from the specified nPartition
     (-p#, where # is the partition number)

 Setting Cell Attributes

    parmodify -p# -m# : command to modify cell attributes for a specified nPartition

 Setting Core Cell Choices

    parmodify -p# -r# -r# :command to specify up to four core cell choices in priority order for a specified nPartition (

 Setting nPartition Boot Paths

    parmodify -p# -b... -s... -t  : command to set boot paths for a specified nPartition

    bcfg : On an HP Integrity server you can use the EFI Shell bcfg command to configure boot paths.

 Renaming an nPartition

    parmodify -p# -P name : command to set the name for a specified nPartition

 Removing an nPartition

    parremove -p# : command to remove a specified nPartition

GSP /MP console - Quick reference Guide

Hi Friends

If you want to check the console commands which can be run in GSP / MP , please use the below guide. Its clearly provided with menus.

GSP / MP - Console Quick Reference Guide.pdf

EFI SHELL COMMANDS - Quick Reference

Author : Bibith Dathan


Shell Boot Commands

autoboot     -- View or set autoboot timeout variable
bcfg         -- Displays/modifies the driver/boot configuration
boottest     -- Set/View BootTest bits
clearlogs     -- Clears FPL and SEL logs
dblk         -- Displays the contents of blocks from a block device
lanboot     -- Performs boot over lan from EFI Shell
mount         -- Mounts a file system on a block device
reset         -- Resets the system
tftp         -- Tftp to a bootp/dhcp enabled unix boot server
vol         -- Displays volume information of the file system

Shell  Configuration Commands

cpuconfig     -- Deconfigure or reconfigure cpus
date         -- Displays the current date or sets the systemdate
err         -- Displays or changes the error level
esiproc     -- Make an ESI call
errdump     -- View/Clear logs
info         -- Display hardware information
monarch     -- View or set the monarch processor
palproc     -- Make a PAL call
salproc     -- Make a SAL call
time         -- Displays the current time or sets the system time
ver         -- Displays the version information

Shell Device Commands

baud         -- Set serial port com settings
connect     -- Binds an EFI driver to a device and starts the driver
devices     -- Displays the devices being managed by EFI drivers
devtree     -- Displays the tree of devices of the EFI Driver Model
disconnect     -- Disconnects one or more drivers from a device
dh         -- Displays the handles in the EFI environment
drivers     -- Displays the list of drivers of the EFI Driver Model
drvcfg         -- Invokes the Driver Configuration Protocol
drvdiag     -- Invokes the Driver Diagnostics Protocol
guid         -- Displays all the GUIDs in the EFI environment
lanaddress     -- Display LAN MAC addresses
load         -- Loads and optionally connected EFI drivers
loadpcirom     -- Loads a PCI Option ROM
map         -- Displays or defines mappings
openinfo     -- Displays the protocols on a handle and the agents
optload     -- Lists all optional ROM-based efi drivers and apps
pci         -- Displays PCI devices or PCI function config space
reconnect     -- Reconnects one or more drivers from a device
unload         -- Unloads a protocol image

Shell Memory Commands

default         -- Sets, Resets, or Clears default NVM values
dmpstore     -- Displays all NVRAM variables
dmem         -- Displays the contents of memory
memmap         -- Displays the memory map
mm         -- Displays or modifies MEM/IO/PCI
pdt         -- View or set page deallocation table

Generic Shell Commands

alias         -- Displays, creates, or deletes aliases in the EFI shell
attrib         -- Displays or changes the attributes of files or directories
cd         -- Displays or changes the current directory
cls         -- Clears the standard output with an optional background color
comp         -- Compares the contents of two files
cp         -- Copies one or more files/directories to another location
edit         -- Edits an ASCII or UNICODE file in full screen
eficompress     -- Compress a file
efidecompress     -- Compress a file
exit         -- Exits the EFI Shell
help         -- Displays help menus, command list, or verbose help of a command
hexedit     -- Edits with hex mode in full screen
ls         -- Displays a list of files and subdirectories in a directory
mkdir         -- Creates one or more directories
mode         -- Displays or changes the mode of the console output device
mv         -- Moves one or more files/directories to destination
rm         -- Deletes one or more files or directories
set         -- Displays, creates, changes or deletes

EFI environment variables

setsize     -- Sets the size of the file
touch         -- Updates time with current time
type         -- Displays the contents of a file
xchar         -- Turn on/off extended character features

Shell Script Commands

echo         -- Displays messages or turns command echoing on or off for/endfor -- Executes commands for each item in a set of items
goto         -- Makes batch file execution jump to another location if/endif -- Executes commands in specified conditions
pause         -- Prints a message and suspends for keyboard input
stall         -- Stalls the processor for some microseconds

Dynamic Root Disk(DRD) in HP-UX

Author : Bibith Dathan
what is DRD ?

Dynamic Root Disk (DRD) is an HP-UX system administration toolset used to clone an HP-UX system image to an inactive disk for software maintenance and recovery.   DRD is available for download from the hp software depot for free (
In case of system crash/OS software corruption, the system can be booted from the DRD disk(i.e alternate boot disk). Thus faster system recovery is achieved using this approach(<1hr in ideal conditions).
DRD toolset additionally offers solutions such as adding of softwares/patches to the cloned disk online, once the patches/softwares are installed to the cloned disk, the system can be booted from the cloned disk. Thereby reducing the system downtime while installing and updating patches and other software.
DRD is supported on the following platforms:
  • Systems—including hard partitions (nPars), virtual partitions (vPars), and Integrity Virtual Machines (VMs)—running either HP-UX 11i Version 2 (September 2004 or later) or HP-UX 11i Version 3
File systems: LVM and VxVM root volume

Additional product information

Product #:
Software specification:
HP-UX 11i v2 (11.23) DRD 0803
HP-UX 11i v3 (11.31) DRD 0803

1) Ensure the product DynRootDisk is installed.
swlist –i product|grep –i Dyn

2) Create clone disk:
a. Perform clone preview(-p) to check the disk size & suitability
/opt/drd/bin/drd clone –p –v –t /dev/dsk/cxtxdx
b. To clone OS onto target disk /dev/dsk/c3t3d0:
/opt/drd/bin/drd clone -x overwrite=true -v -t /dev/dsk/c3t3d0

The target disk is put under the vg drdnn and the drdnn vg is exported.
‘drd mount’ is run to activate the drdnn vg
‘drd clone’ command log is /var/opt/drd/drd.log

3) ‘drd activate’ sets the drd disk to be primary boot device. Now when the system reboots, it boots from the drd(alternate boot disk).
# /opt/drd/bin/drd activate

# /opt/drd/bin/drd activate –x reboot=true          
[This command sets the drd disk as primary boot disk & as well immediately reboots the machine]

4) ‘drd mount’
To perform any software maintenance/installation operations, the drd disk should have to be mounted first, which means that the drd disk/vg gets activated & drd /(root) filesystem get mounted under /var/opt/drd/mnts/sysimage_001/ mountpoint. Thereafter we can manually mount other OS filesystems of drd disk/vg under /var/opt/drd/mnts/sysimage_001/ mountpoint.

For ex: to mount /opt filesystem of drd disk/vg, we perform:
# /opt/drd/bin/drd mount
# /usr/sbin/mount /dev/drd00/lvol6 /var/opt/drd/mnts/sysimage_001/opt

Once the maintenance operations are complete, you can perform umount of the drd disk/vg, which shall umount filesystems & export the drd vg:
# /opt/drd/bin/drd umount.

5) To add patches/pkgs to the drd disk, you can use the “drd runcmd command
Here is a sample command used to apply QPKAPPS and QPKBASE to the DRD disk.
# /opt/drd/bin/drd runcmd swinstall \ -s depot_svr:/var/depots/1123_0706 QPKBASE QPKAPPS

In particular, the drd clone operation does the following:
• Creates Extensible Firmware Interface (EFI) partitions on HP-UX Integrity systems
• Creates boot records
• Creates a new LVM volume group or VxVM disk group and a volume in the new group for each volume in the root volume group. The volume management type of the clone matches that of the root group.
• Configures swap and dump volumes
• Copies the contents of each file system in the root volume group to the corresponding file system in the new group
• Modifies particular files on the clone that identify the disk on which the volume group resides
• For LVM-based systems, modifies volume group metadata on the clone so that the volume group name is the same as the original root volume group when the clone is booted

Other notes:
• The clone that has been created is not visible (when executing commands such as bdf or vgdisplay) at the completion of the clone operation. This is because the file systems on the clone are unmounted and the clone volume group is exported at completion of the drd clone command.

• The clone volume group and component logical volumes can be made visible by a drd mount command, which vgimports the clone volume group and mounts the file systems on the logical volumes. If the root group is named “vg00”, the imported clone group is “drd00”. More generally, if the root group is name “vgnn”, the clone group is “drdnn”. If the root group does not have the form “vgnn”, the clone group name is formed by prefixing the root group with “drd”.

• When the clone is booted, the root group is the same as the original root group that was cloned. 

Author : Dathan

vgscan command for single voulme group : How to ??

If you want to run VGSCAN for single volume please use the below command. It will scan and change the lvmtab for that particular voulme only and it wont affect other volumes.


# vgscan -v -f /dev/vg00

if you want check you can run the command in preview mode and then u can use the above command
#vgscan -p -v -f /dev/vg00


Redirect the Legacy / persistent device paths : How to ??

Scenario: Replace a failed disk on server where legacy path is used in server. After replace the disk we used to get new disk path (old- c0t0d0 ..and new disk path - c0t1d0) this situation we need to redirect the path to old one. 

If it is legacy path then we need to run the below commands

# sasmgr replace_tgt -D /dev/sasd0 -q old_dev=old_disk_path -q new_tgt_hwpath=newdisk_ hw_path

   (Ex :  sasmgr replace_tgt -D /dev/sasd0 -q old_dev=/dev/dsk/c0t1d0 -q new_tgt_hwpath=0/2/1/
and then once the new disk is rerouted use the below commands to remove the old paths 

# scsimgr replace_leg_dsf -D /dev/rdsk/c0t1d0  (consider /c0t1d0 is the old disk path)
# scsimgr replace_wwid -D /dev/rdisk/disk2  (consider the disk2 is the old Persistent path)


For Persistent Path:

If it is the Volume group -  the disk is added with persistent device path then we need to use the below command to redirect the disk paths

#ioscan -m lun  (to get the new lun path for new disk)

#io_redirect_dsf -d old_disk_path -n new_disk_path

 Ex : io_redirect_dsf  -d /dev/disk/disk2 -n /dev/disk/disk32
     (it will change the new path)

PRM : Process resource Manager in HP unix

Process Resource Manager (PRM) is a resource management tool used to control the amount of resources that processes use during peak system load
(at 100% CPU resource or 100% memory resource). PRM can guarantee a minimum allocation of system resources available to a group of
processes through the use of PRM groups.

A PRM group is a collection of users and applications that are joined together and assigned certain amounts of CPU and memory resource.
The two types of PRM groups

1.FSS PRM groups
2.PSET PRM groups

FSS PRM groups :

FSS PRM group is the traditional PRM group. whose CPU entitlement is specified in shares. This group uses the Fair Share Scheduler (FSS) in the HP-UX kernel within the system’s default processor set (PSET).

PSET PRM groups :

A PSET PRM group is a PRM group whose CPU entitlement is specified by assigning it a subset of the system’s cores (PSET).
(A core is the actual data-processing engine within a processor. A single processor might have multiple cores.  A core might support multiple execution threads.)
Processes in a PSET have equal access to CPU cycles on their assigned cores through the HP-UX standard scheduler.

Commands in PRM :

#Configure PRM, initiate /etc/prmconf configuration file
prmconifg -i

#Check the configuration file settings
prmconfig -s

#Enable PRM
prmconfig -e

#Disable PRM
prmconfig -d

#Monitor PRM

#List available PRM resource

Configuration Steps:

1. Gather the basic resource information by prmavail
2. Initiate /etc/prmconf and start editing
3. Define the FSS group
4. Define the Resource type and limit
5. Run prmconfig -i -e to enable PRM
6. Enable auto start up in /etc/rc.config.d/prm


Mirror recovery consistency : How to change ??

Mirror write performance on swap logical volumes may be enhanced by disabling the Mirror Write Cache. If the primary swap volume is also configured as a dump volume, it’s critical to change the consistency recovery policy to NONE to avoid corrupting dump data in case of a system panic.

  1. Check the current consistency recovery policy on lvol2.

# lvdisplay /dev/vg00/lvol2 | grep Consistency
Consistency Recovery MWC

  1. Reboot the system.

            # shutdown –ry 0

  1. Interrupt the boot process and boot to the LVM maintenance mode. Note: You will need a telnet window to the system console. In the HPVL, you will connect via a terminal server, so use the host name and root password for the initial login.

EFI Boot Manager ver 1.10 [14.61] Firmware ver 2.31 [4411]
Please select a boot option
HP-UX Primary Boot: 0/1/1/0.0x1.0x0
HP-UX HA Alternate Boot: 0/1/1/0.0x0.0x0
EFI Shell [Built-in]
Boot Option Maintenance Menu
System Configuration Menu
Loading.: HP-UX Primary Boot: 0/1/1/0.0x1.0x0
Starting: HP-UX Primary Boot: 0/1/1/0.0x1.0x0
(C) Copyright 1999-2006 Hewlett-Packard Development Company, L.P.
All rights reserved
HP-UX Boot Loader for IPF -- Revision 2.035
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix -lq
Seconds left till autoboot - 4
Type 'help' for help
HPUX> boot vmunix -lm
> System Memory = 4083 MB
loading section 0
............................................................................ (complete)
loading section 1
............. (complete)
loading symbol table
loading System Directory (boot.sys) to MFS
loading MFSFILES directory (bootfs) to MFS
Launching /stand/vmunix
SIZE: Text:38714K + Data:6257K + BSS:20686K = Total:65658K
Console is on Serial Device
Booting kernel...
INIT: Running /sbin/sh

  1. Activate the volume group vg00, change the consistency recovery policy, and update the BDRA.

# vgchange –a y vg00
vmunix: LVM: Root VG activated

  1. Change the mirror consistency policy using the lvchange command.

# lvchange –M n –c n /dev/vg00/lvol2
Logical volume "/dev/vg00/lvol2" has been successfully changed.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

  1. Update the BDRA using the lvlnboot -R command.

# lvlnboot -R
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

  1. Use the lvdisplay command to verify that the change succeeded.

# lvdisplay /dev/vg00/lvol2
Consistency Recovery NONE

  1. Reboot the system. Note that you must always reboot the system after using the LVM maintenance mode.

# reboot

(SCSI Primary Commands 2) SPC2 - Settings on HP-UX 11.31

The most visible change to the mass storage stack in HP-UX 11i v3 is the addition of agile addressing, also known as persistent LUN binding .  With the introduction of agile addressing,  there is only a single  DSF for each unique LUN in the server, no matter how many lunpaths the LUN has or if any of those lunpaths change.

Earlier releases HP-UX, the legacy addressing is used and each LUN will be having a separate device file for the Fibre Channel paths available on that server.
With the agile addressing, 

Before configuring Volume Groups on a new HP-UX 11.31 server, the SPC -2 (SCSI Primary Commands -2) flag needs to be enabled. This flag is enabling at the port level / FA level from the storage side. Unix engineer need to engage the Storage team for enabling this flag.  If the Flag is not configured properly for a server, the performance of other 11.31 servers   which are connected to the same FA   will get degraded even though those servers have the SPC flag enabled. After enabling the flag, the server need to be restarted .

The SPC settings can be verified with scsimgr command. Please find the o/p from where a server where SPC flag is not enabled.

hp461# scsimgr get_info -D /dev/rdisk/disk3 |grep -i spc
SPC protocol revision                         = 2
If the SPC flag is enabled the o/p will be,
hp461# scsimgr get_info -D /dev/rdisk/disk3 |grep -i spc
SPC protocol revision                         = 4

 If the SPC flag is not enabled for a server, there will be more than one device files for for a LUN and will be same as the number of FC paths in the server. Suppose a server is having 2 FC cards & SPC flag is not enabled, the disk details will be as follows.

hp470# ioscan -m dsf /dev/rdisk/disk12
Persistent DSF           Legacy DSF(s)
/dev/rdisk/disk12        /dev/rdsk/c5t14d7

And if we try to create / import a Volume Group on the server, the below errors will be coming.

#vgimport -v -s -N -m /tmp/ /dev/vg125
Beginning the import process on Volume Group "vg125".
Verification of unique LVM disk id on each disk in the volume group
/dev/vg125 failed.
Following are the sets of disks having identical LVM disk id
/dev/disk/disk510 /dev/disk/disk740

Root-cause :
In an HP-UX server, there will be a lunpath for all the  active FC cards configured for the disk. 
In earlier releases of  HP-UX , there will be a device file for each FC path to a LUN. Normally the server treats one path as primary path and the others as the alternate paths to the LUN. In 11.31, if the flag is not enabled ,  the server will treat each path as a separate disk. Because of this if we try to use the disk for creating the VG, we are getting the error “Following are the sets of disks having identical LVM disk id “.

Once the SPC flag is enabled, there will be only DSF for a LUN irrespective of the number of FC paths configured on the server.

The o/p of  the LUN status from a server where the flag is enabled will be as follows,

hp470# ioscan -m dsf /dev/rdisk/disk12
Persistent DSF           Legacy DSF(s)
/dev/rdisk/disk12        /dev/rdsk/c5t14d7

Note: This server is having 2 FC paths configured for disks.

Blogger Tips and TricksLatest Tips And TricksBlogger Tricks