Friday, December 17, 2010

NFS in HP-UX

There has been a vast difference between HP-UX 11i v3 with the older versions.Prior to v3, HP-UX used NFS concepts (commands and files) a like AIx. From v3, it following Solaris-like environment.

Configuration Files :

/etc/exports                  -  Contains a list of exportable file systems. This file is available in upto HP-UX 11i v2
/etc/dfs/dfstab               - Contains a list of sharable file systems. This file is available from HP-UX 11i v3 
/etc/rc.config.d/nfsconf  - NFS server configuration file contains the nfs, autofs and mountd daemons startup


Command :

1.  To start NFS server daemons :
# /sbin/init.d/nfs.server start

2. To stop NFS server daemons :
# /sbin/init.d/nfs.server stop

3. To start NFS daemons on system boot,
Change the value of NFS_SERVER to "1" in /etc/rc.config.d/nfsconfig file.


For Ex,
NFS_SERVER=1
4. To export or share a file system :
# exportfs /data         <--- Upto HP-UX 11i v2
# share     /data         <--- From HP-UX 11i v3

5. To unexport or unshaer a file system :
# exportfs -u /data         <--- Upto HP-UX 11i v2
# unshare     /data          <--- From HP-UX 11i v3

6. To export or share all the filesystems defined in /etc/exports or /etc/dfs/dfstab :
# exportfs -a         <--- Upto HP-UX 11i v2
# shareall              <--- From HP-UX 11i v3

Network Configuration in HP-UX

Configuration File :
/etc/rc.config.d/netconf        -  Contains the hostname, ip address, default route
/etc/hosts                            -  Contains the hsotname to IP address mapping
/etc/resolv.conf                   -  Contains DNS server details
/etc/inetd.conf                     - Internet daemon configuration file

Configuration Files used for DNS Client:
/etc/nsswitch.compat
/etc/nsswitch.nis
/etc/nsswitch.ldap
/etc/nsswitch.conf
/etc/nsswitch.files
/etc/nsswitch.hp_defaults

Scripts :
/sbin/init.d/net start  - To start network services
/sbin/init.d/net stop  - To stop network services

Commands :

1. To set the hostname :
# set_parms hostname

2. To set primary ip address :
# set_parms ip_address

3.  To set the default gateway, DNS/NIS server details :
# set_parms addl_netwrk

4.  To restart inetd daemon :
# inetd -c

5. To display the ip address configuration details :
# netstat -i

6. To set the IP details of lan0 :
# ifconfig lan0

7. To display all the network adapters :
# lanscan

8. To display routing table :
# netstat -rn

9. To add a route :
# route add default 192.168.1.254 1

10. To enable a network interface :
# ifconfig lan0 up

11. To disable a network interface :
# ifconfig lan0 down

12. To change NIC settings like speed, duplex,..
# lanadmin

Thursday, December 9, 2010

Managing vPars in SuperDome 2

1. To start a vpar from MON> prompt,

MON> vparload -p vPar_name

2. To boot a vpar from command line,

# vparload -p vPar_name

3. To show vpar info from MO> prompt,

MON> vparinfo

4. To show vpar status from command prompt,
# vparstatus

Under Construction.

Managing nPartitions in SuperDome 2

Following commands are to executed by logging (telnet/h) into Onboard Administrator's CLI.

1. To display all the blades and enclosures in a superdome 2 machine,
>  parstatus

2. To display all the nPars,
> parstatus -P

3. To allow an operating system running in a npar to perform partition configuration operations on other partitions,
> parperm npar on 1

4. To create a nPar using blade 1/2 and IO bay 5/1,
> parcreate -P nPar0002 -a blade:1/2:::: -a io:5/1::

5. To create a nPar using blades 1 and 3 from enclosure 1 and IO lot in IOX enclosure 5, bay 1,
> parcreate -p nextPartition -a blade:1/1:::: -a blade:1/3:::: -a io:5/1:

6. To display the details on a specific nPar,
> parstatus –Vp1
or
> parstatus –Vp nPar0001

7. To remove a nPar,
> parremove -p 2
or
> parremove -p nPar0002

8. To rename a nPar,
> parmodify -p1 -PnPar0005

9. To add the blade in enclosure 1, slot 5 to the existing nPartition 1,
> parmodify -p 1 -a blade:1/5:base:y:ri:50%

10. To add I/O bay 2 in enclosure 3 to the existing nPartition3,
> parmodify -p 3 -a io:3/2:

