Category Archives: Aix

How to recover a deleted file in aix / jfs?

It is possible to recover the file using the “fsdb” command (filesystem debugger). when,

No new files have been created on the filesystem.

No files have been extended.

The filesystem is able to be unmounted.

Warning: I have test this in my test server. This is undocumented one. You may facing the critical problem when you follow the below steps on your systems. So try this at your own risk. Please avoid directly try this with your production servers. Here is the output for your reference.

You can get deleted files inode if you don’t have.

#fuser -dV

inode=68     size=34358697984  fd=6
inode=76     size=16106135552  fd=7
inode=65     size=34358697984  fd=16
inode=68     size=34358697984  fd=11
inode=68     size=34358697984  fd=7
inode=68     size=34358697984  fd=6

# lsvg -l testvg

testvg:

LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT

loglv00             jfs2log    1     1     1    closed/syncd  N/A

#

# crfs -a size=256M -v jfs2 -g testvg -m /new            à create a “/new” FS

File system created successfully.

261932 kilobytes total disk space.

New File System size is 524288

#

# lsvg -l testvg

testvg:

LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT

loglv00             jfs2log    1     1     1    closed/syncd  N/A

fslv00              jfs2       16    16    1    closed/syncd  /new

#

# mount /new         à mount the /new FS

#

# lsvg -l testvg

testvg:

LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT

loglv00             jfs2log    1     1     1    open/syncd    N/A

fslv00              jfs2       16    16    1    open/syncd    /new

#

# cd /new

#

# ls -l

total 0

drwxr-xr-x   2 root     system          256 Apr 03 16:47 lost+found

#

# cat >> film         à Create a file named “film”

Hi this is the test file. I want to use this file for recovery test

^C#

#

# cat film

Hi this is the test file. I want to use this file for recovery test

#

# ls –il        à check the inode number of the file “film”. That is 4

total 8

4 -rw-r–r–   1 root     system           68 Apr 03 16:49 film

3 drwxr-xr-x   2 root     system          256 Apr 03 16:47 lost+found

#

#

# rm film     à remove the file “film”

#

# ls -l

total 0

drwxr-xr-x   2 root     system          256 Apr 03 16:47 lost+found

#

# cd ~

#

# umount /new     à unmount the /new FS

#

# lsvg -l testvg

testvg:

LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT

loglv00             jfs2log    1     1     1    closed/syncd  N/A

fslv00              jfs2       16    16    1    closed/syncd  /new

#

# fsdb /dev/fslv00       à use the “fsdb <lv_name>” to recover the deleted  file.

File System:                    /dev/fslv00

File System Size:               523864  (512 byte blocks)

Aggregate Block Size:           4096

Allocation Group Size:          8192    (aggregate blocks)

> dir 2

idotdot = 2

3      lost+found

>

> i 4     à provide the inode number of our deleted file. That is 4

Inode 4 at block 33, offset 0x800:

[1] di_fileset:         16                 [18] di_inostamp:       0x4d98ead4

[2] di_number:          4               [19] di_gen:            3940655789

[3] di_size:    0x0000000000000044      [20] di_ixpxd.len:      4

[4] di_nblocks: 0x0000000000000001      [21] di_ixpxd.addr1:    0x00

[5] di_nlink:           0               [22] di_ixpxd.addr2:    0x00000021

[6] di_mode:            0x000081a4           di_ixpxd.address:  33

0100644 -rw-r–r–      [24] di_uid:            0

[25] di_gid:            0

[9] di_atime.tj_nsec:   0x1e8a1025      [26] di_atime.tj_sec:0x000000004d98eb7d

[10] di_ctime.tj_nsec:  0x0ca85614      [27] di_ctime.tj_sec:0x000000004d98ebac

[11] di_mtime.tj_nsec:  0x1af63892      [28] di_mtime.tj_sec:0x000000004d98eb77

[12] di_otime.tj_nsec:  0x03b74a9a      [29] di_otime.tj_sec:0x000000004d98eb24

[13] di_ea.flag:        0x00            [30] di_ea.len:         0

EAv1                               [31] di_ea.addr1:       0x00

[15] di_ea.nEntry:      0x00            [32] di_ea.addr2:       0x00000000

[16] di_ea.type:        0x0000               di_ea.address:     0

[34] di_ea.nblocks:     0

change_inode: [m]odify, [e]a, [t]ree, or e[x]it > m     à choose “m” to modify

Please enter: field-number value > 5  1   à  put the field number is 5, change the di_nlink value to 1

Inode 4 at block 33, offset 0x800:

[1] di_fileset:         16              [18] di_inostamp:       0x4d98ead4

[2] di_number:          4               [19] di_gen:            3940655789

[3] di_size:    0x0000000000000044      [20] di_ixpxd.len:      4

[4] di_nblocks: 0x0000000000000001      [21] di_ixpxd.addr1:    0x00

[5] di_nlink:           1               [22] di_ixpxd.addr2:    0x00000021

[6] di_mode:            0x000081a4           di_ixpxd.address:  33

0100644 -rw-r–r–      [24] di_uid:            0

[25] di_gid:            0

[9] di_atime.tj_nsec:   0x1e8a1025      [26] di_atime.tj_sec:0x000000004d98eb7d

[10] di_ctime.tj_nsec:  0x0ca85614      [27] di_ctime.tj_sec:0x000000004d98ebac

[11] di_mtime.tj_nsec:  0x1af63892      [28] di_mtime.tj_sec:0x000000004d98eb77

[12] di_otime.tj_nsec:  0x03b74a9a      [29] di_otime.tj_sec:0x000000004d98eb24

[13] di_ea.flag:        0x00            [30] di_ea.len:         0

EAv1                               [31] di_ea.addr1:       0x00

[15] di_ea.nEntry:      0x00            [32] di_ea.addr2:       0x00000000

[16] di_ea.type:        0x0000               di_ea.address:     0

[34] di_ea.nblocks:     0

change_inode: [m]odify, [e]a, [t]ree, or e[x]it > x    à exit

> quit

#

# fsck -yp /dev/fslv00     à run fsck to repaired the  inconsistencies.

The current volume is: /dev/fslv00

Primary superblock is valid.

J2_LOGREDO:log redo processing for /dev/fslv00

logredo start at: 1301867616 sec and end at 1301867616 sec

Primary superblock is valid.

*** Phase 1 – Initial inode scan

*** Phase 2 – Process remaining directories

*** Phase 3 – Process remaining files

*** Phase 4 – Check and repair inode allocation map

File system inode map is corrupt (FIXED)

Superblock marked dirty because repairs are about to be written.

*** Phase 5 – Check and repair block allocation map

Block allocation map is corrupt (FIXED)

Inodes not connected to the root directory

tree have been detected.  Will reconnect.

File system is clean.

Superblock is marked dirty (FIXED)

All observed inconsistencies have been repaired.

#

# mount /new   à mount the /new FS

# lsvg -l testvg

testvg:

LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT

loglv00             jfs2log    1     1     1    open/syncd    N/A

fslv00              jfs2       16    16    1    open/syncd    /new

#

# cd /new  à goto the /new FS

#

# ls -l

total 0

drwxr-xr-x   2 root     system          256 Apr 03 16:47 lost+found

#

# cd lost+found   à go to lost+found dir

#

# pwd

/new/lost+found

#

# ls -l

total 8

-rw-r–r–   1 root     system           68 Apr 03 16:49 4     à you can see the deleted file in the name of your inode number

#

# cat 4   à confirm the file content

Hi this is the test file. I want to use this file for recovery test

#

# mv 4 /new/.      à move the file to the exact place where it was before

#

# pwd

/new/lost+found

# cd ..

#

# pwd

/new

# ls -l

total 8

-rw-r–r–   1 root     system           68 Apr 03 16:49 4

drwxr-xr-x   2 root     system          256 Apr 03 16:55 lost+found

#

# cat 4

Hi this is the test file. I want to use this file for recovery test

#

# mv 4 film  à change the name of the recovered file to the old one.

#

# ls -l

total 8

-rw-r–r–   1 root     system           68 Apr 03 16:49 film   à the deleted file has been recovered.

drwxr-xr-x   2 root     system          256 Apr 03 16:55 lost+found

#

#

 

Creating graphs from SAR output

You must know that sar is a very effective tool to collect system activity or performance information from your system.
To collect all information:

sar -o test.log -A 1 3 2>&1 >/dev/null

This command will make a binary file from output, and you can display it with sadf command:

sadf -t -d test.log — -A

Sometimes, you would like to make graphs from these data, because diagrams are clear and better understandable than plain data.
The best way to create graphs from output of sar is kSar that is an Java-based application with gui.
You can download it from the following site: http://ksar.atomique.net/

This program can process sar text output and make diagrams from them, also it can save graphs as picture or export them into a PDF file.
If you have only the binary output of sar, you can convert it into text file with this command:

sar -A -f test.log >> sardata.txt

Now, you can import text file into kSar, with “Data/Load from text file…” menu entry.
Also, kSar has other useful functions, like remote sar running via SSH, for more details read kSar documentation.
Loading text file:sar-graph2-300x187 sar-graph-300x187 sar-main-300x187

AIX: rootvg/disk mirroring

bash-4.2# bootinfo -s hdisk0
140013
bash-4.2# bootinfo -s hdisk1
140013
bash-4.2# bootinfo -s hdisk2
140013

bash-4.2# lspv
hdisk0 002b012f397c20ce None
hdisk1 002afe4f2b4c3fdb rootvg active
hdisk2 002b016f09313544 ppmvg active
bash-4.2#

bash-4.2# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk1 active 546 187 10..00..00..85..92

