Showing posts with label UNIX. Show all posts
Showing posts with label UNIX. Show all posts

Monday, February 28, 2011

Replacing failed / missing PV on rootvg AIX

Replacing a failed PV when the configuration does not allow the use of the replacepv command (for hdisk in rootvg)

Thursday, February 10, 2011

vtmenu - Open virtual console from SSH on HMC

Here is short how to "open vitual console from SSH on HMC"

Login to HMC ant type vtmenu:
hscroot@hostname:~> vtmenu

 Retrieving name of managed system(s) . . . Server-xxxx-xxx-xxxxxxxxx

 ----------------------------------------------------------
  Partitions On Managed System:  Server-xxxx-xxx-xxxxxxxxx
  OS/400 Partitions not listed
 ----------------------------------------------------------
   1)    Partition name                           Running
   2)    Partition name                           Running

Monday, January 24, 2011

LPAR and VIO on IBM AIX UNIX Servers

Virtual I/O (VIO) and Virtualization

Briefly What is Virtualization?

The Virtual I/O Server is part of the IBM System p5 Advanced Power Virtualization hardware feature. Virtual I/O Server allows sharing of physical resources between LPARs including virtual SCSI and virtual networking. This allows more efficient utilization of physical resources through sharing between LPARs and facilitates server consolidation.
This allows a single machine to run multiple operating system (OS) images at the same time but each is isolated from the others. POWER4 based machines started this in 2001 by allowing many Logical Partitions (LPAR) to run on the same machine using but each using different CPUs, different memory sections and different PCI adapter slots. Next came with POWER4, the ability to dynamically change the CPU, memory and PCI adapters slots with the OS running. With the introduction of POWER5 in 2005, further Virtualization items have been added:
  1. Less than a whole CPU can be allocated to a LPAR
  2. The LPARs sharing CPUs can be setup to allow automatic load balancing (in milliseconds)
  3. The sharing of disks, networks, optical devices (CD/DVD) using a VIO Server (see below)
For whole article read:
http://www.ibm.com/developerworks/wikis/display/virtualization/VIO
Source: IBM DeveloperWorks Wiki

Sunday, January 2, 2011

Basic troubleshooting for library and tape drives in AIX and TSM

Basic troubleshooting for library and tape drives in AIX
Source:
IBM Technote:
http://www-01.ibm.com/support/docview.wss?uid=swg21406601

Many times issues with Tivoli Storage Manager Server in AIX connecting to tape libraries and/or drives can be resolved by checking some basics. The first things to do when addressing hardware issues are given in the steps below.

1) AIX: Does AIX have the correct device driver for the library and/or tape drives?
2) AIX: Does AIX list the library and/or tape drives as Available?
If 6.1, does the db2 instance owner account have read/write access?
3) TSM: Does TSM list the drives as online?
4) TSM: Does TSM list the paths as online and using the correct device name?
5) AIX: Can you test the library and/or drives from device utilities in AIX?
6) TSM: Does reconfiguring the library and/or drives in AIX and TSM resolve the issue?

Tuesday, December 21, 2010

Dynamic Tracking of Fibre Channel devices in AIX - PID change in Fibre Channel Fabric

Port identifiers (called PIDs) are used by the routing and zoning services in Fibre Channel fabrics to
identify ports in the network. All devices in a fabric must use the same PID format, so when you add
new equipment to the SAN, you might need to change the PID format on legacy equipment.

Many scenarios cause a device to receive a new PID; for example, unplugging the device from one
port and plugging it into a different port as part of fabric maintenance, or changing the domain ID
of a switch, which might be necessary when merging fabrics, or changing compatibility mode
settings.


AIX® 6.1 and higher supports dynamic tracking of Fibre Channel (FC) devices.
Previous releases of AIX required a user to unconfigure FC storage device and adapter device instances before making changes on the system area network (SAN) that might result in an N_Port ID (SCSI ID) change of any remote storage ports.

Monday, October 11, 2010

IBM HMC: Accessing the Product Engineering Shell (PESH) Command Line

On this site you can find manual how to access PESH in HMC.
http://www-01.ibm.com/support/docview.wss?uid=nas1dba3b86d228b9b6c862570d1008009fd

It can be used when solving problem with too big /var/hsc/log/hmclogger.log file and need to do any operation under root.
http://www-01.ibm.com/support/docview.wss?uid=isg3T1011162


The procedure in this document can be used to obtain an unrestricted shell on the HMC and log on as root.
Prerequisites: Obtain a pesh password from IBM support.
Right-click on the HMC desktop, select Terminals > rshterm . Run the lshmc -v command to obtain the HMC serial number (as stored in the BIOS). The serial number is listed in the SE field (in bold blue below):

Thursday, October 7, 2010

How to recover one table from dump in MySQL