11 To remove the blade in enclosure 1, slot 5 from nPartition 1,
> parmodify -p 1 -d blade:1/5

12. To remove I/O bay 2 in enclosure3 from nPartition3,
> parmodify -p 3 -d io:3/2

 13. To power on nPar ID 1,
> poweron partition 1

Note: You can also use the legacy bo or pe command(menu based) to power on a nPartition.

14. To view the powr status of nPars,
> parstatus -P

15. To open the console of nPartition id 1,
> connect partition 1

Note: You can also use the legacy co command to get the console.

16.

Superdome OA - User Management commands

1. Add user,
ADD USER jack password

2. Disable User,
DISABLE USER jack

3. Enable User,
ENALE USER jack

4. Remove User,
REMOVE USER jack

5. Show History,
HISTORY

6. Set paword for the currently logged in user id,
SET PASSWORD

7. To set admin priviliage to an user,
SET USER ACCESS jack ADMINISTRATOR

HP BLADE MANAGEMENT COMMANDS

1. To open the console of a blade,
> CONNECT BLADE bay_number

2. To poweroff all the blades,
> POWEROFF BLADE ALL

3. To poweroff a specific blade,
> POWEROFF BLADE bay_number

4. To forcefully poweroff a specific blade,
> POWEROFF BLADE bay_number FORCE

5. To poweron all the blades,
> POWERON BLADE ALL

6. To poweron a specific blade,
> POWERON BLADE bay_number

7. To Reboot all the blades,
> REBOOT BLADE ALL

8. To Reboot a specific blade,
> REBOOT BLADE bay_number

9. To Forcefully Reboot a specific blade,
> REBOOT BLADE bay_number FORCE

10. To set hard disk as the bootdevice for the next boot of the blade,
> SET BLADE ONCE HDD bay_number

11. To set PXE (N/w) as the bootdevice for the next boot of the blade,
> SET BLADE ONCE PXE bay_number

12. To set hard disk as the bootdevice for he blade,
> SET BLADE ONCE HDD bay_number

13. To set PXE (N/w) as the bootdevice for the blade,
> SET BLADE ONCE PXE bay_number

14. To turn on/off the Blade UID LED,
> SET BLADE UID ALL ON
> SET BLADE UID bay_number OFF

15. To show the boot settings for a specific blade,
> SHOW BLADE BOOT bay_number

16. To show the blade information,
> SHOW BLADE INFO bay_number

17. To show the list of blades,
> SHOW BLADE LIST

18. To show the blade names,
> SHOW BLADE NAMES

19. To show the blade status of bay number 2,
> SHOW BLADE STATUS 2

20. To show the blade temperature of bay 2,
> SHOW BLADE TEMP 2

21. To show syslog of bay 2,
> SHOW SYSLOG BLADE 2

Thursday, August 5, 2010

Device Management

All the devices are communicated by HP-UX using their device files which are located under /dev directory. Basically each device will have 2 type of device file - block and character(raw) device files. Most of the devices and their device files are configured automatically during the system boot. At the time of boot, HP-UX probes  all devices and executes /sbin/ioinit.rc script to create new device files if needed. If any device file is not created you can always create them manually using some commands.

How to list and identify various devices connected to your system ?

1. To show all the configured devices:
# ioscan -f

2. To list the available disk/CD Drives along with their device file details:
# ioscan -funC disk

3. To list the tape drives:
# ioscan -funC tape

4. To list the lan adapters:
# ioscan -funC lan

5. To show the details of a device file:
# lssf /dev/rmt/c2t0d0BEST

How to configure newly connected devices ?

To configured the recently connected tape drive:

# insf -C tape

Same way to configure newly connected CDrom or disk,
# insf -C disk


This is similar to devfsadm in solaris and cfgmgr in AIX. It will configure new devices but not the already configured devices.

How to create specific device file if you have accidentally deleted any of them ?

1. To create the device file for a CD-ROM which is attached to hardware path 0.2.0 :
# insf -H 0.2.0 -e

2. To create a raw (character) device file for a disk attached to hardware address 1.2.0 :
# mksf -H 1.2.0 -r

3. To create a block device file for a disk attached to hardware addres 1.2.0 :
# mksf -H 1.2.0 -b

4. To create raw device file for a device with major number 243 and minor number 0x040012 :
# mknod /dev/rmt/1m c 243 0x040012

5. To create block device file for a device with major number 243 and minor number 0x040012 :
# mknod /dev/rmt/1m b 243 0x040012