setaOffice

Unix Intelligence Gathering

Archive for the ‘AIX’ Category

Creating and removing a logical volume in AIX

Posted by Emerson Takahashi on November 29, 2011

I had several logical volumes that were presenting a weird error

root@aix:/ # rmlvcopy lvpooldom01001 1
0516-622 rmlvcopy: Warning, cannot write lv control block data.

I tried to migrate the logical volume off the disk

root@cvrdalebk01:/ # migratepv -l lvpooldom01001 hdisk3
0516-076 lmigratelv: Cannot remove last good copy of stale partition.
Resynchronize the partitions with syncvg and try again.
0516-812 migratepv: Warning, migratepv did not completely succeed;
all physical partitions have not been moved off the PV.

But it was not completed successfully

root@aix:/ # lsvg -l tsm01vg
tsm01vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
lvtsm jfs2 32 32 1 open/syncd /tsm
loglv00 jfs2log 1 1 1 open/syncd N/A
lvtsmdborig01 jfs 512 512 1 open/syncd N/A
lvtsmdborig02 jfs 512 512 1 open/syncd N/A
lvtsmlogorig01 jfs 256 256 1 open/syncd N/A
lvtsmdbmirr01 jfs 512 512 1 open/syncd N/A
lvtsmdbmirr02 jfs 512 512 1 open/syncd N/A
lvtsmlogmirr01 jfs 256 256 1 open/syncd N/A
0516-1147 : Warning – logical volume lvpooldom01001 may be partially mirrored.
lvpooldom01001 raw 512 666 11 closed/stale N/A

So I ended up removing the logical volumes

root@aix:/ # rmlv lvpooldom01001
Warning, all data contained on logical volume lvpooldom01001 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? y
rmlv: Logical volume lvpooldom01001 is removed.
root@aix:/ # rmlv -f lvpooldom01003
rmlv: Logical volume lvpooldom01003 is removed.
root@aix:/ # rmlv -f lvpooldom01004
rmlv: Logical volume lvpooldom01004 is removed.
root@aix:/ # rmlv -f lvpooldom01005
rmlv: Logical volume lvpooldom01005 is removed.

And then recreating them

root@aix:/ # mklv -t raw -y lvpooldom01001 tsm01vg 512
lvpooldom01001

Here is the status. No warning was displayed

root@aix:/ # lsvg -l tsm01vg | grep lvpooldom01001
lvpooldom01001 raw 512 512 1 closed/syncd N/A

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

AIX errpt error message: 0315-180 logread: UNEXPECTED EOF

Posted by Emerson Takahashi on July 11, 2011

If you see this error message

root@aix:/ # errpt -a
0315-180 logread: UNEXPECTED EOF
0315-171 Unable to process the error log file /var/adm/ras/errlog.
0315-132 The supplied error log is not valid: /var/adm/ras/errlog.

And the log file is zeroed

root@aix:/ # ls -l /var/adm/ras/errlog
-rw-rw-r– 1 root system 0 Mar 14 09:38 /var/adm/ras/errlog

root@aix:/ # errclear 0
0315-180 logread: UNEXPECTED EOF
0315-171 Unable to process the error log file /var/adm/ras/errlog.
0315-132 The supplied error log is not valid: /var/adm/ras/errlog.

Stop the error logging, remove the file and then restart it again

root@aix:/ # /usr/lib/errstop
root@aix:/ # rm /var/adm/ras/errlog
root@aix:/ # /usr/lib/errdemon

root@aix:/ # ls -l /var/adm/ras/errlog
-rw-rw-r– 1 root system 123404 Jul 11 14:33 /var/adm/ras/errlog

Posted in AIX | Tagged: | Leave a Comment »

Checking I/O access in a specific disk in AIX

Posted by Emerson Takahashi on August 10, 2010

Run iostat and check the column % tm_act. For seven times, it will display the statistics every two seconds

root@aix5:/ # iostat -d hdisk2 2 7
System configuration: lcpu=6 disk=4
Disks:        % tm_act     Kbps      tps    Kb_read   Kb_wrtn
hdisk2          85.2     3453.1     303.8   37734456   8731944
hdisk2          51.0     610.0      84.5        796       424
hdisk2          34.5     288.0      45.5        436       140
hdisk2          39.5     452.0      63.5        692       212
hdisk2          61.5     380.0      66.0        480       280
hdisk2          48.5     542.0      66.5        596       488
hdisk2          47.0     590.0      80.0       1020       160

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

Stopping and starting an AIX Subsystem

Posted by Emerson Takahashi on August 9, 2010

