Category Archives: Aix

File System shows 100% occupied but du tells different and still has Unused Spaces.

We have faced an issue as below mentioned – found /oracle mount-point showing 100% as Used. But getting different size values for folders under /oracle mount-point, when we executed du -gs .

bash-4.4# df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 4.00 1.39 66% 20686 6% /
/dev/hd2 4.00 1.02 75% 45679 16% /usr
/dev/hd9var 2.00 1.01 50% 16318 7% /var
/dev/hd3 2.00 1.83 9% 407 1% /tmp
/dev/hd1 1.00 0.16 85% 6124 12% /home
/dev/hd11admin 0.25 0.25 1% 5 1% /admin
/proc – – – – – /proc
/dev/hd10opt 0.50 0.07 87% 12979 44% /opt
/dev/livedump 0.25 0.25 1% 4 1% /var/adm/ras/livedump
/dev/fslv00 198.00 0.01 100% 440205 16% /oracle

bash-4.4# cd /oracle/
bash-4.4# du -gs *
0.00 AutoDeployment
5.45 Oracle
0.03 Patch
7.54 data01
11.67 fmw_12.1.3.0.0_wls
0.01 jboss
0.20 jdk
0.00 lost+found
0.92 wls1221

You may notice 100 % utilization for /oracle mount-point on the “df -g” output , but with “du -gs ” We found the files did not occupy the entire space.

It may be because of open files in the file-system. These open files hold space on the file-system to complete there execution, once the write operation is completed. 

To overcome, from this issue, We need to follow below two steps:-

  1. We need to find all such processes still running but using deleted files, in result – /oracle mount-point is showing 100% as Used.

bash-4.4# fuser -dV /oracle/
/oracle/:
inode=670047 size=5242722 fd=389 5570776
inode=1165305 size=20278 fd=1 8061106
inode=1165313 size=182335565824 fd=1 8716486
inode=1165305 size=20278 fd=1 9044152
inode=1165313 size=182335565824 fd=1 9371672
inode=1165305 size=20278 fd=1 11141354
inode=669981 size=5514335 fd=1 13041898


2. We have to kill all such processes as found in above command.

bash-4.4# kill -9 5570776
bash-4.4# kill -9 8061106
bash-4.4# kill -9 8716486
bash-4.4# kill -9 9044152
bash-4.4# kill -9 9371672
bash-4.4# kill -9 11141354
bash-4.4# kill -9 13041898

bash-4.4# fuser -dV /oracle/
/oracle/:

bash-4.4# df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 4.00 1.39 66% 20686 6% /
/dev/hd2 4.00 1.02 75% 45679 16% /usr
/dev/hd9var 2.00 1.01 50% 16318 7% /var
/dev/hd3 2.00 1.83 9% 407 1% /tmp
/dev/hd1 1.00 0.16 85% 6124 12% /home
/dev/hd11admin 0.25 0.25 1% 5 1% /admin
/proc – – – – – /proc
/dev/hd10opt 0.50 0.07 87% 12979 44% /opt
/dev/livedump 0.25 0.25 1% 4 1% /var/adm/ras/livedump
/dev/fslv00 198.00 170.01 15% 440205 1% /oracle
bash-4.4# cd /oracle/
bash-4.4# du -gs *
0.00 AutoDeployment
5.45 Oracle
0.03 Patch
7.54 data01
11.67 fmw_12.1.3.0.0_wls
0.01 jboss
0.20 jdk
0.00 lost+found
0.92 wls1221

How to Find Server Public IP Address in Linux Terminal

root@test:/var/log/nginx# wget -qO – icanhazip.com
www.xxx.yyy.zzz
root@test:/var/log/nginx# wget -qO- http://ipecho.net/plain | xargs echo
www.xxx.yyy.zzz
root@test:/var/log/nginx# wget -qO – icanhazip.com
www.xxx.yyy.zzz
root@test:/var/log/nginx# curl icanhazip.com
www.xxx.yyy.zzz
root@test:/var/log/nginx#

sed to play with data or parsing your text

To select all the lines starting from STARTING_PATTERN up to  blank line ^$ and then delete those lines.

# sed ‘/STARTING_PATTERN/,/^$/d’ filename

To edit files in place, use -i option.

# sed -i ‘/STARTING_PATTER/,/^$/d’ filename

Insert multiple lines into a file after specified pattern.

# sed ‘/cdef/r add.txt’ input.txt

# sed ‘/cdef/r add.txt’ input.txt

input.txt:
abcd
accd
cdef
line
web
add.txt:
line1
line2
line3
line4
Output :
abcd
accd
cdef
line1
line2
line3
line4
line
web

If you want to apply the changes in input.txt file. Then, use -i with sed.

# sed -i ‘/cdef/r add.txt’ input.txt

If you want to use a regex as an expression you have to use the -E tag with sed.

# sed -E ‘/RegexPattern/r add.txt’ input.txt

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.