setaOffice

Unix Intelligence Gathering

Archive for the ‘AIX’ Category

AIX – Some tape commands

Posted by Emerson Takahashi on March 4, 2010

Getting information about the tape drive.

root@aix:/ # lscfg -vpl rmt0
rmt0             U787E.001.AAA2714-P2-C1-T2-L0-L0  4.0 GB 4mm Tape Drive
Manufacturer…………….ARCHIVE
Machine Type and Model……IBM4326NP/RP  !D
Device Specific.(Z1)……..5ALG
Serial Number……………DR0N6QG 0011
Load ID…………………0011
Part Number……………..21H5154
FRU Number………………59H3481
EC Level………………..E30312
Device Specific.(Z0)……..0180020283000018
Device Specific.(Z3)……..L1
PLATFORM SPECIFIC
Name:  st
Device Type:  byte

Getting information about the tape. It is using compression and a variable length block size.

root@aix:/ # tctl -f /dev/rmt0 status
rmt0 Available 06-08-01-0,0 4.0 GB 4mm Tape Drive
ttribute  value description                          user_settable
block_size 0     BLOCK size (0=variable length)       True
compress   yes   Use data COMPRESSION                 True
mode       yes   Use DEVICE BUFFERS during writes     True
ret_error  no    RETURN error on tape change or reset True

Rewinding tape drive

root@aix:/ # tctl -f /dev/rmt0 rewind

Reading tape and redirecting output to a file. In this case, the operating system showed that the tape itself is damaged.

root@aix:/ # tctl -f /dev/rmt0 read > /tmp/testtape
tctl: 0511-578 Cannot read 512 bytes: The media surface is damaged.

Posted in AIX, Hardware | Tagged: , , | Leave a Comment »

Couldn’t mount AIX file system. First information says that media is not formatted

Posted by Emerson Takahashi on February 13, 2010

I had a problem mounting a file system after the server rebooted. At first it reported that the logical volume wasn’t formatted or the format is incorrect. Then it asked to run fsck.

root@aix5:/ # mount /fallback
Replaying log for /dev/fallback.
mount: 0506-324 Cannot mount /dev/fallback on /fallback: The media is not formatted or the format is not correct.
0506-342 The superblock on /dev/fallback is dirty.  Run a full fsck to fix.

I just ran fsck on the logical volume and then mounted the file system.

root@aix5:/ # fsck /dev/fallback

****************
The current volume is: /dev/fallback
**Phase 1 – Check Blocks, Files/Directories, and Directory Entries
**Phase 2 – Count links
**Phase 3 – Duplicate Block Rescan and Directory Connectedness
**Phase 4 – Report Problems
**Phase 5 – Check Connectivity
**Phase 7 – Verify File/Directory Allocation Maps
**Phase 8 – Verify Disk Allocation Maps
15728640 kilobytes total disk space.
63 kilobytes in 30 directories.
7664455 kilobytes in 438 user files.
8061172 kilobytes are available for use.
File system is clean.
Superblock is marked dirty; FIX? y
All observed inconsistencies have been repaired.

root@aix5:/ # mount /fallback

root@aix5:/ # df -g /fallback
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/fallback      15.00      7.69   49%      470     1% /fallback

Posted in AIX | Tagged: , , , | Leave a Comment »

Removing a Logical Volume in AIX

Posted by Emerson Takahashi on January 29, 2010

To remove a logical volume, use rmlv. The -f switch is to remove without user confirmation.

Usage: rmlv [ -B ] [ -f ]  [ -p Physical Volume ]  LogicalVolume …
Removes a logical volume.

root@aix:/ # /usr/sbin/rmlv -f rawdevice19
rmlv: Logical volume rawdevice19 is removed.

Posted in AIX | Tagged: , | Leave a Comment »

AIX Volume Group can’t properly display the Logical Volume Type

Posted by Emerson Takahashi on October 13, 2009

Listing the logical volumes inside the volume group. AIX can’t determine the LV type.

root@aix:/ # lsvg -l oravg
oravg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
oravg_lg            ??? 1     1     1    closed/syncd  N/A
ora_lv              ??? 1064  1064  2    closed/syncd  N/A

To solve this problem we’ll export then reimport the VG. But first we’ll need to deactivate it.

root@aix:/ # varyoffvg oravg