Lists all the subsystems on AIX’s System Resource Controller and then look for the subsystem that you want. In this example, I’ll restart sshd

root@aix:/ # lssrc -a | grep ssh
sshd ssh 340158 active

Issue the command to stop sshd

root@aix:/ # stopsrc -s sshd
0513-044 The sshd Subsystem was requested to stop.

Then start it

root@aix:/ # startsrc -s sshd
0513-059 The sshd Subsystem has been started. Subsystem PID is 340162.

Posted in AIX | Tagged: | Leave a Comment »

Increasing a JFS2 filesystem on AIX

Posted by Emerson Takahashi on August 9, 2010

First you need to know which filesystem that you’ll resize. Get the logical volume

root@aix:/ # df -m /u04
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/lvcrnstore 34816.00 1892.34 95% 103 1% /u04

With this information you type lslv lvcrnstore to find out about the volume group that this logical group is part of. Check if there are FREE PPs to extend the filesystem

root@aix:/ # lsvg oraclevg
VOLUME GROUP: oraclevg VG IDENTIFIER: 000d400c00004c00000000fd81379ca3
VG STATE: active PP SIZE: 256 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 531 (135936 megabytes)
MAX LVs: 256 FREE PPs: 17 (4352 megabytes)
LVs: 15 USED PPs: 514 (131584 megabytes)
OPEN LVs: 14 QUORUM: 2
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per PV: 1016 MAX PVs: 32
LTG size: 128 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable

Resize the filesystem and check the new size

root@aix:/ # chfs -a size=+4G /u04
Filesystem size changed to 79691776

root@aix:/ # df -m /u04
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/lvcrnstore 38912.00 5987.71 85% 103 1% /u04

Notice that the number of free PPs decreased since you used to increase the filesystem

root@aix:/ # lsvg oraclevg
VOLUME GROUP: oraclevg VG IDENTIFIER: 000d400c00004c00000000fd81379ca3
VG STATE: active PP SIZE: 256 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 531 (135936 megabytes)
MAX LVs: 256 FREE PPs: 1 (256 megabytes)
LVs: 15 USED PPs: 530 (135680 megabytes)
OPEN LVs: 14 QUORUM: 2
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per PV: 1016 MAX PVs: 32
LTG size: 128 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable

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

End of life information about HP-UX, Solaris, AIX and Linux

Posted by Emerson Takahashi on July 30, 2010

If you need to know the if a release of an Unix operating system is still supported by the vendor, check these links for information

End of life information about HP-UX (PDF)

End of life information about Solaris

End of life information about AIX

End of life information about Red Hat Enterprise Linux

End of life information about Suse Linux Enterprise

Posted in AIX, HP-UX, Solaris | Tagged: , , , , , , | Leave a Comment »

Problem with HMC – rebooting

Posted by Emerson Takahashi on July 29, 2010

hscroot@localhost:~> vtmenu

Retrieving name of managed system(s) . . . 10D400C

———————————————————-
Partitions On Managed System: 10D400C
———————————————————-
1) LPAR1 Not Available:
2) LPAR2 Not Available:

Enter Number of Running Partition (q to quit): q

Bye.

The server with the two LPAR partions were shut down due to a electric maintenance. I tried to start the partitions but I was having this problem:

hscroot@localhost:~> chsysstate -r lpar -m 10D400C -o on -n LPAR1
Unable to lock the Service Processor. Perform one of the following steps: (1) Check serial cable connection; (2) Check if another Console is communicating with the Service Processor; (3) Perform the Release Lock task; (4) Perform Rebuild task to re-establish the connection.

I tried again and I got a different error.

hscroot@localhost:~> chsysstate -r lpar -m 10D400C -o on -n LPAR1
Command sent to Service Processor failed. Error Response 4.

To reboot the IBM HMC, type the command below

hscroot@localhost:~> hmcshutdown -t now -r

Broadcast message from root (Sun Jun 6 08:35:38 2010):

The system is going down for reboot NOW!

I had problems with the reboot and asked to power off and power on the HMC. After that I had no more problems.

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

Resetting an LPAR on a Power4 system

Posted by Emerson Takahashi on July 23, 2010

First you need to check some information for your system on the HMC. Issue the command vtmenu to get the managed system ID and the names of the partitions

hscroot@localhost:~> vtmenu

Retrieving name of managed system(s) . . . 108F19C

———————————————————-
Partitions On Managed System: 108F19C
———————————————————-
1) MANUFACTURING Running:
2) RETAIL Running:

Enter Number of Running Partition (q to quit): q

Bye.

On this example I tried to soft reset the partition called MANUFACTURING

