Saturday, May 9, 2020

Facing issue while Restoring /image.data from mksysb image in aix?

Facing issue while Restoring /image.data from mksysb image in aix?


Facing issue while Restoring /image.data from mksysb image in aix

testnim# alt_disk_mksysb -m testserver.mksysb -d hdisk3
Restoring /image.data from mksysb image.
checking disk sizes
0505-111 alt_disk_install: There is not enough disk space on target
disks specified.
Total disk space required is 67072 megabytes and target
disk space is only 34175 megabytes.
testnim#

(or)

testnim# alt_disk_mksysb -m testserver.mksysb -d hdisk3
Restoring /image.data from mksysb image.
checking disk sizes
creating cloned rootvg volume group and associated logical volumes.
Creating logical volume alt_hd5
0516-404 allocp: This system cannot fulfill the allocatioin request.
          There are not enough free partitions or not enough physical volumes to keep restrictness and satisfy allocation requests.
          The command should be retried with different allocaiton characteristics.
0516-822 mklv: unable to create logical volume.
0505-115 alt_disk_install: mklv failed to create logical volume hd5
cleaning up.
testnim#

 Solution:

We will get the above error only if the rootvg was mirrored priror to taking the mksysb.

As long as your rootvg was mirrored you can break the mirror and retry the installation. You need to edit image.data so that you can use it to restore to a single disk.

we need to manually break the mirror in the mksysb with a custom image.data file.

#mkdir /export/idata
#cd /export/idata
#restore -xqvf /<path>/<mksysb_file_name> ./image.data
#vi /export/idata/image.data
 for each lv_data stanza.
   -Change the COPIES=2 to COPIES=1
   -Note the size of the LPs=XX value
   -change the PP=YY to match the Ps=XX value


Define a customized image_data resource:

#smitty nim_mkres
>>Resource Type: image_data
>>Resource Name: [nomirror_idata]
>>Resource Type: image_data
>>Server to Resource: [master]
>>Location of Resource: [/export/idata/image.data]

From the steps which you have you shoud go back and use the following migration command.

#nimadm -s <spot> -l <lpp_source> -i <image_data> -j <volume group for cache> -Y -T <old_mksysb_resource> -O <new_mksysb_resource_file_pathname> -N <new_mksysb_resource>


How to put log rotate in aix?


How to put log rotate in aix?


To rotate the file you should append 'rotate size <desired size> files <desired number of files> part to the above entry similar to the following entry in your /etc/syslog.conf

*.info;mark.none      /var/adm/syslog rotate size 32m files 8 compress

once done that please "refresh -s syslogd"

Output similar to below.

ls -l /var/adm/syslog*
-rw-rw-r--      1 adm adm     19718076 08 Apr 09.34      /var/adm/syslog
-rw-rw-r--      1 adm adm     2728076 07 Apr 09.34        /var/adm/syslog.0.Z
-rw-rw-r--      1 adm adm     2608076 07 Apr 09.34        /var/adm/syslog.1.Z
-rw-rw-r--      1 adm adm     2688076 07 Apr 09.34        /var/adm/syslog.2.Z
-rw-rw-r--      1 adm adm     2528076 06 Apr 09.34        /var/adm/syslog.3.Z
-rw-rw-r--      1 adm adm     2378076 06 Apr 09.34        /var/adm/syslog.4.Z
-rw-rw-r--      1 adm adm     2898076 06 Apr 09.34        /var/adm/syslog.5.Z
-rw-rw-r--      1 adm adm     2678076 06 Apr 09.34        /var/adm/syslog.6.Z
-rw-rw-r--      1 adm adm     2888076 06 Apr 09.34        /var/adm/syslog.7.Z



Wednesday, May 6, 2020

What is NPIV in aix?

What is NPIV in aix?


NPIV  (N_Port ID Virtualization)

The virtual fiber channel adapters support the use of N-Port ID Virtualization (NPIV)

With NPIV, the VIO's role is fundamentally different, The VIOs serving NPIV is a pass through, providing a Fiber channel protocol (FCP) connection from the client to the SAN.

The Virutal Fiber channel adapter capability allows client partitions to access SAN (Storage Area Network) devices using NPIV.  Each partition is identified by a unique WWPN.


Requirements:
============

Not all Fibre channel adapters and SAN Switches support NPIV. 

NPIV capable switches present the virtual WWPN to other SAN switches and devices as if they represent physical FC adapter endpoints.

VIO 2.1.0.10 and AIX oslevel 6.1.2 or 5.3.9
P6 processes based servers.
HMC 7.3.4

Commands
=========

To list the available NPIV capable ports -> #lsnports
To map a virutal FC server adapter to a port of physical hba  -> # vfcmap -vadapter vfchostX -fcp fcs0
To unmap a virutal FC server adapter -> # vfcmap -vadapter vfchostX - fcp
To identify the wwpn ->  # lscfg -vl fcsX
To identify the wwpn using hmc - >  # lshwres -m frame_name -r virtualio --rsubtype fc --level lpar
To View the fibre channel mapping -> # lsmap -all -npiv
To see the virtual FC adapters details  -> # lsdev -vpd|grep vfchost
To see the specific info about vfchostX -> # lsmap -npiv -vadapter vfchostX