insf -e, damn it! Thursday, February 28, 2008
Posted by piyut in HP-UX, Tulisan.3 comments
Damn! hari ini aku melakukan kesalahan karena kecerobohan dan tidak jeli nya aku dalam bekerja. Gara-gara kesalahan yang aku buat, database oracle di server production down! Command “insf -e” ternyata penyebab masalahnya. Be careful with this command if you want to install special file at hp-ux, especially when you want to detect new LUN!!!
Replace Primary boot disk at HP-UX Wednesday, February 6, 2008
Posted by piyut in HP-UX.2 comments
I have experience and case about “primary boot disk failed” at HP-UX 11.11. The server is superdome [hp high end server]. There are PVs stale at primary boot disk, the secondary disk [alternate boot disk] doesn’t have PV stale. My hp engineer recommended to replace the disk offline. Hoho…server is production and downtime is limited! I tried to search in goggle and sign in to itrc.com [hp forum] and i found the answer. I can replace primary boot disk failed in online replacement. Below, the steps i have done to replace my primary boot disk:
1. try to break mirror, but failed
2. unplug the bad disk
3. plug the new disk:
# vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t0d0
vgcfgrestore: Cannot restore Physical Volume “/dev/dsk/c0t0d0″,
Detach the PV or detactivate the VG, before restoring the PV.
# pvchange -a n /dev/dsk/c0t0d0
# vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t0d0
# pvchange -a y /dev/dsk/c0t0d0
# vgchange -a y /dev/vg00
# mkboot -l /dev/dsk/c0t0d0
# mkboot -a “hpux -lq” /dev/rdsk/c0t0d0
# lvlnboot -R –> vg automaticaly sync data
Rebooting server is needed if we want to check the new disk to booting.
Configuring File System on HP-UX using LVM Wednesday, December 12, 2007
Posted by piyut in HP-UX.add a comment
Before you perform the installation, verify that you have root permissions on the Agent Host.
1. Create Volume Group
Note: the following example is using the disk c1t6d0, the volume group vg01, the logical volume lvtest, and mount point /test
1.1 Identify the disks to be used for LVM
# ioscan -nfC disk
1.2 Create a LVM data structure on each identified disk
# pvcreate /dev/rdsk/c1t6d0
Note: if the disk was previously used in another VG, use the following command instead:
# pvcreate -f /dev/rdsk/ c1t6d0
1.3 Collect all the physical volumes to form a new volume group
1.3.1 Go to dev directory (/dev)
# cd /dev
1.3.2 Create VG name
# mkdir vg01
1.3.3 Make directory and special file in VG
# mknod /dev/vg01/group c 64 0×010000
Note: the group number (last parameter - 0×010000 ) is in hexadecimal and should be different for each volume group
1.3.4 Create the volume group
# vgcreate -s [pe_size] -e [max_pe] /dev/vg01 /dev/dsk/ c1t6d0
Note: when a volume group is created without define pe_size and max_pe parameter, the maximum physical extents per volume (max_pe) will be set to the max_pe of the largest physical volume (PV). The effect of not setting the max_pe parameter would be that any PV added to the volume group in the future regardless of there size will be limited to the volume groug creation value of max_pe. Therefore, consider increasing the max_pe to accommodate PV’s that may likely be larger than the largest PV used to create the Volume Group. The formula to use to determine the value is:
physical_extent_size * max_pe = size_of_the_disk.
The default value for physical_extent_size is 4 MB and the maximum value for max_pe is 65535 (more…)
Recovery OS using Ignite Backup Tuesday, November 13, 2007
Posted by piyut in HP-UX.add a comment
HP-UX have a software to backup the OS called “Ignite”. It bundled with OS installed. The easy way to make a OS backup is using tape data cartridge. Just plug the tape to tape library, and run command “make_tape_recovery -AI”. To restore OS using recovery tape, go to MP (management processor) and boot to tape (Sequential media) and follow the intructions.
To simplify manage the archive of OS backup, we can utilize “Ignite Server”. We can make OS backup to disk (via network) in another server (Ignite Server). The command is “make_net_recovery -s ignite_server -x inc_entire=vg00″.
To recovery OS using ignite server (Client and Ignite server in same IP subnet):
1. Boot the failed system to Ignite server (boot lan install or boot lan.ip_ignite_server install)
2. Do not interact with ISL
3. Select “Install HP-UX” and follow the instructions to fill about server configurations (network, hostname, etc)
4. Select recovery configurations to use
If clients to use is different subnet, we must use a boot helper server. the boot helper server have same subnet with client server. to setting up boot helper:
* for example: IP Ignite server is 10.2.2.1 & GW 10.2.2.254, OS to be restored is restore01 and target client is client01 (10.2.3.1 & GW 10.2.3.254)
1. Make sure the boot helper server have Ignite software with same version with client & Ignite server
2. Point the installation to Ignite server
# instl_adm -t 10.2.2.1
3. To verify the correct configuration in boot helper, run command instl_adm -d
4. Specify the temporary ip address at boot helper that client can use to boot. Edit /etc/opt/ignite/instl_boottab
5. Copy the CINDEX & recovery directory from source (OS to be restored) to target client (server use to restore).
at Ignite Server:
# cd /var/opt/ignite/clients/restore01
# find CINDEX recovery | cpio -pvdma ../client01
# edit CINDEX file at target client (/var/opt/ignite/clients/client01/CINDEX)
- make a full path for system_cfg, control_cfg & archive_cfg. (/var/opt/ignite/clients/client01/../…..)
6. Boot to boot helper or direct to ignite server
* refer to step mentioned above.
How to find world writable file and directory Friday, September 14, 2007
Posted by piyut in HP-UX, Solaris.add a comment
To find world writable file:
# find / -type f -perm -o+w -exec ls -l {} \;
To find world writable directory:
# find /home -type d -perm -o+w -exec ls -ld {} \;
OS Memory Leaks/Hogs Thursday, September 13, 2007
Posted by piyut in HP-UX.add a comment
1. To cek memory leaks in hpux can use an unsupported utility called kmeminfo
2. Checking memory hogs:
- JFS inode cache is sized by vx_ninode kernel parameter. the value of vx_ninode is determined by memory size
- lowering vx_ninode results in a large savings of memory
- to see the JFS inode cache:
# echo “vxfs_ninode/D” | adb -k /stand/vmunix /dev/mem
- to see how many JFS inodes are currently cached:
# echo “vx_cur_inodes/D” | adb -k /stand/vmunix /dev/mem
lsof Friday, September 7, 2007
Posted by piyut in HP-UX.add a comment
Get the source of lsof from http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.78/
To install, run command swinstall -s $PWD/lsof-4.78-hppa-11.11.depot \*, the insallation file will be put at /usr/local
To display just the lsof output lines with file locks run the following:
/opt/lsof/bin/lsof | awk ‘match(”NrRwWuUx”,substr($0,31,1))’
SSH Timeout with error “Server unexpectedly closed network connection” Wednesday, August 22, 2007
Posted by piyut in HP-UX, Solaris.add a comment
Login to server using ssh have an error “Server unexpectedly closed network connection”, this case is issue of sshd_config configurations related to DNS service. to solve this case, configure sshd_config to change line “UseDNS” to “no” than restart sshd daemon.
Restore Printer Spooler Configuration Tuesday, August 21, 2007
Posted by piyut in HP-UX.add a comment
In the Source System
1. Save printer spooler configurations
# /usr/sam/lbin/lpmgr -S
–> this will save the info in the /var/sam/lp/lpinfo file
via SAM
SAM -> printer and plotters -> lp spooler -> save/restore spooler configuration.Then, Actions -> Save spooler configuration.
This will write all your printer defs to /var/sam/lp
2. Copy the configurations from source to target system
# scp -rp /var/sam/lp target_system:/var/sam/lp/./
In the Target System
1. Restore printer spooler configurations
# chmod 755 /var/sam/lp
# /usr/sam/lbin/lpmgr -R
–> this will restore the info in /var/sam/lp/* on the new system
via SAM
SAM -> printer and plotters -> lp spooler -> save/restore spooler configuration. Then, Actions -> Restore spooler configuration