hscroot@localhost:~> chsysstate -m 108F19C -r lpar -n MANUFACTURING -o reset

Since it didn’t work out as expected, I decided to power off the LPAR

hscroot@localhost:~> chsysstate -m 108F19C -r lpar -n MANUFACTURING -o off

hscroot@localhost:~> vtmenu

Retrieving name of managed system(s) . . . 108F19C

———————————————————-
Partitions On Managed System: 108F19C
———————————————————-
1) MANUFACTURING Ready:
2) RETAIL Running:

Enter Number of Running Partition (q to quit): q

Bye.

I turned the partition on and after that it worked flawlessly

hscroot@localhost:~> chsysstate -r lpar -m 108F19C -o on -n MANUFACTURING

hscroot@localhost:~> vtmenu

Retrieving name of managed system(s) . . . 108F19C

———————————————————-
Partitions On Managed System: 108F19C
———————————————————-
1) MANUFACTURING Starting:
2) RETAIL Running:

Enter Number of Running Partition (q to quit): q

Bye.

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

Check if an account is locked on AIX and when was the last time an user logged in

Posted by Emerson Takahashi on July 13, 2010

To check account properties you use the command lsuser and specify what property you want to see.

Checking if an account is locked

root@aix:/ # lsuser -a account_locked emerson
emerson account_locked=false

To calculate when was the last time an user logged in to the server, you will need to convert the time displayed. Use the command below to convert.

root@aix:/ # lsuser -a time_last_login emerson
emerson time_last_login=1279036180

root@aix:/ # perl -we ‘print(my $time = localtime 1279036180, “\n”)’
Tue Jul 13 10:49:40 2010

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

Checking Disk Array status in AIX

Posted by Emerson Takahashi on March 5, 2010

This AIX server has a disk array connected.

root@aix:/ # lscfg -vl hdisk2
hdisk2           U0.1-P2-I3/Z3-A0  SCSI RAID 5 Disk Array

The array has 7 physical disks
root@aix:/ # lsdev -C | grep pdisk

pdisk0         Available 1A-08-01-0,0  Physical SCSI Disk Drive
pdisk1         Available 1A-08-01-1,0  Physical SCSI Disk Drive
pdisk2         Available 1A-08-01-2,0  Physical SCSI Disk Drive
pdisk3         Available 1A-08-01-3,0  Physical SCSI Disk Drive
pdisk4         Available 1A-08-01-4,0  Physical SCSI Disk Drive
pdisk5         Available 1A-08-01-5,0  Physical SCSI Disk Drive
pdisk6         Available 1A-08-01-6,0  Physical SCSI Disk Drive

Connected through a PCI-X SCSI RAID adapter
root@aix:/ # lscfg -vl sisioa0

sisioa0          U0.1-P2-I3  PCI-X Dual Channel U320 SCSI RAID Adapter
PCI-X Dual Channel Ultra320 SCSI RAID Adapter:
Part Number……………..97P3960
FRU Number………………97P3960
Serial Number……………YL10C4077074
Manufacture ID…………..000C
EC Level………………..0
ROM Level.(alterable)…….0709000c
Product Specific.(Z0)…….5703
Product Specific.(Z1)…….1
Device Specific.(YL)……..U0.1-P2-I3

When we checked the status we saw that the array was running in degraded state.
root@aix:/ #sisraidmgr -L -j1 -l sisioa0

————————————————————————
Name      Location      State       Description        Size
————————————————————————
sisioa0   1A-08         Available   PCI-X Dual Channel U320 SCSI RAID Adapter
scsi2    1A-08-00-07,0 NoLink      No remote adapter target
scsi3    1A-08-01-07,0 NoLink      No remote adapter target
hdisk2    1A-08-ff-0,0  Degraded RAID 5 Array     428.0GB
pdisk0   1A-08-01-0,0  Active      Array Member      71.4GB
pdisk1   1A-08-01-1,0  Active      Array Member      71.4GB
pdisk2   1A-08-01-2,0  Active      Array Member      71.4GB
pdisk3   1A-08-01-3,0  Active      Array Member      71.4GB
pdisk4   1A-08-01-4,0  Active      Array Member      71.4GB
pdisk5   1A-08-01-5,0  Active      Array Member      71.4GB
pdisk6   1A-08-01-6,0  Active      Array Member      71.4GB
hdisk0    1A-08-00-10,0 Available   16 Bit LVD SCSI  146.8GB
hdisk1    1A-08-00-11,0 Available   16 Bit LVD SCSI  146.8GB

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

 
Follow

Get every new post delivered to your Inbox.

Join 244 other followers