HP-UX: Preparing for System Reboot / Shutdown

System administrators will often reboot their boxes because of certain need like patch installation and kernel parameter change. Below is a guide to properly shutdown and reboot the system.


1. Get important system information:

Common Information needed
# hostname
# date
# model
# uname -a
# uptime
# who -r

2. Gather filesystem information

# showmount -e
shows all exported filesystems
# showmount -a
shows all current filesystems exported
login to those systems and unmount all NFS relating to the system to be rebooted
# bdf > bdf.out
Create a list of all mounted filesystem before reboot.
You will compare this later after the reboot
# bdf | wc -l
Take note of the number of mounted filesystem
# bdf -t nfs
Also take note of its NFS mounts.
You need to verify everything is mounted after the reboot.

3. Stop database and applications

Please coordinate the reboot / shutdown to the applications team. Most important applications and database should be stop before reboot or data corruption might happen.

Example of applications/database verification

# ps -ef | grep oracle

Oracle Database
# ps -ef | grep sap
SAP Applications

4. Backup /stand/vmunix and /stand/system. If these files were corrupted during reboot, boot will fail.

# cp -ip /stand/vmunix /stand/vmunix.backup
# cp -ip /stand/system /stand/system.backup

5. Backup fstab and comment out NFS entries. These will prevent long system hangs during reboot.

# cp -p /etc/fstab /etc/fstab.backup
# vi /etc/fstab

(Comment all NFS entries)If not yet shutdown

6. Execute the shutdown command

# shutdown -r -y 0
This command reboots the server. If you want it to halt shutdown -h -y 0
# shutdown -h -y 0
If hardware change it needs halt

After Booting

# cp -p /etc/fstab.backup /etc/fstab
Return the original fstab
# mount -a
Mount all NFS entries

Verify Filesystem

# showmount -a
# bdf | wc -l
# bdf -t nfs

Compare these to the ones perform before reboot.

Check Logs for errors

# more /var/adm/syslog/syslog.log
# dmesg

Finally, if all is well, ask the application team to start their applications and database.

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.