bash-4.2# extendvg rootvg hdisk0
0516-1398 extendvg: The physical volume hdisk0, appears to belong to
another volume group. Use the force option to add this physical volume
to a volume group.
0516-792 extendvg: Unable to extend volume group.

bash-4.2# extendvg -f rootvg hdisk0

bash-4.2# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk1 active 546 187 10..00..00..85..92
hdisk0 active 546 546 110..109..109..109..109

bash-4.2# mirrorvg rootvg hdisk0
0516-1804 chvg: The quorum change takes effect immediately.
0516-1296 lresynclv: Unable to completely resynchronize volume.
The logical volume has bad-block relocation policy turned off.
This may have caused the command to fail.
0516-934 /usr/sbin/syncvg: Unable to synchronize logical volume hd5.
0516-934 /usr/sbin/syncvg: Unable to synchronize logical volume hd2.
0516-934 /usr/sbin/syncvg: Unable to synchronize logical volume dppmiaslv.
0516-934 /usr/sbin/syncvg: Unable to synchronize logical volume data01lv.
0516-932 /usr/sbin/syncvg: Unable to synchronize volume group rootvg.
0516-1126 mirrorvg: rootvg successfully mirrored, user should perform
bosboot of system to initialize boot records. Then, user must modify
bootlist to include: hdisk1 hdisk0.

bash-4.2# bosboot -ad /dev/hdisk0

bosboot: Boot image is 55324 512 byte blocks.

bash-4.2# bootlist -m normal -o
hdisk1 pathid=0

bash-4.2# bootlist -m normal hdisk1 hdisk0

bash-4.2# bootlist -m normal -o
hdisk1 blv=hd5 pathid=0
hdisk0 blv=hd5 pathid=0

bash-4.2# lspv
hdisk0 002b012f397c20ce rootvg active
hdisk1 002afe4f2b4c3fdb rootvg active
hdisk2 002b016f09313544 ppmvg active

To verify, rootvg is mirrored. We should have a 1:2 ratio between LP and PP except for the dumpdevices, like this.

bash-4.2# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 2 2 closed/stale N/A
hd6 paging 2 4 2 open/syncd N/A
hd8 jfs2log 1 2 2 open/syncd N/A
hd4 jfs2 2 4 2 open/syncd /
hd2 jfs2 10 20 2 open/stale /usr
hd9var jfs2 1 2 2 open/syncd /var
hd3 jfs2 13 26 2 open/syncd /tmp
hd1 jfs2 1 2 2 open/syncd /home
hd10opt jfs2 1 2 2 open/syncd /opt
hd11admin jfs2 1 2 2 open/syncd /admin
fwdump jfs2 2 4 2 open/syncd /var/adm/ras/platform
lg_dumplv sysdump 4 4 1 open/syncd N/A
dppmiaslv jfs2 120 240 2 open/stale /dppmias
data01lv jfs2 200 400 2 open/stale /data01

And we want to see exactly where a LV is mirrored:-

bash-4.2# lslv -m hd2
hd2:/usr
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 0222 hdisk1 0223 hdisk0
0002 0228 hdisk1 0224 hdisk0
0003 0229 hdisk1 0225 hdisk0
0004 0230 hdisk1 0226 hdisk0
0005 0231 hdisk1 0227 hdisk0
0006 0232 hdisk1 0228 hdisk0
0007 0523 hdisk1 0229 hdisk0
0008 0524 hdisk1 0230 hdisk0
0009 0525 hdisk1 0231 hdisk0
0010 0527 hdisk1 0232 hdisk0

Now, check your bootlist. Does it have both physical disks in the bootlist or not.

bash-4.2# bootlist -m normal -o
hdisk1 blv=hd5 pathid=0
hdisk0 blv=hd5 pathid=0

Logical volumes not being recognized and mounted even varyonvg not work

After two lun removed from host by mistake, we were experiencing problems and so
I rebooted the system and now I'm having big problems with two LVs on my user-defined volume group.  The user-defined volume group consists
of three disks.  When I try to vary them on I get "PVREMOVED" for three
of the disks.  Incidentally, these two disks are external and went down due to accidentally removed and  went out.  Here is the output we get when we try to varyon the uservg volume group:

#  varyonvg datavg
PV Status:      hdisk3  00f63e0e510b4815        PVREMOVED
                hdisk4  00f63e0e510b48b4        PVREMOVED
                hdisk5  00f63e0e510b4954        PVACTIVE

varyonvg: Volume group uservg is varied on.

Response:

This is happening because the three external disks were marked
as removed when you took the power hit.  You had been forcing
the import and varyon of the volume group and the external disks
were forced to a removed state.

You should try making the three drives active with the following
commands:

  chpv -v a hdisk3
  chpv -v a hdisk4

After you run those commands, varyoff and varyon uservg and see
if that corrects the problem.

Raw Work ::::::

*******************************************************************************
*                                                                             *
*                                                                             *
*  Welcome to AIX Version 7.1!                                                *
*                                                                             *
*                                                                             *
*  Please see the README file in /usr/lpp/bos for information pertinent to    *
*  this release of the AIX Operating System.                                  *
*                                                                             *
*                                                                             *
*******************************************************************************
# lsfs
Name            Nodename   Mount Pt               VFS   Size    Options    Auto Accounting
/dev/hd4        —         /                      jfs2  1048576 —         yes  no
/dev/hd1        —         /home                  jfs2  524288  —         yes  no
/dev/hd2        —         /usr                   jfs2  15204352 —         yes  no
/dev/hd9var     —         /var                   jfs2  11534336 —         yes  no
/dev/hd3        —         /tmp                   jfs2  4194304 —         yes  no
/dev/hd11admin  —         /admin                 jfs2  524288  —         yes  no
/proc           —         /proc                  procfs —      —         yes  no
/dev/hd10opt    —         /opt                   jfs2  1048576 —         yes  no
/dev/livedump   —         /var/adm/ras/livedump  jfs2  524288  —         yes  no
/dev/cd0        —         /mnt                   cdrfs —      ro         no   no
/dev/fslv03     —         /data01                jfs2  —      rw         yes  no
/dev/fslv04     —         /data02                jfs2  —      rw         yes  no
# bash
ksh: bash:  not found.
# vi /etc/filesystems
# mount /data01
mount: 0506-324 Cannot mount /dev/fslv03 on /data01: There is a request to a device or address that does not exist.
# lspv
hdisk1          00f63e023551f39d                    None
hdisk0          00f63e0e32fddc85                    rootvg          active
hdisk2          00f63e0e510b49f3                    None
hdisk5          00f63e0e510b4954                    datavg
hdisk6          00f63e0e7061217b                    None
# lspv -l hdisk6
0516-320 : Physical volume 00f63e0e7061217b0000000000000000 is not assigned to
a volume group.

# lspv -l hdisk5
0516-010 : Volume group must be varied on; use varyonvg command.
# varyonvg datavg
0516-052 varyonvg: Volume group cannot be varied on without a
quorum. More physical volumes in the group must be active.
Run diagnostics on inactive PVs.