If you do dumps just of one table on regular basis then you are happy man :-)
  1. Backup of one table:
    # mysqldump -u username -p password > /path/file.sql
  2. Restore one table:
    # mysql --user=username --pass=password --host=localhost db_name < /path/file.sql
If you do dumps of whole DB then do following:
Backup of DB:
  1. # mysqldump -u username -p password > /path/file.sql
Restore of one table from dump of DB:
  1. We have to know where one table starts and where ends:
    # grep -n 'Table structure' /path/file.sql
  2. Then we have to separate part of file with required table into new file using line number gathered in previous command (where 7506 is start and 17684 is end):
    # sed -n '7506,17684 p' /path/file.sql > /path/new_file.sql
  3. Then we can restore it into DB:
    # mysql --user=username --pass=password --host=localhost db_name < /path/file.sql

Tuesday, October 5, 2010

UNIX and Linux command reference guide

Here are some commands from UNIX and Linux world.
Source:
http://www.ahinc.com/aix/
http://www.digilife.be/quickreferences/quickrefs.htm
AIX
http://www.tablespace.net/quicksheet/aix-quicksheet.pdf
http://www.tablespace.net/quicksheet/aix-quickstart.html
http://publib16.boulder.ibm.com/pseries/index.htm


AIX Linux
Command Comment Command Comment
Show directory size du -ms /tmp k KB,m MB, g GB du -hs /tmp
Show disk size bootinfo –s hdisk# MB
List exported directories lsfsexp
showmount -e
Show FC Info fcstat fcsX

Wednesday, September 8, 2010

Redefining TSM Library and Drives for UNIX OS

Have you experienced problem with offline path of drive and library in TSM server?
Have you received these errors?
ANR0523W Transaction failed - error on output storage device
ANR8300E I/O error on library (OP=xx, CC=xx, KEY=xx, ASC=xx, ASCQ=xx, SENSE=xx)
ANR8301E I/O Error on library
ANR8355E I/O error reading label for volume NNNNNN on drive XXXXX
ANR8359E Media fault detected on volume NNNNNN in drive XXXXX
ANR8441E Initialization failed for SCSI library
ANR8779E Unable to open drive XXXXX, error number=ZZZ
ANR8944E Hardware or media error on drive
ANR8963E Unable to find path to match the serial number defined for drive
or
ANR3512E RECLAIM STGPOOL: Error encountered in accessing data storage - insufficient number
of mount points available for removable media.
ANR1463E RUN: Command script BCK_RECLAIM completed in error.
ANS8001I Return code 14.
or
ANR8840E      Unable to open device /dev/smc0 with error
ANR8840E      Unable to open device /dev/rmt0 with error
ANR8840E      Unable to open device /dev/rmt1 with error
or
UPDATE PATH source destination SRCTYPE=SERVER AUTODetect=Yes DESTTYPE=DRIVE LIBRARY=name DEVICE=/dev/rmt0 ONLINE=YES
ANR8420E UPDATE PATH: An I/O error occurred while accessing drive .
ANS8001I Return code 15.


IBM guys have made nice "How to redefine TSM Library and Drives for UNIX OS"
http://www-01.ibm.com/support/docview.wss?uid=swg21376419&myns=swgtiv&mynp=OCSSGSG7&mync=E

Thursday, August 12, 2010

How to convert UNIX/LINUX time to readable format

How to get the current epoch time
date +%s
Convert from human readable date to epoch
date +%s -d"Jan 1, 1980 00:00:01"
Convert from epoch to human readable date
date -d @1190000000

Wednesday, June 9, 2010

AIX commands you should not leave home without

Našel jsem stránku s příkazy AIXu, které byste neměli nechat doma když jdete do práce :-)
http://www.ibm.com/developerworks/aix/library/au-dutta_cmds.html


Keyword: AIX, commands, chlv, chfs

Thursday, May 20, 2010

Interaktivní help k topas na AIXu

Dnes jsem narazil na zajímavou stránku, na které je interaktivní screen utility TOPAS z AIX.
Pokud umístíte kurzor nad část(výraz), která vás zajímá, tak se zobrazí nápověda - popis jednotlivých polí.
Odkaz je zde: http://www.tablespace.net/papers/topas_intro.html

Na těchto stránkách http://www.tablespace.net/ najdete spoustu užitečných návodů "taháků" na UNIXy IBM AIX, HP UX, SOLARIS a LINUXY. Doporučuji!

Keywords: topas, top on AIX, topas PgPs, monitoring AIX, monitoring swap on AIX

Thursday, May 13, 2010

Chmod calculator - chmod kalkuačka

Tahák ve formě chmod kalkulačky pro UNIX a LINUXáře :-))
chmod xxx jmeno_souboru_nebo_adresare
kde x je soucet hodnot jednotlivých oprávnění: Read = 4, Write = 2, Execute = 1





Chmod
Permission Owner Group Other
Read
Write
Execute