And we need at least one disk that is part of the volume group because it has the information needed to import.

root@aix:/ # lspv | grep oravg
hdisk251
00c5f1d097cc8a6e                   oravg
hdisk221
00c5f1d0a7bffede                    oravg

Now we run exportvg and the server will no longer know it once had the volume group.

root@aix:/ # exportvg oravg

Let’s list all the volume groups the server is aware that exists.

root@aix:/ # lsvg
rootvg
datavg
cache01vg
cache02vg

Only the rootvg is currently imported and active.

root@aix:/ # lsvg -o
rootvg

Let’s reimport the volume group. We need to declare one of the disks we listed before to reimport the volume group.

root@aix:/ # importvg -y oravg hdisk251
oravg

Next, we activate the volume group

root@aix:/ # varyonvg oravg

Listing the Volume Group. Volume Group TYPE listed.

root@aix:/ # lsvg -l oravg
oravg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
oravg_lg            jfs2log    1     1     1    closed/syncd  N/A
ora_lv              jfs2       1064  1064  2    closed/syncd  /u01

Posted in AIX | Tagged: , , | Leave a Comment »

Download IBM WebSM for HMC v6

Posted by Emerson Takahashi on April 13, 2009

To download the Web Based System Manager client you simply open a browser window and type the URL http://<ip address of your HMC>/remote_client.html.

To check the version of your HMC, type lshmc -V

hscroot@localhost:~> lshmc -V
“version= Version: 6
Release: 1.2
HMC Build level 20070201.1
MH00985: Miscellaneous fixes for HMC V6 (04-15-2007)
“,”base_version=V6.1.2

The Hardware Management Console v7 has web access, so you don’t need to install a client to use it.

Posted in AIX, Hardware | Tagged: , , | Leave a Comment »

Getting console access using IBM HMC v6 Command Line

Posted by Emerson Takahashi on April 13, 2009

To get a console access through a remote connection, first ssh to the HMC

emerson@shellcore:~ $ ssh hscroot@hmc6
password:

Then type vtmenu. It will retrieve all the physical servers connected and that can be managed by the HMC.

hscroot@localhost:~> vtmenu

Retrieving name of managed system(s) . . . Server-9117-570-SN103CBBB 2-Server-9117-570-SN103CABB Server-9117-570-SN069D5BF Server-9119-595-SN8211572

———————————————————-
Managed Systems:
———————————————————-
1) Server-9117-570-SN103CBBB
2) 2-Server-9117-570-SN103CABB
3) Server-9117-570-SN069D5BF
4) Server-9119-595-SN8211572

Enter Number of Managed System. (q to quit): 1

You choose one of the managed servers and then it will show all LPARs available on that physical server.

———————————————————-
Partitions On Managed System:  Server-9117-570-SN103CBBB
OS/400 Partitions not listed
———————————————————-
1)    LPAR1                                   Running
2)    LPAR2                                   Running
3)    LPAR3                                   Running

After you selected which LPAR you will control, you will be shown the login screen
Open in progress..

Open Completed.

AIX Version 5
Copyright IBM Corporation, 1982, 2008.
Console login:

To exit you type tilde, space, tilde, space, dot.

~ ~ .

Posted in AIX, Hardware | Tagged: , | Leave a Comment »

AIX Error Code 0503-003 geninstall: The specified device is not a valid device or file.

Posted by Emerson Takahashi on February 28, 2009

I had the following error when trying to upgrade AIX Maintenance Level: 0503-003 geninstall:  The specified device /tmp/patches is not a valid device or file.

What happened is that my .toc file was empty and I needed to recreate it using inutoc /tmp/patches. After that the upgrade went smoothly.

root@aix53:/ # instfix -i | grep ML
All filesets for 5.3.0.0_AIX_ML were found.
All filesets for 5300-01_AIX_ML were found.
All filesets for 5300-02_AIX_ML were found.
All filesets for 5300-03_AIX_ML were found.
All filesets for 5300-04_AIX_ML were found.
All filesets for 5300-05_AIX_ML were found.
All filesets for 5300-06_AIX_ML were found.
All filesets for 5300-07_AIX_ML were found.
All filesets for 5300-08_AIX_ML were found.
All filesets for 5300-09_AIX_ML were found.

Posted in AIX | Tagged: , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 250 other followers