# mpio_get_config -Av
Frame id 0:
Storage Subsystem worldwide name: 600a0b80006e0fc4000000004d59db49
Controller count: 2
Partition count: 1
Partition 0:
Storage Subsystem Name = ‘DS5300_PRI’
hdisk#           LUN #   Ownership          User Label
hdisk2               4   B (preferred)      6
hdisk5               3   A (preferred)      5
hdisk6               5   A (preferred)      7
# hostname
NUSW2WDB1
# redefinevg -d hdisk5 datavg
# lspv
hdisk1          00f63e023551f39d                    None
hdisk0          00f63e0e32fddc85                    rootvg          active
hdisk2          00f63e0e510b49f3                    None
hdisk5          00f63e0e510b4954                    datavg
hdisk6          00f63e0e7061217b                    None
# lspv -l hdisk5
0516-010 : Volume group must be varied on; use varyonvg command.
# varyonvg datavg
0516-052 varyonvg: Volume group cannot be varied on without a
quorum. More physical volumes in the group must be active.
Run diagnostics on inactive PVs.
# cfgmgr
# lspv
hdisk1          00f63e023551f39d                    None
hdisk0          00f63e0e32fddc85                    rootvg          active
hdisk2          00f63e0e510b49f3                    None
hdisk3          00f63e0e510b4815                    None
hdisk4          00f63e0e510b48b4                    None
hdisk5          00f63e0e510b4954                    datavg
hdisk6          00f63e0e7061217b                    None
# bootinfo -s hdisk5
256000
# varyonvg -f datavg
PV Status:      hdisk5  00f63e0e510b4954        PVACTIVE
00f63e0e510b48b4        NONAME
00f63e0e510b4815        NONAME
varyonvg: Volume group datavg is varied on.
# lspv
hdisk1          00f63e023551f39d                    None
hdisk0          00f63e0e32fddc85                    rootvg          active
hdisk2          00f63e0e510b49f3                    None
hdisk3          00f63e0e510b4815                    None
hdisk4          00f63e0e510b48b4                    None
hdisk5          00f63e0e510b4954                    datavg          active
hdisk6          00f63e0e7061217b                    None
# lspv -l hdisk5
hdisk5:
LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT
fslv04                499     499     100..100..99..100..100 /data02
# mount /data02
Replaying log for /dev/fslv04.
mount: 0506-324 Cannot mount /dev/fslv04 on /data02: The media is not formatted or the format is not correct.
0506-342 The superblock on /dev/fslv04 is dirty.  Run a full fsck to fix.
# varryoffvg datavg
ksh: varryoffvg:  not found.
# varyoffvg datavg
#  lspv -l hdisk5
0516-010 : Volume group must be varied on; use varyonvg command.
# redefinevg -d hdisk5 datavg
# lspv
hdisk1          00f63e023551f39d                    None
hdisk0          00f63e0e32fddc85                    rootvg          active
hdisk2          00f63e0e510b49f3                    None
hdisk3          00f63e0e510b4815                    datavg
hdisk4          00f63e0e510b48b4                    datavg
hdisk5          00f63e0e510b4954                    datavg
hdisk6          00f63e0e7061217b                    None
#  mpio_get_config -Av
Frame id 0:
Storage Subsystem worldwide name: 600a0b80006e0fc4000000004d59db49
Controller count: 2
Partition count: 1
Partition 0:
Storage Subsystem Name = ‘DS5300_PRI’
hdisk#           LUN #   Ownership          User Label
hdisk2               4   B (preferred)      6
hdisk3               0   A (preferred)      3
hdisk4               1   B (preferred)      4
hdisk5               3   A (preferred)      5
hdisk6               5   A (preferred)      7
# rmdev -Rdl hdisk2
hdisk2 deleted
# rmdev -Rdl hdisk6
hdisk6 deleted
# cfgmgr
Method error (/usr/lib/methods/cfgscsidisk -l hdisk3 ):
0514-082 The requested function could only be performed for some
of the specified paths.
Method error (/usr/lib/methods/cfgscsidisk -l hdisk4 ):
0514-082 The requested function could only be performed for some
of the specified paths.
# lspv
hdisk1          00f63e023551f39d                    None
hdisk0          00f63e0e32fddc85                    rootvg          active
hdisk3          00f63e0e510b4815                    datavg
hdisk4          00f63e0e510b48b4                    datavg
hdisk5          00f63e0e510b4954                    datavg
# varyonvg datavg
PV Status:      hdisk3  00f63e0e510b4815        PVREMOVED
hdisk4  00f63e0e510b48b4        PVREMOVED
hdisk5  00f63e0e510b4954        PVACTIVE
varyonvg: Volume group datavg is varied on.
# varyoffvg datavg
You have mail in /usr/spool/mail/root
# importvg
0516-604 importvg: Physical volume name not entered.
Usage: importvg [ [ [-V MajorNumber] [-y VGname] [-f] [-c] [-x] ] | [-L VGname] ]
[-n] [-F] [-R] [-O] PVname
Imports the definition of a volume group.
#
ksh: ^[[A^[[B:  not found.
# importvg -y datavg hdisk3
0516-360 getvgname: The device name is already used; choose a
different name.
0516-776 importvg: Cannot import hdisk3 as datavg.
#  varyonvg datavg
PV Status:      hdisk3  00f63e0e510b4815        PVREMOVED
hdisk4  00f63e0e510b48b4        PVREMOVED
hdisk5  00f63e0e510b4954        PVACTIVE
varyonvg: Volume group datavg is varied on.
# lspv -l hdisk3
hdisk3:
LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT
fslv03                499     499     100..100..99..100..100 /data01
# lspv -l hdisk4
hdisk4:
LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT
loglv00               1       1       00..01..00..00..00    N/A
fslv03                1       1       00..01..00..00..00    /data01
fslv04                1       1       00..01..00..00..00    /data02
# lspv -l hdisk5
hdisk5:
LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT
fslv04                499     499     100..100..99..100..100 /data02
# mount /data01
mount: 0506-324 Cannot mount /dev/fslv03 on /data01: There is an input or output error.
# chpv -v a hdisk3
# chpv -v a hdisk4
# varyoffvg datavg
# varyonvg datavg
# mount /data01
Replaying log for /dev/fslv03.
# mount /data02
# df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           0.50      0.25   51%    10624    16% /
/dev/hd2           7.25      5.14   30%    49315     4% /usr
/dev/hd9var        5.50      3.85   31%     9868     2% /var
/dev/hd3           2.00      1.99    1%      105     1% /tmp
/dev/hd1           0.25      0.25    1%        8     1% /home
/dev/hd11admin      0.25      0.25    1%        5     1% /admin
/proc                 –         –    –         –     –  /proc
/dev/hd10opt       0.50      0.20   60%     8331    15% /opt
/dev/livedump      0.25      0.25    1%        7     1% /var/adm/ras/livedump
/dev/fslv03      250.00    171.20   32%    41784     1% /data01
/dev/fslv04      250.00    249.96    1%        4     1% /data02
#

IBM AIX LPAR & VIO Commands

Sorry for unstructured post….

mkvdev -vdev hdisk1 -vadapter vhost0 -dev rootvgos

 

mkvdev -vdev Client3_OSLV -vadapter vhost0 -dev Client3_rootvg

 

mkvdev -vdev Client4_OSLV -vadapter vhost1 -dev Client4_rootvg

 

mkvdev -vdev Client3_dataLV -vadapter vhost0 -dev Client3_datavg

 

mkvdev -vdev Client4_dataLV -vadapter vhost1 -dev Client4_datavg

 

 

lsmap -vadapter vhost0

 

 

rmvdev  -vtd rootvgos

 

loadopt -f -vtd vtopt0 -disk nimserver.vol1

unloadopt -vtd vtopt0

 

 

mkvg -s 1024 -y datavg hdisk1

 

mklv -t jfs2 -y data01lv datavg 510

mklv -t jfs2 -y data02lv datavg 510

 

crfs -v jfs2 -d data01lv -m /data01 -A yes

crfs -v jfs2 -d data02lv -m /data02 -A yes

 

chown -R oracle:dba /data01

chown -R oracle:dba /data02

chmod -R 775 /data01

chmod -R 775 /data02

 

mklv -t jfs2 -y LPAR3_OSLV rootvg 400

 

mkvg -s 1024 -y lparosvg hdisk1

 

mklv -t jfs2 -y LPAR3_OSLV lparosvg 30

mklv -t jfs2 -y LPAR4_OSLV lparosvg 30

mklv -t jfs2 -y LPAR5_OSLV lparosvg 30

mklv -t jfs2 -y LPAR6_OSLV lparosvg 30

mklv -t jfs2 -y LPAR7_OSLV lparosvg 30

mklv -t jfs2 -y LPAR8_OSLV lparosvg 30

mklv -t jfs2 -y LPAR9_OSLV lparosvg 30

mklv -t jfs2 -y LPAR10_OSLV lparosvg 30

 

mkvdev -vdev LPAR3_OSLV -vadapter vhost0 -dev LPAR3_OS

mkvdev -vdev LPAR4_OSLV -vadapter vhost1 -dev LPAR4_OS

mkvdev -vdev LPAR5_OSLV -vadapter vhost2 -dev LPAR5_OS

mkvdev -vdev LPAR6_OSLV -vadapter vhost3 -dev LPAR6_OS

mkvdev -vdev LPAR7_OSLV -vadapter vhost4 -dev LPAR7_OS

mkvdev -vdev LPAR8_OSLV -vadapter vhost5 -dev LPAR8_OS

mkvdev -vdev LPAR9_OSLV -vadapter vhost6 -dev LPAR9_OS

mkvdev -vdev LPAR10_OSLV -vadapter vhost7 -dev LPAR10_OS

 

rmvdev -vtd LPAR3_OS

rmvdev -vtd LPAR4_OS

rmvdev -vtd LPAR5_OS

rmvdev -vtd LPAR6_OS

rmvdev -vtd LPAR7_OS

rmvdev -vtd LPAR8_OS

rmvdev -vtd LPAR9_OS

rmvdev -vtd LPAR10_OS

 

mklv -t jfs2 -y LPAR3_OSLV lparosvg 50

mklv -t jfs2 -y LPAR4_OSLV lparosvg 50

mklv -t jfs2 -y LPAR5_OSLV lparosvg 50

mklv -t jfs2 -y LPAR6_OSLV lparosvg 50

mklv -t jfs2 -y LPAR7_OSLV lparosvg 50

mklv -t jfs2 -y LPAR8_OSLV lparosvg 50

mklv -t jfs2 -y LPAR9_OSLV lparosvg 50

mklv -t jfs2 -y LPAR10_OSLV lparosvg 50

 

 

rmdev -dl en0

rmdev -dl et0

rmdev -dl ent0

 

rmdev -dl en1

rmdev -dl et1

rmdev -dl ent1

 

rmdev -dl en2

rmdev -dl et2

rmdev -dl ent2

 

rmdev -dl en3

rmdev -dl et3

rmdev -dl ent3

 

rmdev -dl en4

rmdev -dl et4

rmdev -dl ent4

 

rmdev -dl en5

rmdev -dl et5

rmdev -dl ent5

 

rmdev -dl en6

rmdev -dl et6

rmdev -dl ent6

 

rmdev -dl en7

rmdev -dl et7

rmdev -dl ent7

 

rmdev -dl en8

rmdev -dl et8

rmdev -dl ent8

 

rmdev -dl en9

rmdev -dl et9

rmdev -dl ent9

 

rmdev -dl en10

rmdev -dl et10

rmdev -dl ent10

 

rmdev -dl en11

rmdev -dl et11

rmdev -dl ent11

 

rmdev -dl en9

rmdev -dl et9

rmdev -dl ent9

 

 

mkvdev -vdev LPAR3_OSLV -vadapter vhost0 -dev LPAR3_OS

 

 

mkvdev -sea ent0 -vadapter ent4 -default ent4 -defaultid 1 -attr ha_mode=auto ctl_chan=ent5

 

 

netstat -v | grep Speed

 

mkvdev -lnagg ent0 ent4

 

mkvdev -sea ent10 -vadapter ent8 -default ent8 -defaultid 1

 

rmfs /dev/fsfslv00

rmfs /dev/fsfslv01

rmfs /dev/fslv00

rmfs /dev/fsfslv03

 

 

ntpdate -d 10.0.50.14

 

lsnports

 

 

vfcmap -vadapter vfchost0 -fcp fcs0

vfcmap -vadapter vfchost1 -fcp fcs0

vfcmap -vadapter vfchost2 -fcp fcs0

vfcmap -vadapter vfchost3 -fcp fcs0

vfcmap -vadapter vfchost4 -fcp fcs0

vfcmap -vadapter vfchost5 -fcp fcs0

vfcmap -vadapter vfchost6 -fcp fcs0

vfcmap -vadapter vfchost7 -fcp fcs0

 

 

vfcmap -vadapter vfchost8 -fcp fcs2

vfcmap -vadapter vfchost9 -fcp fcs2

vfcmap -vadapter vfchost10 -fcp fcs2

vfcmap -vadapter vfchost11 -fcp fcs2

vfcmap -vadapter vfchost12 -fcp fcs2

vfcmap -vadapter vfchost13 -fcp fcs2

vfcmap -vadapter vfchost14 -fcp fcs2

vfcmap -vadapter vfchost15 -fcp fcs2

 

 

 

 

ls -ltr /etc/init.ohasd

ls -l /etc/rc.d/rc2.d/*ohasd

ls -l /etc/ohasd

rm -rf /etc/rc.d/rc2.d/K19ohasd

rm -rf /etc/rc.d/rc2.d/S96ohasd

rm -rf /etc/init.ohasd

rm -rf /etc/init.ohasd

rmitab “h1”

rm /etc/ohasd

errclear 0

mv /etc/log/HostIdFile.txt /etc/log/HostIdFile.txt.old

 

 

errclear 0

cat /etc/log/HostIdFile.txt

lsfs

rmfs /dev/fslv00

lsfs

 

mkrep -sp rootvg -size 8G

 

cd /var/vio/VMLibrary/

 

 

 

Etherchannel with SEA

DanielJMartin | Mar 21 2012 | Comments (2) | Visits (4030)

0 people like this

 

inShare

Configuring your SEA with Etherchannel.

 

First check the shared virtual ethernet adapters you have –

 

netstat -v | grep Speed

 

mkvdev -lnagg ent0 ent4

 

# lsmap -all -net

SVEA   Physloc

—— ——————————————–

ent3   U9117.MMB.101697P-V1-C2-T1

 

SEA                 NO SHARED ETHERNET ADAPTER FOUND

 

Then we need to check what adapters we can use, now in our case we will be using the first 2 adapters from a dual port 1Gb card –

 

# lsdev -type adapter

name             status      description

ent0             Available   2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)

ent1             Available   2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)

 

Then we need to create the Etherchannel device –

 

# mkvdev -lnagg ent0 ent1

ent2 Available

 

This creates the device in standard mode, though you can switch it over to round robin –

 

# chdev -l ent2 -a mode=round_robin

 

Then we can create a SEA “bridge” between the physical Etherchannel device ent2 and the virtual ent3

 

# mkvdev -sea ent2 -vadapter ent3 -default ent3 -defaultid  1

main:  86 Recived SEA events bytes 163

ent9 Available

 

Once that is done, you can set-up initial TCP/IP config (en9 is the interface for the SEA ent9)

 

# mktcpip -hostname <vio-name> -inetaddr <ip-address> -interface en9 -start -netmask <subnet> -gateway <gateway-ip>

 

Now your server ready to go.

 

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

10

Opening Virtual Terminal On Partition VIO-Server2 . . .

 

 

Open in progress

 

Open Completed.

ok

0 > show-devs

000000c95568: /ibm,serial

000000c96690: /chosen

000000c969c0: /packages

000000c96ab8:   /disassembler

000000c9ce90:   /assembler

000000cc76a0:   /dev-tree

000000cc7e60:   /lpevents

000000ccec08:   /fabric-mgr

000000ce51f8:   /deblocker

000000ce6330:   /disk-label

000000ceb528:   /tape-label

000000cec240:   /obp-tftp

000000cfd688:   /ipv4

000000d045e8:   /ipv6

000000d0bec8:   /udp

000000d12d10:   /tcp

000000d1a150:   /ping

000000d21f18:   /bootp

000000d2b580:   /dhcp

000000d37728:   /tftp

000000d41ab0:   /iscsi

000000d49270:   /gscsi

000000d4ede0:     /disk

000000d50c70:     /tape

000000d527d8:   /iptest

000000d582f8:   /prep-boot

000000d58b88:   /fat-files

000000d5af30:   /iso-13346-files

000000d647d8:   /gen-iso-13346-files

000000d6d6a8:   /utilities

000000d9abc8:     /trace

000000da7388:   /net

000000daf358:   /iso-9660-files

000000db07a0:   /boot-mgr

000000dc1960:   /chrp-loader

000000dc1b40:   /pe-loader

000000dc2630:   /elf-loader

000000dc5e68:   /nls-support

000000dc6c60:   /cas

000000dc9790:   /terminal-emulator

000000dc9888:   /dynamic-reconfig

000000ea2e00:   /gui

000000ec5010:     /iscsi

000000ed7888:   /post

000000caf6c8: /options

000000cb1068: /cpus

000000cb6c88:   /PowerPC,POWER7@0

000000cb80b0:   /l2-cache@200a

000000cb84a8:   /l3-cache@310a

000000cb8bf0: /memory@0

000000cc1ed0: /ibm,dynamic-reconfiguration-memory

000000cc25a8: /aliases

000000ce3c18: /openprom

000000dc9e80: /event-sources

000000dcbc80:   /epow-events

000000dcbdf0: /interrupt-controller@0

000000dcd860: /interrupt-controller@800000025000202

000000dd1df0: /interrupt-controller@800000025000205

000000dd6380: /rtas

000000ddfd90: /vdevice

000000de6350:   /vty@30000000

000000de7b38:   /l-lan@3000000c

000000df02b0:   /v-scsi-host@30000020

000000df0ea8:   /vfc-server@30000022

000000df1dc8:   /v-scsi-host@3000002a

000000df29c0:   /vfc-server@3000002c

000000df38e0:   /v-scsi-host@30000034

000000df44d8:   /vfc-server@30000036

000000df53f8:   /v-scsi-host@3000003e

000000df5ff0:   /vfc-server@30000040

000000df6f10:   /v-scsi-host@30000048

000000df7b08:   /vfc-server@3000004a

000000df8a28:   /v-scsi-host@30000052

000000df9620:   /vfc-server@30000054

000000dfa540:   /v-scsi-host@3000005c

000000dfb138:   /vfc-server@3000005e

000000dfc058:   /v-scsi-host@30000066

000000dfcc50:   /vfc-server@30000068

000000e033a0:   /IBM,sp@4000

000000e04310:   /rtc@4001

000000e04c20:   /nvram@4002

000000e04f10:   /gscsi@4004

000000e05808:     /disk

000000e14ba8: /pci@800000020000202

000000e32798:   /fibre-channel@0

000000e47448:     /fp

000000e47fa8:     /disk

000000e49b48:     /tape

000000e4afc8:   /fibre-channel@0,1

000000e5fc78:     /fp

000000e607d8:     /disk

000000e62378:     /tape

000000e21900: /pci@800000020000205

000000e63888:   /ethernet@0

000000e72708:   /ethernet@0,1

000000e81588:   /ethernet@0,2

000000e90408:   /ethernet@0,3

ok

0 > 000000e32798 to active-package  ok

0 > pwd /pci@800000020000202/fibre-channel@0 ok

0 > ” /pci@800000020000202/fibre-channel@0″select-dev bad quoted string ok

0 > show-settings show-settings, unknown word ok

0 >   ok

0 >   ok

0 > ioinfo

 

!!! IOINFO: FOR IBM INTERNAL USE ONLY !!!

This tool gives you information about SCSI,IDE,SATA,SAS,and USB devices attached to the system

 

Select a tool from the following

 

1. SCSIINFO

2. IDEINFO

3. SATAINFO

4. SASINFO

5. USBINFO

6. FCINFO

7. VSCSIINFO

 

q – quit/exit

 

==> 6

 

 

 

FCINFO Main Menu

Select a FC Node from the following list:

#  Location Code                Pathname

—————————————————————

1. U78AB.001.WZSJZK6-P1-C3-T1     /pci@800000020000202/fibre-channel@0

2. U78AB.001.WZSJZK6-P1-C3-T2     /pci@800000020000202/fibre-channel@0,1

 

q – Quit/Exit

 

==> 1

 

FC Node Menu

FC Node String: /pci@800000020000202/fibre-channel@0

FC Node WorldWidePortName: 10000090fa42fb1a

—————————————————————–

1. List Attached FC Devices

2. Select a FC Device

3. Enable/Disable FC Adapter Debug flags

 

q – Quit/Exit

 

==> 2

 

NO FC DEVICES FOUND

 

Hit a key to continue…

 

FC Node Menu

FC Node String: /pci@800000020000202/fibre-channel@0

FC Node WorldWidePortName: 10000090fa42fb1a

—————————————————————–

1. List Attached FC Devices

2. Select a FC Device

3. Enable/Disable FC Adapter Debug flags

 

q – Quit/Exit

 

==> 1

 

NO FC DEVICES FOUND

 

Hit a key to continue…

 

FC Node Menu

FC Node String: /pci@800000020000202/fibre-channel@0

FC Node WorldWidePortName: 10000090fa42fb1a

—————————————————————–

1. List Attached FC Devices

2. Select a FC Device

3. Enable/Disable FC Adapter Debug flags

 

q – Quit/Exit

 

==> q

 

FCINFO Main Menu

Select a FC Node from the following list:

#  Location Code                Pathname

—————————————————————

1. U78AB.001.WZSJZK6-P1-C3-T1     /pci@800000020000202/fibre-channel@0

2. U78AB.001.WZSJZK6-P1-C3-T2     /pci@800000020000202/fibre-channel@0,1

 

q – Quit/Exit

 

==> 2

 

FC Node Menu

FC Node String: /pci@800000020000202/fibre-channel@0,1

FC Node WorldWidePortName: 10000090fa42fb1b

—————————————————————–

1. List Attached FC Devices

2. Select a FC Device

3. Enable/Disable FC Adapter Debug flags

 

q – Quit/Exit

 

==>

Lost connection to the Managed System…

Attempting to reconnect

 

The open failed.

-The session may already be open on another management console

-The server may not be ready to accept connections.

 

Attempts to open the session failed. Please close the terminal and retry the open at a later time.

If the problem persists, Please contact IBM support.

 

 

 

 

VIO1_82_Client3_fcs0

 

VNX5300_SPB0_UNIT2_VIO1_82_Client3_fcs0

 

VNX5300_SPB1_UNIT2_VIO2_82_Client3_fcs0

 

VNX5300_SPA0_UNIT2_VIO1_82_Client3_fcs0

 

VNX5300_SPA1_UNIT2_VIO2_82_Client3_fcs0

 

 

 

VNX5300_SPB0_UNIT2_VIO1_82_Client4_fcs0

 

VNX5300_SPB1_UNIT2_VIO2_82_Client4_fcs0

 

VNX5300_SPA0_UNIT2_VIO1_82_Client4_fcs0

 

VNX5300_SPA1_UNIT2_VIO2_82_Client4_fcs0

 

 

 

# lsdev -c adapter

ent0     Available 03-00 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)

ent1     Available 03-01 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)

ent2     Available 03-02 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)

ent3     Available 03-03 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)

ent4     Available       Virtual I/O Ethernet Adapter (l-lan)

ent5     Available       Virtual I/O Ethernet Adapter (l-lan)

ent6     Available       Shared Ethernet Adapter

fcs0     Available 04-00 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)

fcs1     Available 04-01 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)

pkcs11   Available       PKCS#11 Device

sissas0  Available 00-00 PCIe x4 Planar 3Gb SAS RAID Adapter

sissas1  Available 02-00 PCIe x4 Internal 3Gb SAS RAID Adapter

usbhc0   Available 05-08 USB Host Controller (33103500)

usbhc1   Available 05-09 USB Host Controller (33103500)

usbhc2   Available 05-0a USB Enhanced Host Controller (3310e000)

vfchost0 Available       Virtual FC Server Adapter

vfchost1 Available       Virtual FC Server Adapter

vfchost2 Available       Virtual FC Server Adapter

vfchost3 Available       Virtual FC Server Adapter

vfchost4 Available       Virtual FC Server Adapter

vfchost5 Available       Virtual FC Server Adapter

vfchost6 Available       Virtual FC Server Adapter

vfchost7 Available       Virtual FC Server Adapter

vhost0   Available       Virtual SCSI Server Adapter

vhost1   Available       Virtual SCSI Server Adapter

vhost2   Available       Virtual SCSI Server Adapter

vhost3   Available       Virtual SCSI Server Adapter

vhost4   Available       Virtual SCSI Server Adapter

vhost5   Available       Virtual SCSI Server Adapter

vhost6   Available       Virtual SCSI Server Adapter

vhost7   Available       Virtual SCSI Server Adapter

vsa0     Available       LPAR Virtual Serial Adapter

 

# hostname

nimserver

# lscfg -vpl fcs* | grep Z8

Device Specific.(Z8)……..C050760714500000

Device Specific.(Z8)……..C050760714500002

#

 

 

# hostname

AIXLPAR4-104-112

# lscfg -vpl fcs* | grep Z8

Device Specific.(Z8)……..C050760714500006

Device Specific.(Z8)……..C050760714500004

#

 

hostname

 

 

lscfg -vpl fcs* | grep Z8 | cut -d . -f10 |  sed ‘s/../&:/g;s/:$//’

 

lscfg -vpl fcs* | grep Z8 | cut -d . -f10 |  sed ‘s/../&:/g;s/:$//’;hostname

 

 

C0:50:76:07:14:50:00:00

C0:50:76:07:14:50:00:02

nimserver

#

C0:50:76:07:14:50:00:1E

C0:50:76:07:14:50:00:1C

AIXLPAR10-104-118

 

C0:50:76:07:14:50:00:18

C0:50:76:07:14:50:00:1A

AIXLPAR9-104-117

 

C0:50:76:07:14:50:00:16

C0:50:76:07:14:50:00:14

AIXLPAR8-104-116

#

C0:50:76:07:14:50:00:10

C0:50:76:07:14:50:00:12

AIXLPAR7-104-115

#

C0:50:76:07:14:50:00:0E

C0:50:76:07:14:50:00:0C

AIXLPAR6-104-114

#

C0:50:76:07:14:50:00:08

C0:50:76:07:14:50:00:0A

AIXLPAR5-104-113

#

 

C0:50:76:07:14:50:00:06

C0:50:76:07:14:50:00:04

AIXLPAR4-104-112

#

 

C0:50:76:07:14:50:00:00

C0:50:76:07:14:50:00:02

nimserver

#

 

 

 

lsdev -c adapter

 

lscfg -vpl fcs0

 

lscfg -vpl vfchost1

 

 

 

vfchost1         U8231.E2D.06C83FT-V1-C43  Virtual FC Server Adapter

 

Hardware Location Code……U8231.E2D.06C83FT-V1-C43

 

 

PLATFORM SPECIFIC

 

Name:  vfc-server

Node:  vfc-server@3000002b

Device Type:  fcp

Physical Location: U8231.E2D.06C83FT-V1-C43

# exit

$ vfcmap -vadpater vfchost1 -fcp fcs0

Option flag is not valid.

 

Usage: vfcmap  -vadapter VFCServerAdapter -fcp [FCPName]

 

$

$

 

lsnports

 

 

vfcmap -vadapter vfchost0 -fcp fcs0

vfcmap -vadapter vfchost1 -fcp fcs0

vfcmap -vadapter vfchost2 -fcp fcs0

vfcmap -vadapter vfchost3 -fcp fcs0

vfcmap -vadapter vfchost4 -fcp fcs0

vfcmap -vadapter vfchost5 -fcp fcs0

vfcmap -vadapter vfchost6 -fcp fcs0

vfcmap -vadapter vfchost7 -fcp fcs0

 

 

vfcmap -vadapter vfchost8 -fcp fcs2

vfcmap -vadapter vfchost9 -fcp fcs2

vfcmap -vadapter vfchost10 -fcp fcs2

vfcmap -vadapter vfchost11 -fcp fcs2

vfcmap -vadapter vfchost12 -fcp fcs2

vfcmap -vadapter vfchost13 -fcp fcs2

vfcmap -vadapter vfchost14 -fcp fcs2

vfcmap -vadapter vfchost15 -fcp fcs2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$ cfgdev

 

 

 

# lscfg -vpl ent4

ent4             U8231.E2D.06C83FT-V1-C11-T1  Virtual I/O Ethernet Adapter (l-lan)

 

Network Address………….D26D148F6F0B

Displayable Message………Virtual I/O Ethernet Adapter (l-lan)

Hardware Location Code……U8231.E2D.06C83FT-V1-C11-T1

 

 

PLATFORM SPECIFIC

 

Name:  l-lan

Node:  l-lan@3000000b

Device Type:  network

Physical Location: U8231.E2D.06C83FT-V1-C11-T1

# lscfg -vpl ent5

ent5             U8231.E2D.06C83FT-V1-C12-T1  Virtual I/O Ethernet Adapter (l-lan)

 

Network Address………….D26D148F6F0C

Displayable Message………Virtual I/O Ethernet Adapter (l-lan)

Hardware Location Code……U8231.E2D.06C83FT-V1-C12-T1

 

 

PLATFORM SPECIFIC

 

Name:  l-lan

Node:  l-lan@3000000c

Device Type:  network

Physical Location: U8231.E2D.06C83FT-V1-C12-T1

 

 

#  scp 10.1.50.101:/data03/Unix-Software-Repository/AIX/IBM-ISO/AIX7.1TL02/* .

The authenticity of host ‘10.1.50.101 (10.1.50.101)’ can’t be established.

RSA key fingerprint is f7:9d:58:29:9c:1e:13:44:b3:a7:d5:b4:57:d7:21:c8.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added ‘10.1.50.101’ (RSA) to the list of known hosts.

root@10.1.50.101’s password:

Permission denied, please try again.

root@10.1.50.101’s password:

AIX_7.1_TL02_02_DVD1.iso                                                               100% 3658MB  42.0MB/s   01:27

AIX_7.1_TL02_02_DVD2.iso                                                               100% 2601MB  45.6MB/s   00:57

# exit

$ mkvdev -fbo -vadapter vhost

$ lsmap -all

SVSA            Physloc                                      Client Partition ID

————— ——————————————– ——————

vhost0          U8231.E2D.06C83FT-V1-C31                     0x00000000

 

VTD                   NO VIRTUAL TARGET DEVICE FOUND

 

SVSA            Physloc                                      Client Partition ID

————— ——————————————– ——————

vhost1          U8231.E2D.06C83FT-V1-C41                     0x00000000

 

VTD                   NO VIRTUAL TARGET DEVICE FOUND

 

SVSA            Physloc                                      Client Partition ID

————— ——————————————– ——————

vhost2          U8231.E2D.06C83FT-V1-C51                     0x0000000

VTD                   NO VIRTUAL TARGET DEVICE FOUND

 

SVSA            Physloc                                      Client Partition ID

————— ——————————————– ——————

vhost3          U8231.E2D.06C83FT-V1-C61                     0x00000000

 

VTD                   NO VIRTUAL TARGET DEVICE FOUND

 

SVSA            Physloc                                      Client Partition ID

————— ——————————————– ——————

vhost4          U8231.E2D.06C83FT-V1-C71                     0x00000000

 

VTD                   NO VIRTUAL TARGET DEVICE FOUND

 

SVSA            Physloc                                      Client Partition ID

————— ——————————————– ——————

vhost5          U8231.E2D.06C83FT-V1-C81                     0x00000000

 

VTD                   NO VIRTUAL TARGET DEVICE FOUND

 

SVSA            Physloc                                      Client Partition ID

————— ——————————————– ——————

vhost6          U8231.E2D.06C83FT-V1-C91                     0x00000000

 

VTD                   NO VIRTUAL TARGET DEVICE FOUND

 

SVSA            Physloc                                      Client Partition ID

————— ——————————————– ——————

vhost7          U8231.E2D.06C83FT-V1-C101                    0x00000000

 

VTD                   NO VIRTUAL TARGET DEVICE FOUND

 

$ mkvdev -fbo -vadapter vhost0

vtopt0 Available

$ lsmap -vadapter vhost0

SVSA            Physloc                                      Client Partition ID

————— ——————————————– ——————

vhost0          U8231.E2D.06C83FT-V1-C31                     0x00000000

 

VTD                   vtopt0

Status                Available

LUN                   0x8100000000000000

Backing device

Physloc

Mirrored              N/A

 

$ lsrep

Size(mb) Free(mb) Parent Pool         Parent Size      Parent Free

8158     1899 rootvg                   544768           506880

 

Name                                                  File Size Optical         Access

AIX_7.1_TL02_02_DVD1.iso                                   3658 None            rw

AIX_7.1_TL02_02_DVD2.iso                                   2601 None            rw

$ loadopt -vtd vtopt0 -disk AIX_7.1_TL02_02_DVD1.iso

$ lsmap -vadapter vhost0

SVSA            Physloc                                      Client Partition ID

————— ——————————————– ——————

vhost0          U8231.E2D.06C83FT-V1-C31                     0x00000000

 

VTD                   vtopt0

Status                Available

LUN                   0x8100000000000000

Backing device        /var/vio/VMLibrary/AIX_7.1_TL02_02_DVD1.iso

Physloc

Mirrored              N/A

 

$ lspv

NAME             PVID                                 VG               STATUS

hdisk0           00f8c83f2effbda1                     rootvg           active

hdisk1           none                                 None

$ mkvdev -vdev hdisk1 -vadapter vhost0 -dev rootvgos

rootvgos Available

Please reboot the client partition to see the newly added disk.

 

$ lsmap -vadapter vhost0

SVSA            Physloc       SVSA            Physloc                                      Client Partition ID

————— ——————————————– ——————

vhost0          U8231.E2D.06C83FT-V1-C31                     0x00000003

 

VTD                   rootvgos

Status                Available

LUN                   0x8200000000000000

Backing device        hdisk1

Physloc               U78AB.001.WZSJZK6-P1-C18-T1-LFF0100-L0

Mirrored              false

 

VTD                   vtopt0

Status                Available

LUN                   0x8100000000000000

Backing device        /var/vio/VMLibrary/AIX_7.1_TL02_02_DVD1.iso

Physloc

Mirrored              N/A

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

1 = SMS Menu                          5 = Default Boot List

8 = Open Firmware Prompt              6 = Stored Boot List

Memory      Keyboard     Network     SCSI     Speaker  ok

0 >   ok

0 > ininfo ininfo, unknown word ok

0 > IOINFO

!!! IOINFO: FOR IBM INTERNAL USE ONLY !!!

This tool gives you information about SCSI,IDE,SATA,SAS,and USB devices attached to t

 

q – Quit/Exit

==> 1

FC Node Menu

FC Node String: /pci@800000020000202/fibre-channel@0

FC Node WorldWidePortName: 10000090fa42f3cc

—————————————————————–

1. List Attached FC Devices

2. Select a FC Device

3. Enable/Disable FC Adapter Debug flags

q – Quit/Exit

==> 2

NO FC DEVICES FOUND

Hit a key to continue…

FC Node Menu

FC Node String: /pci@800000020000202/fibre-channel@0

FC Node WorldWidePortName: 10000090fa42f3cc

 

 

FCINFO Main Menu

Select a FC Node from the following list:

#  Location Code                Pathname

—————————————————————

1. U78AB.001.WZSJZJ5-P1-C3-T1     /pci@800000020000202/fibre-channel@0

2. U78AB.001.WZSJZJ5-P1-C3-T2     /pci@800000020000202/fibre-channel@0,1

q – Quit/Exit

==> 2

Cannot Init Link.

FC Node Menu

FC Node String: /pci@800000020000202/fibre-channel@0,1

FC Node WorldWidePortName: 10000090fa42f3cd

—————————————————————–

1. List Attached FC Devices

2. Select a FC Device

3. Enable/Disable FC Adapter Debug flags

q – Quit/Exit

==>  2

 

 

 

 

 

 

 

How to Rescan new LUN’s added in Linux, HP-UX, Aix, Solaris ?

HP-UX

1. Rescan the devices:

ioscan -fnC <disk|tape>

2. Generate device files:

 insf -e

3. Verify the new devices:

 ioscan -funC <disk|tape>

AIX

1. Rescan the devices ):

 cfgmgr -vl fcsx

Where x is FC adapter number

2. Verify the new devices:

 lsdev -Cc <disk|tape>

Linux

The rescan in Linux is HBA-specific.

For QLogic:

echo scsi-qlascan > /proc/scsi/qla<model#>/<adapter instance>

For Emulex:

 sh force_lpfc_scan.sh lpfc<adapter-instance>

For each identified device, run the following:

echo scsi add-single-device <host> <channel> <ID> <lun> >   /proc/scsi/scsi

Solaris

1. Determine the FC channels:

 cfgadm -al

2. Force rescan :

 cfgadm -o force_update -c configure cx

Where x is the FC channel number

3. Force rescan at HBA port level:

 luxadm -e forcelip /dev/fc/fpx

4. Force rescan on all FC devices:

 cfgadm -al -o show_FCP_dev

5. Install device files:

 devfsadm

6. Display all Qlogic HBA ports

 luxadm -e port

7. Display HBA port information

 luxadm -v display <WWPN>

8. Display HBA port information

 luxadm -e dump_map

Notes If one specific SANclient is missing a drive, please verify that your zoning is correct. Please also make sure the host initiator and VTL™s target ports are showing online via the Fibre Channel switch. (Check HBA link light and check the cable.)

 

How to Mount NFS From Linux To AIX

Linux :

  1. SSH to the Linux box
  2. Add an entry in the /etc/hosts to add the AIX server IP and hostname, if it is not already there
  3. Specify the file system to be exported in the /etc/exports file
    /data X.X.X.X
  4. Start the nfs service, if it has not already been started
    [root@linux ~]# service nfs status
    rpc.mountd (pid 3170) is running…
    nfsd (pid 3167 3166 3165 3164 3163 3162 3161 3160) is running…
    rpc.rquotad (pid 3145) is running…
    [root@linux ~]# service nfs restart
    Shutting down NFS mountd: [ OK ]
    Shutting down NFS daemon: [ OK ]
    Shutting down NFS quotas: [ OK ]
    Shutting down NFS services: [ OK ]
    Starting NFS services: [ OK ]
    Starting NFS quotas: [ OK ]
    Starting NFS daemon: [ OK ]
    Starting NFS mountd: [ OK ]
  5. Run the exportfs command to export the file system
    # exportfs -a

AIX :

  1. Add an entry in the /etc/hosts for the Linux box, if it is not already there.
  2. Run the showmount command to check if AIX can see the exported file system
    # showmount -e X.X.X.X 
  3. Create a directory to mount the NFS
    # mkdir /data 
  4. Run the mount command to mount the exported NFS
    # mount X.X.X.X:/data /data 
  5. If not able to mount and the error message is “vmount: operation not permitted“, run the command below. Detailed explanation here.
    #  nfso -p -o nfs_use_reserved_ports=1
  6. Try the mount command again.
  7. If successful, try to access the directory.

Aix Booting Process

boot_process_1
Loading the boot image of AIX
  •  After POST, the firmware (System Read Only Storage) detects the 1st bootable device stored in the bootlist. (here it is hdisk0)
  • then the bootstrap code (software ROS) i.e. 1st 512 bytes of the hard disk loads to RAM.
  • Bootstrap code locates the Boot Logical Volume (BLV = hd5) from the harddisk
  • BLV contains AIX kernel, rc.boot Script, Reduced ODM and Boot commands.
  • Then BLV in the RAM uncompresses and Kernel releases from it.
  • Then AIX Kernel gets control.
  • AIX Kernel creates a RAM File System (Rootvg not activated now).
  • kernel starts init process from the BLV.
  • init executes rc.boot script from the BLV in the RAM.
  • Init with rc.boot 1 configures base devices.

rc.boot 1 in detail

  • init process from RAMFS executes rc.boot 1 (if any error LED=c06)
  • restbase command copies ODM from BLV to RAMFS.(success LED=510, error LED=548)
  • cfgmgr -f calls Config_rules ( which are phase=1) and activates all base devices.
  • run command bootinfo -b to check last boot device ( success LED=511).

Then

  • rc.boot 2 activates rootvg from hard disk.

rc.boot 2 in detail

  • rc.boot 2 (LED 551)
  • ipl_varyon to activate rootvg ( success LED= 517, error LED=552,554,556).
  • run command fsck -f /dev/hd4 to check whether “/” unmounted uncleanely in the last shutdown ( error LED=555).
  • mount /dev/hd4 (/) to RAMFS (error LED=557 due to corrupted jfslog..)
  •  fsck -f /dev/hd2  i.e.  “/usr” ( error LED=518).
  • mount /dev/hd2 in RAMFS.
  • fsck -f /dev/hd9var  i.e. check “/var
  • mount /var
  • copycore command checks whether dump occured. then copy dump from primary dump device paging space (/dev/hd6) to /var/adm/ras/.
  • unmount /var
  • swapon /dev/hd6  i.e. activate primary paging space.

Now the condition is /dev/hd4 is mounted on / in the RAMFS;
cfgmgr -f configured all base devices . so configuration data has been written to ODM of RAMFS.

  • mergedev is called and copy /dev from RAMFS to disk.
  • copy customized ODM from RAMFS to hard disk(at this stage both ODM from hd5 and hd4 are sync now)
  • mount /var.
  • Boot messages copy to file on the hard disk ( /var/adm/ras/bootlog)    alog -t boot -o to view bootlog

Now / , /usr and /var are mounted in rootvg on the hard disk. Then

  • Kernel removes RAMFS
  • init process start from / in the rootvg

Here completes rc.boot 2, Now the condition is kernel removed RAMFS and accessing rootvg filesystems from hard disk. init from BLV replaced by init from hard disk

  • in rc.boot 3, init process /etc/inittab file and remaining devices are configured.

rc.boot 3 in detail

  •  /etc/init starts and reads /etc/inittab ( LED=553)
  •  runs /sbin/rc.boot 3 
  • fsck -f /dev/hd3 i.e. check /tmp.
  • mount /tmp
  • sysncvg rootvg &;    i.e. run syncvg in background and report stale PPs.
  • cfgmgr -P2  i.e. run cfgmgr in phase 2 in normal startup. (cfgmgr -P3 in service mode)
  • All remaining devices are configured now.
  • cfgcon configures console ( LED= c31 select console, c32 lft, c33 tty, c34 file on disk). If CDE mentioned in /etc/inittab we will get graphical console.
  • savebase calls to sync ODM from BLV with / FS (i.e. /etc/objrepos).
  • syncd daemon started. All data from cache memory to disk saves in every 60 seconds.
  • starts errdaemon for error logging.
  • LED display turned OFF.
  • rm /etc/nologin i.e. if the file is not removed, then login is not possible.
  • If any device are in missed state, (in Cudv chgstatus=3) display it.
  • Display “system initialization completed

Then execute next line from /etc/inittab


DETAILED
=======

Boot process of AIX in detail

I. The boot process in AIX

As a system administrator you should have a general understanding of the boot process. This knowledge is useful to solve problems that can prevent a system from booting properly. These problems can be both software or hardware.We also recommend that you be familiar with the hardware configuration of your system.

Booting involves the following steps:

The initial step in booting a system is named Power On Self Test (POST). Its purpose is to verify that basic hardware is in functional state.The memory, keyboard, communication and audio devices are also initialized. You can see an image for each of these devices displayed on the screen. It is during this step that you can press a function key to choose a different boot list. The LED values displayed during this phase are model specific. Both hardware and software problems can prevent the system from booting.

System Read Only Storage (ROS) is specific to each system type. It is necessary for AIX 5L Version 5.3 to boot, but it does not build the data structures required for booting. It will locate and load bootstrap code. System ROS contains generic boot information and is operating system independent. Software ROS (also named bootstrap) forms an IPL control block which is compatible with AIX 5L Version 5.3, takes control and builds AIX 5L
specific boot information. A special file system located in memory and named RAMFS file system is created. Software ROS then locates, loads, and turns control over to AIX 5L Boot Logical Volume (BLV). Software ROS is AIX 5L information created based on machine type and is responsible for completing machine preparation to enable it to start AIX 5L kernel. A complete list of files that are part of the BLV can be obtained from directory /usr/lib/boot.

The most important components are the following:

– The AIX 5L kernel
– Boot commands called during the boot process such as bootinfo, cfgmgr
– A reduced version of the ODM. Many devices need to be configured hd4 (/) made available, so their corresponding methods have to be stored in the BLV. These devices are marked as base in PdDv.
– The rc.boot script

Note: Old systems based on MCI architecture execute an additional step before this, the so called Built In Self Test (BIST). This step is no longer required for systems based on PCI architecture.

The AIX 5L kernel is loaded and takes control. The system will display 0299 on the LED panel. All previous codes are hardware-related. The kernel will complete the boot process by configuring devices and starting the init process. LED codes displayed during this stage will be generic AIX 5L codes. So far, the system has tested the hardware, found a BLV, created the RAMFS, and started the init process from the BLV. The rootvg has not yet been activated. From now on the rc.boot script will be called three times, each timebeing passed a different parameter.

1.Boot phase 1

During this phase, the following steps are taken:

The init process started from RAMFS executes the boot script rc.boot

If init process fails for some reason, code c06 is shown on LED display. At this stage, the restbase command is called to copy a partial image of ODM from the BLV into the RAMFS. If this operation is successful LED display shows 510, otherwise LED code 548 is shown.

After this, the cfgmgr -f command reads the Config_Rules class from the reduced ODM. In this class, devices with the attribute phase=1 are considered base devices. Base devices are all devices that are necessary to access rootvg.
For example, if the rootvg is located on a hard disk all devices starting from motherboard up to the disk will have to be initialized.The corresponding methods are called so that rootvg can be activated in the nextboot phase 2. At the end of boot phase 1, the bootinfo -b command is called to determine the last boot device. At this stage, the LED shows 511.

2.Boot phase 2

In this phase , the rc.boot script is passed to the parameter 2. During this phase the following steps are taken.

a) The rootvg volume group is varied on with the special version of the varyonvg command ipl_varyon. If this command is successful the system displays 517. otherwise one of the following LED will appear 552,554,556 and the boot process is halted.

b) Root file system hd4 is checked using the fsck -f command. This will verify only whether the filesystem was unmounted cleanly before the last shutdown. If this command fails, the system will display code 555.

c) The root file system ( /dev/hd4 ) is mounted on a temporary mount point /mnt in RAMFS. If this fails 557 will appear in LED.

d) The /usr file system is verified using fsck -f command and then mounted. the copycore command checks if a dump occured. if it did, it is copied from default dump devices, /dev/hd6 to the default copy directory /var/adm/ras. After this /var is unmounted.

e) The primary pagingspace from rootvg, /dev/hd6 will be activated.

f) The mergedev process is called and /dev files from RAMFS are copied to disk.

g) All customized ODM files from the RAMFS are copied to disk.Both ODM versions from hd4 and hd5 are synchronized.

h) Finaly, the root file system from rootvg (disk) is mounted over the root file system from the RAMFS. The mount points for the root filesystems become available. now the /var and /usr file systems from the rootvg are mounted again on their ordinary mount points. There is no console available at this stage; so all boot messages will be copied to alog. The alog command maintains and manages logs.

3.Boot Phase 3

After phase 2 is completed rootvg is activated and the following steps are taken,

a. /etc/init process is started. It reads /etc/inittab file and calls rc.boot with argument 3

b. The /tmp filesystem is mounted.

c. The rootvg is synchronized by calling the synchvg command and launching it as background process. As a result all stale partitions from rootvg are updated.At this stage LED code 553 is shown.

d. At this stage the cfgmgr command is called.if the system is booted in normal mode the cfgmgr command is called with option -p2; in service mode, option -p3. The cfgmgr command reads the Config_rules files from ODM and calls all methods corresponding to either phase 2 or 3. All other devices that are not base devices are configured at this time.

e. Next the console is configured by calling the cfgcon command. After the configuration of the console , boot messages are send to the console if no STDOUT redirection is made. However all missed messages can be found in /var/adm/ras/conslog. LED codes that can be displayed at this time are :

c31 = console not yet configured.
c32 = console is an LFT terminal.
c33 = console is a TTY.
c34 = console is a file on the disk.

f. finally the synchronization of the ODM in the BLV with the ODM from the / (root) filesyatem is done by the savebase command.

g. The syncd daemon and errdaemon are started.

h. LED display is turned off.

i. if the /etc/nologin exists, it will be removed.

j. If there are devices marked as missing in CuDv a message is displayed on the console.

i. the message system initialization completed is send to the console. the execution of the rc.boot has completed. init process will continue processing the next command from /etc/inittab.

II. system initialization

During system startup, after the root file system has been mounted in the pre-initialization process, the following sequence of events occurs:

1. The init command is run as the last step of the startup process.
2. The init command attempts to read the /etc/inittab file.
3. If the /etc/inittab file exists, the init command attempts to locate an initdefauult entry in the /etc/inittab file.

a. If the initdefault entry exists, the init command uses the specified runlevel as the initial system run level.
b. If the initdefault entry does not exist, the init command requests that the user enter a run level from the system console (/dev/console).
c. If the user enters an S, s, M, or m run level, the init command enters the maintenance run level. These are the only runlevels that do not require a properly formatted /etc/inittab file.

4. If the /etc/inittab file does not exist, the init command places the system in the maintenance run level by default.
5. The init command rereads the /etc/inittab file every 60 seconds. If the /etc/inittab file has changed since the last time the init command read it, the new commands in the /etc/inittab file are executed.

III. The /etc/inittab file

The /etc/inittab file controls the initialization process.

The /etc/inittab file supplies the script to the init command’s role as a general process dispatcher. The process that constitutes the majority of the init command’s process dispatching activities is the /etc/getty line process, which initiates individual terminal lines. Other processes typically dispatched by the init command are daemons and the shell.

The /etc/inittab file is composed of entries that are position-dependent and have the following format,

/etc/inittab format = Identifier:RunLevel:Action:Command

Each entry is delimited by a newline character. A backslash (\) preceding a new line character indicated the continuation of an entry. There are no limits (other than maximum entry size) on the number of entries in the /etc/inittab file.

The maximum entry size is 1024 characters.

The entry fields are :

Identifier
A one to fourteen character field that uniquely identifies an object.

RunLevel
The run level at which this entry can be processed. The run level has the following attributes:

-Run levels effectively correspond to a configuration of processes in the system.

-Each process started by the init command is assigned one or more run levels in which it can exist.

-Run levels are represented by the numbers 0 through 9.

Eg: if the system is in run level 1, only those entries with a 1 in the run-level field are started.

-When you request the init command to change run levels, all processes without a matching entry in the run-level field for the target run level receive a warning signal (SIGTERM). There is a 20-second grace period before processes are forcibly terminated by the kill signal (SIGKILL).

-The run-level field can define multiple run levels for a process by selecting more than one run level in any combination from 0 through 9. If no run level is specified, the process is assumed to be valid at all run levels.

-There are four other values that appear in the run-level field, even though they are not true run levels: a, b, c and h. Entries that have these characters in the run level field are processed only when the telinit command requests them to be run (regardless of the current run level of the system). They differ from run levels in that the init command can never enter run level a, b, c or h. Also, a request for the execution of any of these processes does not change the current run level. Furthermore, a process started by an a, b, or c command is not killed when the init command changes levels. They are only killed if their line in the /etc/inittab file is marked off in the action field, their line is deleted entirely from /etc/inittab, or the init command goes into single-user mode.

Action
It tells the init command how to treat the process specified in the process field. The following actions are recognized by the init command:

respawn If the process does not exist, start the process. Do not wait for its termination (continue scanning the /etc/inittab file). Restart the process when it dies. If the process exists, do nothing and continue scanning the /etc/inittab file.

wait When the init command enters the run level that matches the entry’s run level, start the process and wait for its termination. All subsequent reads of the /etc/inittab file, while the init command is in the same run level, will cause the init command to ignore this entry.

once When the init command enters a run level that matches the entry’s run level, start the process, and do not wait for termination. When it dies, do not restart the process. When the system enters a new run level, and the process is still running from a previous run level change, the program will not be restarted.

boot Process the entry only during system boot, which is when the init command reads the /etc/inittab file during system startup. Start the process, do not wait for its termination, and when it dies, do not restart the process. In order for the instruction to be meaningful, the run level should be the default or it must match the init command’s run level at boot time. This action is useful for an initialization function following a hardware reboot of the system.

bootwait Process the entry the first time that the init command goes from single-user to multi-user state after the system is booted. Start the process, wait for its termination, and when it dies, do not restart the process. If the initdefault is 2, run the process right after boot.

powerfail Execute the process associated with this entry only when the init command receives a power fail signal ( SIGPWR).

powerwait Execute the process associated with this entry only when the init command receives a power fail signal (SIGPWR), and wait until it terminates before continuing to process the /etc/inittab file.

off If the process associated with this entry is currently running, send the warning signal (SIGTERM), and wait 20 seconds before terminating the process with the kill signal (SIGKILL). If the process is not running, ignore this entry.

ondemand Functionally identical to respawn, except this action applies to the a, b, or c values, not to run levels.

initdefault An entry with this action is only scanned when the init command is initially invoked. The init command uses this entry, if it exists, to determine which run level to enter initially. It does this by taking the highest run level specified in the run-level field and using that as its initial state. If the run level field is empty, this is interpreted as 0123456789. therefore, the init command enters run level 9. Additionally, if the init command does not find an initdefault entry in the /etc/inittab file, it requests an initial run level from the user at boot time.

sysinit Entries of this type are executed before the init command tries to access the console before login. It is expected that this entry will only be used to initialize devices on which the init command might try to ask the run level question. These entries are executed and waited for before continuing.

Command
A shell command to execute. The entire command field is prefixed with exec and passed to a forked sh as sh -c exec command. Any legal sh command syntax can appear in this field. Comments can be inserted with the # comment syntax.

The getty command writes over the output of any commands that appear before it it in the /etc/inittab file. To record the output of these commands to the boot log, pipe their output to the alog -tboot command. The stdin, stdout, and stderr file descriptors may not be available while the init command is processing inittab entries. Any entries writing to stdout or stderr may not work predictably unless they redirect their output to a file or to /dev/console.
The following commands are the only supported methods for modifying the records in the /etc/inittab file.

lsitab Lists records in the /etc/inittab file.
mkitab Adds records to the /etc/inittab file.
chitab Changes records in the /etc/inittab file.
rmitab Removes records from the /etc/inittab file.

Eg:

If you want to add a record on the /etc/inittab file to run the find command on the run level 2 and start it again once it has finished:

1. Run the ps command and display only those processes that contain the word find:
# ps -ef | grep find
root 19750 13964 0 10:47:23 pts/0 0:00 grep find
#
2. Add a record named xcmd on the /etc/inittab using the mkitab command:
# mkitab “xcmd:2:respawn:find / -type f > /dev/null 2>&1”
3. Show the new record with the lsitab command:
# lsitab xcmd
xcmd:2:respawn:find / -type f > /dev/null 2>&1
#
4. Display the processes:
# ps -ef | grep find
root 25462 1 6 10:56:58 – 0:00 find / -type f
root 28002 13964 0 10:57:00 pts/0 0:00 grep find
#
5. Cancel the find command process:
# kill 25462
6. Display the processes:
# ps -ef | grep find
root 23538 13964 0 10:58:24 pts/0 0:00 grep find
root 28966 1 4 10:58:21 – 0:00 find / -type f
#

Since the action field is configured as respawn, a new process (28966 in this example) is started each time its predecessor finishes. The process will continue re-spawning, unless you change the action field,

Eg:

1. Change the action field on the record xcmd from respawn to once:
# chitab “xcmd:2:once:find / -type f > /dev/null 2>&1”
2. Display the processes:
# ps -ef | grep find
root 20378 13964 0 11:07:20 pts/0 0:00 grep find
root 28970 1 4 11:05:46 – 0:03 find / -type f
3. Cancel the find command process:
# kill 28970
4. Display the processes:
# ps -ef | grep find
root 28972 13964 0 11:07:33 pts/0 0:00 grep find
#

To delete this record from the /etc/inittab file, you use the rmitab command.

Eg:

# rmitab xcmd
# lsitab xcmd
#

Order of the /etc/inittab entries

The base process entries in the /etc/inittab file is ordered as follows:

1. initdefault
2. sysinit
3. Powerfailure Detection (powerfail)
4. Multiuser check (rc)
5. /etc/firstboot (fbcheck)
6. System Resource Controller (srcmstr)
7. Start TCP/IP daemons (rctcpip)
8. Start NFS daemons (rcnfs)
9. cron
10.pb cleanup (piobe)
11.getty for the console (cons)

The System Resource Controller (SRC) has to be started near the begining of the etc/inittab file since the SRC daemon is needed to start other processes. Since NFS requires TCP/IP daemons to run correctly, TCP/IP daemons are started ahead of the NFS daemons. The entries in the /etc/inittab file are ordered according to dependencies, meaning that if a process (process2) requires that another process (process1) be present for it to operate normally, then an entry for process1 comes before an entry for process2 in the /etc/inittab file.

IBM VIOS CDROM – DVDROM (Virtual Optical Device)

CDROM – DVDROM (Virtual Optical Device):

Any optical device equipped on the Virtual I/O Server partition (either CD-ROM, DVD-ROM, or DVD-RAM) can be virtualized and assigned at any logical partition, one at a time, using the same virtual SCSI adapter provided to virtual disks. Virtual optical devices can be used to install the operating system and, if DVD-RAM, to make backups.

Creating Virtual Optical Device:

1. On VIO Server create SCSI Server Adapter. This adapter is set to Any client partition can connect.
This dedicated adapter for the virtual optical device helps to make things easier from a system management point of view.

2. On client LPAR: create SCSI client adapter, mapping the id with the server adapter (above)

3. cfgdev (on vio) will bring up a new vhostX
cfgmgr (on client) will bring up a new vscsiX

4. On VIO Server create optical device:

-for using physical CDs and DVDs, create an optical device
$ mkvdev -vdev cd0 -vadapter vhost4 -dev vcd
vcd Available

$ lsdev -virtual

vcd             Available  Virtual Target Device – Optical Media

for file backed (iso images) optical device
$ mkvdev -fbo -vadapter vhost1
vtopt0 Available

$lsdev -virtual

vtopt0           Available   Virtual Target Device – File-backed Optical

(copy the iso image to /var/vio/VMLibrary, ‘lsrep’ will show media repository content)
(lssp -> mkrep -sp rootvg -size 4G    <–this will create media repository)
(creating an iso image: mkvopt -name <filename>.iso -dev cd0 -ro)

load the image into the vtopt0 device: loadopt -vtd vtopt0 -disk dvd.1022A4_OBETA_710.iso
(lsmap -all will show it)

or you can check it:
padmin@vios1 : /home/padmin # lsvopt
VTD             Media                                   Size(mb)
vtopt0          AIX_7100-00-01_DVD_1_of_2_102010.iso        3206

if later another disk is needed, you can unload an image with this command: unloadopt -vtd vtopt0
if we don’t need the image anymore at all we can remove it from the repository: rmvopt -name AIX_7100-00-01.iso

5. On client LPAR cfgmgr and create CDROM filesystem
In the AIX client partition run the cfgmgr command to assign the virtual optical drive to it. If the drive is already assigned to another partition you will get an error message and you will have to release the drive from the partition holding it.

create mount point: mkdir /cdrom

create cdrom filesystem: smitty fs -> add cdrom filesystems:
device name: cd0
mount point: /cdrom
mount automatically

mount the filesystem: mount -v cdrfs -r /dev/cd0 /cdrom