blog'o thnet

To content | To menu | To search

Sunday 1 May 2011

Switching From RDAC To MPIO For DSXX00 SAN Array

Here is a simple procedure switching from a RDAC/fcparray management mode to a MPIO multipath mode for SAN disks presented from an IBM DSXX00 array.

Verification of the current monopath configuration:

# manage_disk_drivers
1: DS4100: currently RDAC; supported: RDAC/fcparray, MPIO
2: DS4300: currently RDAC; supported: RDAC/fcparray, MPIO
3: DS4500: currently RDAC; supported: RDAC/fcparray, MPIO
4: DS4700/DS4200: currently RDAC; supported: RDAC/fcparray, MPIO
5: DS4800: currently RDAC; supported: RDAC/fcparray, MPIO

Listing of the disks from the array:

# fget_config -vA
---dar0---

User array name = 'CUSTOMERSOFT'
dac0 ACTIVE dac5 ACTIVE

Disk     DAC   LUN Logical Drive
utm            127
hdisk7   dac5    6 beastie1_oracle
hdisk14  dac5   13 beastie2_datavg
hdisk15  dac0   14 beastie3_datavg
hdisk2   dac0    1 beastie3_rootvg
hdisk3   dac0    2 beastie4_rootvg
hdisk4   dac5    3 beastie5_rootvg
hdisk5   dac5    4 beastie2_rootvg
hdisk6   dac0    5 bakup
hdisk8   dac0    7 customer1
hdisk9   dac0    8 customer3
hdisk10  dac5    9 customer6
hdisk11  dac0   10 customer14
hdisk12  dac5   11 beastie2_db2
hdisk13  dac0   12 beastie3_scheduler
hdisk16  dac0   15 customer9
hdisk17  dac0   16 customer8

Listing of the disks as seen from the operating system:

# lsdev -Cc disk | grep DS
hdisk2  Available 00-08-02 1814     DS4700 Disk Array Device
hdisk3  Available 00-08-02 1814     DS4700 Disk Array Device
hdisk4  Available 02-00-02 1814     DS4700 Disk Array Device
hdisk5  Available 02-00-02 1814     DS4700 Disk Array Device
hdisk6  Available 00-08-02 1814     DS4700 Disk Array Device
hdisk7  Available 02-00-02 1814     DS4700 Disk Array Device
hdisk8  Available 00-08-02 1814     DS4700 Disk Array Device
hdisk9  Available 00-08-02 1814     DS4700 Disk Array Device
hdisk10 Available 02-00-02 1814     DS4700 Disk Array Device
hdisk11 Available 00-08-02 1814     DS4700 Disk Array Device
hdisk12 Available 02-00-02 1814     DS4700 Disk Array Device
hdisk13 Available 00-08-02 1814     DS4700 Disk Array Device
hdisk14 Available 02-00-02 1814     DS4700 Disk Array Device
hdisk15 Available 00-08-02 1814     DS4700 Disk Array Device
hdisk16 Available 00-08-02 1814     DS4700 Disk Array Device
hdisk17 Available 00-08-02 1814     DS4700 Disk Array Device

Switch to a multipath management for the SAN volumes presented from the DS4700/DS4200 arrays:

# manage_disk_drivers -c 4
DS4700/DS4200 currently RDAC/fcparray
Change to alternate driver? [Y/N] Y
DS4700/DS4200 now managed by MPIO

It is necessary to perform a bosboot before rebooting the system in
order to incorporate this change into the boot image.

In order to change to the new driver, either a reboot or a full
unconfigure and reconfigure of all devices of the type changed
must be performed.

Reboot the system:

# bosboot –a
bosboot: Boot image is 39636 512 byte blocks.

# shutdown –Fr
[...]

Verification of the new multipath configuration:

# manage_disk_drivers
1: DS4100: currently RDAC; supported: RDAC/fcparray, MPIO
2: DS4300: currently RDAC; supported: RDAC/fcparray, MPIO
3: DS4500: currently RDAC; supported: RDAC/fcparray, MPIO
4: DS4700/DS4200: currently MPIO; supported: RDAC/fcparray, MPIO
5: DS4800: currently RDAC; supported: RDAC/fcparray, MPIO

Listing of the disks from the array:

# mpio_get_config -vA
Frame id 0:
    Storage Subsystem worldwide name: 60ab80016253400009786efca
    Controller count: 2
    Partition count: 1
    Partition 0:
    Storage Subsystem Name = 'CUSTOMERSOFT'
        hdisk      LUN #   Ownership          User Label
        hdisk0         1   A (preferred)      beastie3_rootvg
        hdisk1         2   A (preferred)      beastie4_rootvg
        hdisk2         3   B (preferred)      beastie5_rootvg
        hdisk3         4   B (preferred)      beastie2_rootvg
        hdisk4         5   A (preferred)      bakup
        hdisk5         6   B (preferred)      beastie1_oracle
        hdisk6        16   A (preferred)      customer8
        hdisk7         7   A (preferred)      customer1
        hdisk8         8   A (preferred)      customer3
        hdisk9         9   B (preferred)      customer6
        hdisk10       10   A (preferred)      customer14
        hdisk11       11   B (preferred)      beastie2_db2
        hdisk12       12   A (preferred)      beastie3_scheduler
        hdisk13       13   B (preferred)      beastie2_datavg
        hdisk14       14   A (preferred)      beastie3_datavg
        hdisk15       15   A (preferred)      customer9

Listing of the disks as seen from the operating system:

# lsdev -Cc disk | grep DS
hdisk0  Available 06-08-02 MPIO Other DS4K Array Disk
hdisk1  Available 06-08-02 MPIO Other DS4K Array Disk
hdisk2  Available 06-08-02 MPIO Other DS4K Array Disk
hdisk3  Available 06-08-02 MPIO Other DS4K Array Disk
hdisk4  Available 06-08-02 MPIO Other DS4K Array Disk
hdisk5  Available 06-08-02 MPIO Other DS4K Array Disk
hdisk6  Available 06-08-02 MPIO Other DS4K Array Disk
hdisk7  Available 06-08-02 MPIO Other DS4K Array Disk
hdisk8  Available 06-08-02 MPIO Other DS4K Array Disk
hdisk9  Available 06-08-02 MPIO Other DS4K Array Disk
hdisk10 Available 06-08-02 MPIO Other DS4K Array Disk
hdisk11 Available 06-08-02 MPIO Other DS4K Array Disk
hdisk12 Available 06-08-02 MPIO Other DS4K Array Disk
hdisk13 Available 06-08-02 MPIO Other DS4K Array Disk
hdisk14 Available 06-08-02 MPIO Other DS4K Array Disk
hdisk15 Available 06-08-02 MPIO Other DS4K Array Disk
hdisk16 Available 06-08-02 MPIO Other DS4K Array Disk

That's it.

Monday 9 July 2007

Installing a VIOS from the HMC Using a backupios Archive File

Once the corresponding partition has been defined on the managed system, log on to the HMC using an account having hmcsuperadmin authority. hscroot is such an account. Then, to install the VIOS partition using a previously generated backupios tar file, issue a command similar to the following:

$ installios \
   -s Server-9113-550-SN65E3R4F \
   -S uu.xx.yy.zz \
   -p vios01 \
   -r installation \
   -i vv.xx.yy.zz \
   -d nfssrv:/path/to/backupios/archive \
   -m 00:11:22:aa:bb:cc \
   -g ww.xx.yy.zz \
   -P 100 \
   -D full

Where:

  • -s: Managed system
  • -p: Partition name
  • -r: Partition profile
  • -d: Path to installation image(s) (/dev/cdrom or srv:/path/to/backup)
  • -i: Client IP address
  • -S: Client IP subnet mask
  • -g: Client gateway
  • -m: Client MAC address
  • -P: Port speed (optional, 100 is the default (10, 100, or 1000))
  • -D: Port duplex (optional, full is the default (full, or half))

Note that he profile named installation is very similar to the profile named normal: it just doesn't include all the extra-stuff necessary for our final pSeries configuration, i.e. SAN HBA, virtual LAN, etc. This is necessary not to install on SAN disks, or try to use a virtual Ethernet adapter during VIOS installation process. After rebooting on the fresh installed VIOS, connect to the console and check for:

  1. Clean-up the content of the /etc/hosts file, in particular be sure that the FQDN and short name of the NIM server are mentioned properly.
  2. Configure the IP address(es) on the physical interface(s), and the corresponding hostname--and don't forget that they will be modify latter in order to create SEA device!
  3. Recreate the mirror in order to use the two first disks (with exact mapping), and be sure to have two copies the lg_dumplv logical volume (not really sure about this one, but it doesn't hurt anyway...).
  4. Update the content of the /etc/resolv.conf file.
  5. Be able to resolve hostnames using other network centralized mechanisms:
    # cat << EOF >> /etc/netsvc.conf
    hosts = local, nis, bind
    EOF
    
  6. Don't forget to erase the installation NIM configuration found under /etc/niminfo and set it as a new NIM client for the current NIM server:
    # mv /etc/niminfo /etc/niminfo.orig
    # niminit -a name=vios01 \
     -a master=nim.example.com \
     -a pif_name=en0 \ # May be `en5' if the SEA was already configured.
     -a connect=nimsh
    
  7. Change the padmin account password.

Last, here are some welcome tuning configuration steps:

  • Update the VIOS installation software with the external bundle pack, if available.
  • Reboot the VIOS using the profile named normal (whi include all the targeted hardware definitions).
  • There are a few parameters to change on the fibre channel adapter and fscsi interface on top of it. The first one is dyntrk, which allow fabric reconfiguration without having to reboot the Virtual I/O Server. The second one is fs_err_recov, which will prevent the Virtual I/O Server to retry sending an operation on a disk if the disk become unavailable. We change it because the Virtual I/O Client will take care of accessing the disk using MPxIO and thus, will redirect the I/O operations to the second Virtual I/O Server. The last parameter we change is the one that controls the number of commands to queue to the physical adapter. A reboot is necessary in order to change these parameters:
    $ chdev -dev fscsi0 -attr dyntrk=yes -perm
    fscsi0 changed
    $ chdev -dev fscsi0 -attr fc_err_recov=fast_fail -perm
    fscsi0 changed
    $ chdev -dev fcs0 -attr num_cmd_elems=2048 -perm
    fcs0 changed
    
  • We can safely change the software transmit queue size and descriptor queue size with the following commands. Since the adapter is in use, we change the settings in ODM only, and the new configuration will be use at next reboot:
    $ chdev -dev ent0 -attr tx_que_sz=16384 -perm
    ent0 changed
    $ chdev -dev ent1 -attr tx_que_sz=16384 -perm
    ent1 changed
    $ chdev -dev ent0 -attr txdesc_que_sz=1024 -perm
    ent0 changed
    $ chdev -dev ent1 -attr txdesc_que_sz=1024 -perm
    ent1 changed
    
  • And be sure to force the speed and mode of the desired Ethernet interfaces:
    $ chdev -dev ent0 -attr media_speed=100_Full_Duplex -perm
    ent0 changed
    $ chdev -dev ent1 -attr media_speed=100_Full_Duplex -perm
    ent1 changed
    
  • Now, we need to create the Shared Ethernet Adapter to be able to access the external network and bind the virtual adapter to the real one:
    $ chdev -dev en0 -attr state=detach
    en0 changed
    $ chdev -dev en1 -attr state=detach
    en1 changed
    $ mkvdev -sea ent0 -vadapter ent3 -default ent3 -defaultid 1
    ent5 Available
    en5
    et5
    $ mkvdev -sea ent1 -vadapter ent4 -default ent4 -defaultid 3
    ent6 Available
    en6
    et6
    $ mktcpip -hostname vios01 \
       -inetaddr vv.xx.yy.zz \
       -interface en5 \
       -netmask uu.xx.yy.zz \
       -gateway ww.xx.yy.zz \
       -nsrvaddr tt.xx.yy.zz \
       -nsrvdomain example.com \
       -start
    
  • Don't forget to install the MPxIO driver provided by EMC on their FTP web site:
    # cd /mnt/EMC.Symmetrix
    # TERM=vt220 smitty installp
    # lslpp -al | grep 'EMC.Symmetrix' | sort -u
                                 5.2.0.3  COMMITTED  EMC Symmetrix Fibre Channel
      EMC.Symmetrix.aix.rte      5.2.0.3  COMMITTED  EMC Symmetrix AIX Support
      EMC.Symmetrix.fcp.MPIO.rte
    
  • Assuming that the clock is given by the default gateway network device, we can set and configure the NTP client this way:
    # ntpdate ww.xx.yy.zz
    # cp /etc/ntp.conf /etc/ntp.conf.orig
    # diff -c /etc/ntp.conf.orig /etc/ntp.conf
    *** /etc/ntp.conf.orig  Fri Sep 30 18:05:17 2005
    --- /etc/ntp.conf       Fri Sep 30 18:05:43 2005
    ***************
    *** 36,41 ****
      #
      #   Broadcast client, no authentication.
      #
    ! broadcastclient
      driftfile /etc/ntp.drift
      tracefile /etc/ntp.trace
    --- 36,42 ----
      #
      #   Broadcast client, no authentication.
      #
    ! #broadcastclient
    ! server ww.xx.yy.zz
      driftfile /etc/ntp.drift
      tracefile /etc/ntp.trace
    #
    # chrctcp -S -a xntpd
    

Side note: This entry was originally contributed by Patrice Lachance, which first wrote about this subject.

Thursday 21 June 2007

Altering LVM Configuration When a Disk is Not in ODM Anymore

If you remove a disk from the system using rmdev -dl hdiskX without having previously reduced the volume group to remove the disk from LVM, and thus have not updated properly the on-disk format information (called VGDA), you get a discrepancy between the ODM and the LVM configurations. Here is how to solve the issue (without any warranty though!).

What are the volume group informations:

# lsvg -p rootvg                
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            2157        1019        174..00..00..413..432
0516-304 : Unable to find device id 00ce4b6a01292201 in the Device
       Configuration Database.
00ce4b6a01292201  missing           2157        1019        174..71..00..342..432
# lspv
hdisk0          00ce4b6ade6da849                    rootvg          active
hdisk2          00ce4b6a01b09b83                    drakevg         active
hdisk3          00ce4b6afd175206                    drakevg         active
# lsdev -Cc disk
hdisk0 Available  Virtual SCSI Disk Drive
hdisk2 Available  Virtual SCSI Disk Drive
hdisk3 Available  Virtual SCSI Disk Drive

As we can notice, the disk is still in the LVM configuration but doesn't show up in the devices. To solve this issue, we need to cheat the ODM in order to be able to use LVM commands to change the LVM configuration, stored on the volume group disks. The idea is to reinsert a disk in the ODM configuration, remove the disk from LVM and then remove it from ODM. Here is how we do it. First, let's make a copy of the ODM files that we will change:

# cd /etc/objrepos/
# cp CuAt CuAt.before_cheat
# cp CuDv CuDv.before_cheat
# cp CuPath CuPath.before_cheat

Now, we will extract the hdisk0's definition from ODM and add it back as hdisk1's definition:

# odmget -q "name=hdisk0" CuAt
CuAt:
       name = "hdisk0"
       attribute = "unique_id"
       value = "3520200946033223609SYMMETRIX03EMCfcp05VDASD03AIXvscsi"
       type = "R"
       generic = ""
       rep = "n"
       nls_index = 0
CuAt:
       name = "hdisk0"
       attribute = "pvid"
       value = "00ce4b6ade6da8490000000000000000"
       type = "R"
       generic = "D"
       rep = "s"
       nls_index = 11
# odmget -q "name=hdisk0" CuDv
CuDv:
       name = "hdisk0"
       status = 1
       chgstatus = 2
       ddins = "scsidisk"
       location = ""
       parent = "vscsi0"
       connwhere = "810000000000"
       PdDvLn = "disk/vscsi/vdisk"
# odmget -q "name=hdisk0" CuPath
CuPath:
       name = "hdisk0"
       parent = "vscsi0"
       connection = "810000000000"
       alias = ""
       path_status = 1
       path_id = 0

Basically, we need to insert new entries in the three classes CuAt, CuDv and CuPath with hdisk0 changed to hdisk1. A few others attributes need to be changed. The most important one is the PVID, located in CuAt. We will use the value reported as missing by lsvg -p rootvg. Attribute unique_id also need to be changed. You can just change a few characters in the existing string, it just need to be unique in the system. The other attributes to change are connwhere in CuDv and connection in CuPath. Their value represent the LUN ID of the disk. Again, this value is not relevant, it just have to be unique. We can check the current LUN defined by running lscfg on all the disks defined:

# lscfg -vl hdisk*
 hdisk0           U9117.570.65E4B6A-V6-C2-T1-L810000000000  Virtual SCSI Disk Drive
 hdisk2           U9117.570.65E4B6A-V6-C3-T1-L810000000000  Virtual SCSI Disk Drive
 hdisk3           U9117.570.65E4B6A-V6-C3-T1-L820000000000  Virtual SCSI Disk Drive

LUN 81 is used on controller C2 and LUNs 81 and 82 on C3. Let's choose 85, which for sure will not collide with other devices. The following commands will generate the text files that will be used to cheat the ODM, according to what was just explained:

# mkdir /tmp/cheat
# cd /tmp/cheat
# odmget -q "name=hdisk0" CuAt | sed -e 's/hdisk0/hdisk1/g' \
   -e 's/00ce4b6ade6da849/00ce4b6a01292201/' \
   -e 's/609SYMMETRIX/719SYMMETRIX/' > hdisk1.CuAt
# odmget -q "name=hdisk0" CuDv | sed -e 's/hdisk0/hdisk1/' \
   -e 's/810000000000/850000000000/' > hdisk1.CuDv
# odmget -q "name=hdisk0" CuPath | sed -e 's/hdisk0/hdisk1/' \
   -e 's/810000000000/850000000000/' > hdisk1.CuPAth

Let's look at the generated files:

# cat hdisk1.CuAt
CuAt:
       name = "hdisk1"
       attribute = "unique_id"
       value = "3520200946033223719SYMMETRIX03EMCfcp05VDASD03AIXvscsi"
       type = "R"
       generic = ""
       rep = "n"
       nls_index = 0
CuAt:
       name = "hdisk1"
       attribute = "pvid"
       value = "00ce4b6a012922010000000000000000"
       type = "R"
       generic = "D"
       rep = "s"
       nls_index = 11
# cat hdisk1.CuDv
CuDv:
       name = "hdisk1"
       status = 1
       chgstatus = 2
       ddins = "scsidisk"
       location = ""
       parent = "vscsi0"
       connwhere = "850000000000"
       PdDvLn = "disk/vscsi/vdisk"
# cat hdisk1.CuPath
CuPath:
       name = "hdisk1"
       parent = "vscsi0"
       connection = "850000000000"
       alias = ""
       path_status = 1
       path_id = 0

So, we are ready to insert the data in the ODM:

# odmadd hdisk1.CuAt
# odmadd hdisk1.CuDv
# odmadd hdisk1.CuPath
# lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            2157        1019        174..00..00..413..432
hdisk1            missing           2157        1019        174..71..00..342..432

The disk is now back in ODM! Now, to remove the disk from the VGDA, we use the reducevg command:

# reducevg rootvg hdisk1
0516-016 ldeletepv: Cannot delete physical volume with allocated
       partitions. Use either migratepv to move the partitions or
       reducevg with the -d option to delete the partitions.
0516-884 reducevg: Unable to remove physical volume hdisk1.

We will use the -d flag to remove the physical partitions associated to each logical volumes and located hdisk1. A few lines have been remove to simplify listing...

# reducevg -d rootvg hdisk1
0516-914 rmlv: Warning, all data belonging to logical volume
       lv01 on physical volume hdisk1 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)?
y
0516-304 putlvodm: Unable to find device id 00ce4b6a012922010000000000000000 in the
       Device Configuration Database.
0516-896 reducevg: Warning, cannot remove physical volume hdisk1 from
       Device Configuration Database.
# lsvg -l rootvg
rootvg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
hd5                 boot       2     2     1    closed/syncd  N/A
hd6                 paging     256   256   1    open/syncd    N/A
hd8                 jfs2log    1     1     1    open/syncd    N/A
hd4                 jfs2       7     7     1    open/syncd    /
hd2                 jfs2       384   384   1    open/syncd    /usr
hd9var              jfs2       64    64    1    open/syncd    /var
hd3                 jfs2       128   128   1    open/syncd    /tmp
hd1                 jfs2       2     2     1    open/syncd    /home
hd10opt             jfs2       32    32    1    open/syncd    /opt
fslv04              jfs2       256   256   1    open/syncd    /usr/sys/inst.images
loglv01             jfslog     1     1     1    closed/syncd  N/A
lv01                jfs        5     5     1    closed/syncd  /mkcd/cd_images
# lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            2157        1019        174..00..00..413..432

The disk has been deleted from the VGDA. What about ODM?

# lsdev -Cc disk
hdisk0 Available  Virtual SCSI Disk Drive
hdisk1 Available  Virtual SCSI Disk Drive
hdisk2 Available  Virtual SCSI Disk Drive
hdisk3 Available  Virtual SCSI Disk Drive
# rmdev -dl hdisk1
Method error (/etc/methods/ucfgdevice):
       0514-043 Error getting or assigning a minor number.

We probably forgot to cheat one ODM class... Never mind: let's remove the cheat we added to ODM and see what appends:

# odmdelete -o CuAt -q "name=hdisk1"
2 objects deleted
# lspv
hdisk0          00ce4b6ade6da849                    rootvg          active
hdisk2          00ce4b6a01b09b83                    drakevg         active
hdisk1          none                                None            
hdisk3          00ce4b6afd175206                    drakevg         active
# rmdev -dl hdisk1
Method error (/etc/methods/ucfgdevice):
       0514-043 Error getting or assigning a minor number.
# odmdelete -o CuDv -q "name=hdisk1"
1 objects deleted
# lspv
hdisk0          00ce4b6ade6da849                    rootvg          active
hdisk2          00ce4b6a01b09b83                    drakevg         active
hdisk3          00ce4b6afd175206                    drakevg         active
# lspath
Enabled hdisk0 vscsi0
Enabled hdisk2 vscsi0
Enabled hdisk2 vscsi1
Enabled hdisk3 vscsi1
Enabled hdisk3 vscsi0
Unknown hdisk1 vscsi0
# odmdelete -o CuPath -q "name=hdisk1"
1 objects deleted
# lspath
Enabled hdisk0 vscsi0
Enabled hdisk2 vscsi0
Enabled hdisk2 vscsi1
Enabled hdisk3 vscsi1
Enabled hdisk3 vscsi0

That's it! Use with care.

Side note: This entry was originally contributed by Patrice Lachance, which first wrote about this subject.

Thursday 24 May 2007

Upcoming IBM AIX 6 features vs. Sun Solaris 10 and OpenSolaris

I can say I am impressed by both the upcoming POWER6 processor and the new AIX 6 release preview . They both are innovative, and come with a large set of new or updated features. For the purpose of this entry, I will concentrate on a little side-by-side comparison between the features announced for AIX, and those available in Solaris.

  1. The Workload Partitions (WPAR) on AIX seems to be very similar to the Containers, or Zones, which is an Virtualization feature found on Solaris.
  2. Live Application Mobility on AIX, which will make possible to move WPAR without end-user disruption, is not available as-is in Solaris. You currently can attach and detach a halted zone, not a running zone. This is due to the fact that Containers is primarily intended to be a Utilization feature, not a virtualization approach. It can be mentioned that an upcoming Solaris equivalent may be the hypervisor Xen support, although not an exact match to WPAR.
  3. Role Based Access Control, Trusted AIX, Security Expert LDAP integration, and Secure by Default on AIX are all already present via the Security features and Sun Java Enterprise System Components found on Solaris.
  4. The Encrypting file system on AIX (using JFS2) does not have an equivalent, yet. Watch carefully the work currently being done on the Cryptographic Framework from OpenSolaris, particularly the ZFS on disk encryption support project.
  5. The Graphical Installation on AIX already has a counterpart on Solaris. More, there exists an active OpenSolaris project code-name Caiman, Solaris Install Revisited which is a completely new installation infrastructure for Solaris with a simplified web graphical and text user interfaces, and Live CD/DVD integration.
  6. The general Continuous availability features on AIX are interesting, and based on IBM longstanding experience with mainframe technology. Solaris currently has a pretty great list of Availability features. Not to mention the impressive RAS features provided by the recently announced SPARC Enterprise Servers build on top of the SPARC64 VI processor. The Dynamic tracing capability advertised by IBM (probevue) seems very interesting. We will see how much this enhanced feature will differ from the Observability feature known as DTrace on Solaris. Please refer to the ongoing discussion about DTrace on AIX on the dtrace-discuss forum on opensolaris.org.
  7. POWER6 processor exploitation using AIX 6. It may be noted that processor specific features--or technology--exploitation are currently available using Solaris, with a wide range of SPARC-based and x64/x86-based systems, up to the upcoming Niagara 2 Processor, and the very awaited ROCK successor.
  8. Last, the Binary compatibility program for AIX. Solaris has a similar and rather complete compatibility program known as the Solaris Binary Application Guarantee Program, which covers both binary and source code compatibility.

Although this comparison is more an entry point for comparing the two biggest players in the UNIX world these days than a complete description of each side, don't forget to take into account the following remaining two points:

  • All the features are currently free of charge on Sun Solaris. Even the upcoming features which will be backported or incorporated in future Solaris Updates or new releases. This is the Support and Services which are charged, according to your needs. On AIX, nothing is freely available, and some advanced features will be available only through a separately offered licensed program product.
  • Although some specific features are not yet available in Solaris, most of the aforementioned ones are currently provided by Solaris 10 from the GA release, in January 2005. Please consult the What’s New page for detailed features availability on the Solaris OS. AIX 6, along with the POWER6 processor specific features, will be available in late 2007.

Last, all of these news from IBM are very interesting, and features such as WPAR, Live Application Mobility, and probevue are particularly exciting. So, wait and see!

Update #1 (2007-05-24): Please consult this interesting blog entry from Jim Laurent on the same subject.

Update #2 (2008-10-16): I encourage you to read Joerg Moellenkamp entries on UNIX virtualization technologies, and IBM´s Workload Partition.

Wednesday 2 May 2007

What is the Size of Memory DIMMs on AIX5L

Well, here is a quick one-liner to get the available memory on an AIX system, with an detailed listing of each size of each memory DIMM on currently installed banks (provided in MB):

# lscfg -vp | egrep 'Memory DIMM|Size'
     Memory DIMM:
       Size........................2048
     Memory DIMM:
       Size........................2048
     Memory DIMM:
       Size........................2048
     Memory DIMM:
       Size........................2048
     Memory DIMM:
       Size........................2048
     Memory DIMM:
       Size........................2048
     Memory DIMM:
       Size........................2048
     Memory DIMM:
       Size........................2048

Friday 23 February 2007

EtherChannel and NIB on IBM AIX

Recently, while adding availability features to some of our AIX DLPARs (Dynamic Logical PARtitions), i went through this very interesting (and well written) reading which explain why and how to use, deploy and configure properly some of the very nice network features on the AIX operating system: EtherChannel and Network Interface Backup. In short, EtherChannel represent a network port aggregation technology that allow multiple Ethernet adapters to create a single pseudo-Ethernet device. In its second form, known as Network Interface Backup, it protects against network-SPOF by providing failure detection and failover mechanism.

Tuesday 21 November 2006

How to Add a New "ctmag" Boot Script on AIX 5L (Control-M Agent v6)

Launch the Control-M agent at run-level #2:

# cat << EOF > /local/etc/init.d/ctmag
#!/usr/bin/env sh
########################################################################
# name: {K|S}ctmag
# purpose: script that will start or stop the Control-M agent processes.
########################################################################

ctmag_user="ctmag620"
#ctmag_home=`getent passwd ${ctmag_user} | awk -F\: '{print $6}'`
ctmag_home=`ypcat passwd | awk -F\: '$1 ~/'"${ctmag_user}"'/ {print $6}'`
ctmag_opts="-u ${ctmag_user} -p ALL"
rc=0

case "$1" in
start)
  ${ctmag_home}/ctm/scripts/start-ag ${ctmag_opts}
  ;;
stop)
  ${ctmag_home}/ctm/scripts/shut-ag ${ctmag_opts}
  ;;
* )
  echo "Usage: `basename $0` {start|stop}"
  rc=1
  ;;
esac

exit ${rc}
EOF
#
# chmod 744 /local/etc/init.d/ctmag
# ln /local/etc/init.d/ctmag /local/etc/rc2.d/Sctmag
# ln /local/etc/init.d/ctmag /local/etc/rcS.d/Kctmag
# ln /local/etc/init.d/ctmag /local/etc/rcshutdown.d/Kctmag

Start the new boot script:

# /local/etc/init.d/ctmag start
Control-M/Agent Listener started. pid: 237696
Control-M/Agent Tracker started. pid: 442610

Control-M/Agent started successfully.

Sunday 4 June 2006

Precompiled PHP RPMs and IBM IHS Web Server on AIX

Some developers wanted to use the IBM provided PHP packages on our AIX pSeries servers to use with the IHS web server. So, we installed the corresponding RPMs from the AIX Toolbox for Linux Applications CD.

But quickly, the following error messages show up when loading the PHP module:

Cannot load /opt/freeware/apache/libexec/libphp4.so into server:
rtld: 0712-001 Symbol ap_child_terminate was referenced from module
/opt/freeware/apache/libexec/libphp4.so(), but a runtime definition of the symbol
was not found.
rtld: 0712-001 Symbol ap_signal was referenced from module
/opt/freeware/apache/libexec/libphp4.so
(), but a runtime definition of the symbol was not found.
rtld: 0712-001 Symbol ap_hard_timeout was referenced from module
/opt/freeware/apache/libexec/libphp4.so(), but a runtime definition of the symbol
was not found.
rtld: 0712-001 Symbol ap_reset_timeout was referenced from module
/opt/freeware/apache/libexec/libphp4.so(), but a runtime definition of the symbol
was not found.
rtld: 0712-001 Symbol ap_table_get was referenced from module
/opt/freeware/apache/libexec/libphp4.so(), but a runtime definition of the symbol
was not found.
rtld: 0712-001 Symbol ap_pstrdup was referenced from module
/opt/freeware/apache/libexec/libphp4.so
(), but a runtime definition of the symbol was not found.
rtld: 0712-001 Symbol ap_table_add was referenced from module
/opt/freeware/apache/libexec/libphp4.so(), but a runtime definition of the symbol
was not found.
Additional errors occurred but are not reported.

However, we can see that:

  1. The dependencies (dynamic linked libraries) are all resolved:
    # ldd /opt/freeware/apache/libexec/libphp4.so
    /opt/freeware/apache/libexec/libphp4.so needs:
             /usr/lib/libc.a(shr.o)
             /usr/lib/libdl.a(shr.o)
             /usr/lib/libbind.a(shr.o)
             /usr/lib/libcrypt.a(shr.o)
             /usr/lib/libz.a(libz.so.1)
             /unix
       
    
  2. The needed symbols are not found anyway:
    # nm /opt/freeware/apache/libexec/libphp4.so | grep ap_hard_timeout
    .ap_hard_timeout     T      843164
    .ap_hard_timeout     t      843164          40
    ap_hard_timeout      U           -
    ap_hard_timeout      d      247100           4
       
    
    The U means Undefined symbol in this case.

In fact, the system calls which begin with ap_ are generally Apache specific. In fact, here is what we can found on a FreeBSD system with the 2.2 release of the Apache web server installed:

# find /usr/local -print | xargs grep ap_allow_options
/usr/local/include/apache22/http_core.h:AP_DECLARE(int)
ap_allow_options(request_rec *r);
Binary file /usr/local/libexec/apache22/mod_include.so matches
Binary file /usr/local/libexec/apache22/mod_autoindex.so matches
Binary file /usr/local/libexec/apache22/mod_cgi.so matches
Binary file /usr/local/libexec/apache22/mod_negotiation.so matches Binary file
/usr/local/libexec/apache22/mod_rewrite.so matches
/usr/local/libexec/apache22/httpd.exp:ap_allow_options
Binary file /usr/local/sbin/httpd matches
#
# nm /usr/local/sbin/httpd | grep -i ap_allow_options
0000000000429c50 T ap_allow_options

So, it seems that the RPMs provided for the PHP support is compiled for Apache exclusively (since the function prototypes are declared in a header file provided by the core Apache distribution), which seems very reasonable at a second though.

Ended to compile it by hand; which isn't finally too bad for the last PHP5 version.

Monday 30 January 2006

About Installing Manual Pages Under AIX 5L

History

Installing manual pages under an OS seems trivial at first, but may be problematic, especially when using the 5.X series of AIX.

In fact, there is two reasons for this:

  1. First, IBM change the corresponding filesets name and number at each revision, sometime less (for example a new AIX distribution CDROM labeled AIX 5L - Version 5.3 - 5765-G03 - ML 5300-03, 10/2006 - LCD4-7463 - LCD4-7489-02 is very different from one labeled AIX 5L - Version 5.3 - 5765-G03 - ML 5300-03, 10/2006 - LCD4-7463-02 - LCD4-7489-02);
  2. Secondly, IBM is going to push all kind of documentation through their InfoCenter product line, a web based interface using Eclipse (also accessible on the IBM web site).

Installing manual pages under AIX 5.3ML3

Installing the manual pages is finally very simple: get the first and the third installation's CDs for AIX 5.3.ML3, and install the following filesets:

infocenter.man.EN_US.commands
infocenter.man.EN_US.files
infocenter.man.EN_US.libs

Eventually, don't forget to (re)create the windex database that is used by whatis(1) and the man(1) -f and -k options:

# catman -w

External reference links

Wednesday 9 November 2005

Complete Step-by-Step Guide to Create, Install and Configure a Fully Fonctional DLPAR

Build the DLPAR on the Hardware Management Console

Log in to the HMC using the Java WSM (Web-based System Manager) client. Then, follow the illustrated guide:

  1. Set the logical name of the partition:
    screenshot #01
  2. Because a load manager is not needed, say so to the creation wizard:
    screenshot #02
  3. Provide a name for the default profile:
    screenshot #03
  4. Time to set the memory allocation sizes:
    screenshot #04
  5. Select the kind of logical partition, which is shared in this case:
    screenshot #05
  6. Choose the desired entitlement capacity settings,...
    screenshot #06a
    ... the shared mode and the use of virtual CPU (or not):
    screenshot #06b
  7. Select the I/O unit(s) and its(their) attribution(s) from the available hardware on the p550:
    screenshot #07
  8. Don't choose I/O pools (its purpose is for Mainframe installation only).
  9. Answer that virtual I/O cards are required and create two Ethernet I/O modules on the two local virtual networks port's ID, as for this one:
    screenshot #09a
    Do the same thing for a SCSI I/O module, using the same port's ID for the local and remote card (on the Virtual I/O Server):
    screenshot #09b
    Be sure to set them to required since the virtual SCSI adapter will host the boot disk and update the number of virtual cards slots, if necessary:
    screenshot #09c
  10. The use of a power management partition is not needed here.
  11. Last, select the optional settings for the profil, e.g. activate the surveillance of the connections:
    screenshot #11

Important note:Don't forget to add a new virtual SCSI I/O module (of server type) on the VIOS in order to connect to the just created VIOC. If you made this modification dynamically on the running VIOS, please report the changes back to the corresponding profile or you will be in big trouble at the next VIOS reboot!

Manage and allocate the Virtual I/O Server resources

The new DLPAR will use one sort of VIOS resource: storage device(s).

Case #1: reuse an already existing virtual adapter

If we want to reuse the virtual adapter provided to the DLPAR, we need to clean things up a little. So, delete the corresponding virtual adapter and its virtual devices attached:

$ lsmap -vadapter vhost3
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost3          U9113.550.65E3A0C-V3-C8                      0x00000006

VTD                   vhdbromonts00
LUN                   0x8100000000000000
Backing device        hdbromonts00
Physloc                

VTD                   vhdbromonts01
LUN                   0x8200000000000000
Backing device        hdbromonts01
Physloc
$
$ rmdev -dev vhost3 -recursive
vhdbromonts00 deleted
vhdbromonts01 deleted
vhost3 deleted

Verify that the virtual adapter doesn't exists anymore:

$ lsmap -vadapter vhost3
Device "vhost3" is not a Server Virtual SCSI Adapter (SVSA).

If necessary, remove the virtual devices: in this case the virtual devices are some logical volumes but they may be some real storage devices, as with SAN disks. For example:

# rmlv hdbromonts00
Warning, all data contained on logical volume hdbromonts00 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? y
rmlv: Logical volume hdbromonts00 is removed.
#
# rmlv hdbromonts01
Warning, all data contained on logical volume hdbromonts01 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? y
rmlv: Logical volume hdbromonts01 is removed.

Don't forget to delete and recreate the corresponding virtual adapter on the VIOS via the HMC console, otherwise this will cause problem during the installation phase since the VIOS server will not properly give access to the underlying storage disk(s) or device(s)!

Recreate the device tree on the VIOS:

$ cfgdev
$
$ lsdev -virtual | grep vhost3
vhost3          Available  Virtual SCSI Server Adapter

Case #2: configure a newly created virtual adapter

On the other side, if the virtual adapter is freshly created -- as in the previous example -- it is needed to inform the VIOS operating system about it:

$ cfgdev
$
$ lsdev -virtual | grep vhost6
vhost6          Available  Virtual SCSI Server Adapter
$
$ lsmap -vadapter vhost6
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost6          U9113.550.65E3A0C-V3-C11                     0x00000000

VTD                   NO VIRTUAL TARGET DEVICE FOUND

Assuming we will use one local SCSI disk space to hold the OS and one SAN disk to host the application data, here are the required steps to configure the VIOS.

Create a logical volume for the OS and be sure to have an unused SAN disk:

$ mklv -lv beastielv rootvg 80
beastielv
$
$ lsdev | grep hdisk15
hdisk15    Available EMC Symmetrix FCP MPIO RaidS

Insert the wanted storage resources in the virtual adapter:

$  mkvdev -vdev beastielv -vadapter vhost6
vtscsi16 Available
$
$  mkvdev  -vdev hdisk15 -vadapter vhost6  
vtscsi17 Available
$
$ lsmap -vadapter vhost6                   
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost6          U9113.550.65E3A0C-V3-C11                     0x00000000

VTD                   vtscsi16
LUN                   0x8100000000000000
Backing device        beastielv
Physloc                

VTD                   vtscsi17
LUN                   0x8200000000000000
Backing device        hdisk15
Physloc               U787B.001.DNW3897-P1-C4-T1-W5006048448930A41-L2000000000000

Create and configure the Network Install Manager

Log in to the NIM server and set the standalone machine configuration for beastie:

# TERM=vt220 smitty nim
/*
 * Perform NIM Administration Tasks
 *  Manage Machines
 *   Define a Machine
 *    Host Name of Machine                                    [beastie]
 * Perform NIM Software Installation and Maintenance Tasks
 *  Install and Update Software
 *   Install the Base Operating System on Standalone Clients
 *    (Choose: "beastie        machines       standalone")
 *    (Choose: "spot - Install a copy of a SPOT resource")
 *    (Chosse: "spot530     resources       spot")
 *    (Select: "LPP_SOURCE                                    [lpp_source530]")
 *    (Select: "ACCEPT new license agreements?                [yes]")
 *    (Select: "Initiate reboot and installation now?         [no]")
 *    (Select: "ACCEPT new license agreements?                [yes]")
 */

The only required prerequisite is to have a fully working name resolution.

Boot and automatically network install the DLPAR

Start the DLPAR console via the HMC administration station: activate it and boot it using the SMS mode.

Then, simply configure the network stack of the Initial Program Load to be able to netboot the partition and remotely install it:

/*
 *  Steps:
 *   2.  Setup Remote IPL (Initial Program Load)
 *    2.   Interpartition Logical LAN      U9113.550.65E3A0C-V8-C3-T1  72ee80008003
 *     1.  IP Parameters
 *      1.  Client IP Address                    [10.126.213.196]
 *      2.  Server IP Address                    [10.126.213.193]
 *      3.  Gateway IP Address                   [000.000.000.000]
 *      4.  Subnet Mask                          [255.255.255.000]
 *     2.  Adapter Configuration
 *      2.  Spanning Tree Enabled
 *       2.  No  <===
 *     3.  Ping Test
 *      1.  Execute Ping Test
 *   5.  Select Boot Options
 *    1.  Select Install/Boot Device
 *     7.  List all Devices
 *      2.        -      Virtual Ethernet
 *                       ( loc=U9113.550.65E3A0C-V2-C3-T1 )
 *      2.  Normal Mode Boot
 *      1.  Yes
 */

Notes:

  1. 10.126.213.191 represents the IP address of the DLPAR
  2. 10.126.213.193 represents the IP address of the NIM server (bootp and tftp servers)

Then select the default console device, the installation language (English) and follow the illustrated guide:

  1. In the proposed screen, choose to modify the default installation settings...
    consoleshot #01
  2. ... in the optional choice...
    consoleshot #02
  3. ... and for additional software:
    consoleshot #03
  4. Select the Server package:
    consoleshot #04
  5. Choose "Install with the settings listed above.".
  6. Verify the overall selection...
    consoleshot #06
  7. ... and happily wait for the installation to proceed:
    consoleshot #07

Configuration steps on the DLPAR

Well. The DLPAR beastie is now installed and basically configured but lacks a lot of tools and none of the network infrastructure is currently available from it (DNS, NIS, NFS, etc.).

Here is what can be done to render this machine (a little) more usable.

Internal IP address (high inter-partition bandwidth)

As with the Inter-Domain Network (IDN) found on an E10K from Sun Microsystems, it may be interesting to use an internal LAN to communicate between LPARs using a high-bandwidth network. So, just pick up an unused IP address from the chosen private range and apply the settings to the correct network interface (e.g. configured with the right network ID):

# chdev -l en0 -a netaddr='193.168.10.5' -a netmask='255.255.255.0' -a state=up

Allocate data storage space

Applications and users data are kept outside the OS space and reside in their own volume group. All the data are hosted on SAN disk as provided via the VIOS:

# lsdev | grep hdisk
hdisk0     Available       Virtual SCSI Disk Drive
hdisk1     Available       Virtual SCSI Disk Drive
#
# lsvg
rootvg
#
# lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            639         468         127..85..00..128..128
#
# mkvg -y beastievg hdisk1
beastievg
#
# lsvg -p beastievg
beastievg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk1            active            539         539         108..108..107..108..108

Seems ready to put real stuff here right now. Later, if new disk will be added through the VIOS, simply add the new virtual SCSI disk to the volume group:

# cfgmgr
#
# lsdev | grep hdisk   
hdisk0     Available       Virtual SCSI Disk Drive
hdisk1     Available       Virtual SCSI Disk Drive
hdisk2     Available       Virtual SCSI Disk Drive
#
# extendvg beastievg hdisk2
0516-1254 extendvg: Changing the PVID in the ODM.
#
# lsvg -p beastievg
beastievg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk1            active            539         539         108..108..107..108..108
hdisk2            active            539         539         108..108..107..108..108

Update the operating system to the latest Maintenance Level (e.g. 5.3ML3 at the time of this writing)

Log in to the NIM server and set the standalone machine configuration for beastie:

# TERM=vt220 smitty nim
/*
 * Perform NIM Software Installation and Maintenance Tasks
 *  Install and Update Software
 *   Update Installed Software to Latest Level (Update All)
 *    (Choose: "beastie        machines       standalone")
 *    (Choose: "53ML3          resources      lpp_source")
 */

Most of the time, these kind of software changes require the system to be rebooted in order for the changes to be made effective:

# shutdown -r now

Attaching the partition to the general network infrastructure (LDAP, NIS, NFS, DNS, etc.)

Please consult the following online documentation: Use the NIS and NFS Infrastructure on AIX 5L.

Modify the maximum number of processes allowed per user

Check for default setting:

# lsattr -D -l sys0 | grep maxuproc
maxuproc        128     Maximum number of PROCESSES allowed per user      True

Then change it accordingly, for example default x 4:

# chdev -l sys0 -a maxuproc=512
sys0 changed
#
# lsattr -El sys0 | grep maxuproc
maxuproc        512                Maximum number of PROCESSES allowed per user      True

Get network time

Assuming that the clock is given by the default gateway network device, we can set and configure the NTP client this way.

Get the default gateway IP address...

# netstat -rn | grep default
default          10.126.213.1      UG        1     2738  en1     -   -      -

... and hard-set the date using ntpdate(8):

# ntpdate 10.126.213.1
30 Sep 18:04:48 ntpdate[282628]: step time server 10.126.213.1 offset -25063.236234 sec

Then, configure the NTP deamon (xntpd) and start the service:

# cp /etc/ntp.conf /etc/ntp.conf.orig
#
# diff -c /etc/ntp.conf.orig /etc/ntp.conf
*** /etc/ntp.conf.orig  Fri Sep 30 18:05:17 2005
--- /etc/ntp.conf       Fri Sep 30 18:05:43 2005
***************
*** 36,41 ****
  #
  #   Broadcast client, no authentication.
  #
! broadcastclient
  driftfile /etc/ntp.drift
  tracefile /etc/ntp.trace
--- 36,42 ----
  #
  #   Broadcast client, no authentication.
  #
! #broadcastclient
! server 10.126.213.1
  driftfile /etc/ntp.drift
  tracefile /etc/ntp.trace
#
# chrctcp -S -a xntpd
0513-059 The xntpd Subsystem has been started. Subsystem PID is 336032.

After some time, be sure that the system get its time from the network device (verify the * in front of the remote node):

# ntpq -pn
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
*10.126.213.1    10.126.192.132   3 u    9   64   37     0.85   13.601  877.12

Install and configure OpenSSH and the administrative tool sshd_adm

The aim of this part is to have a tuned configuration of OpenSSH for all clients, and have a specialized configuration for sshd_adm, a second OpenSSH installation which purpose is to be dedicated to administrators and administrative tasks.

Install the OpenSSL RPM package provided by the Linux toolbox for AIX:

# mount -n nim -v nfs /export/lpp_source /mnt
# rpm -ivh /mnt/cd_roms/AIX_Toolbox_for_Linux_Applications_for_Power_Systems_11.2004/RPMS/ppc/openssl-0.9.7d-1.aix5.1.ppc.rpm
openssl                     ##################################################

Then, install the OpenSSH RPM packages, found on the IBM web site (e.g. openssh-3.8.1p1_53.tar.Z for AIX 5.3):

# mkdir /tmp/_sm_inst.$$   /* Put the downloaded package here. */
# zcat /tmp/_sm_inst.$$/openssh-3.8.1p1_`uname -v``uname -r`.tar.Z |  (cd /tmp/_sm_inst.$$ && tar xf -)
# /usr/lib/instl/sm_inst installp_cmd -a -Q -d /tmp/_sm_inst.$$ -f openssh.* -c -N -g -X -G -Y
geninstall -I "a -cgNQqwXY -J"  -Z   -d /tmp/_sm_inst.176290 -f File 2>&1

File:
    I:openssh.base.client          3.8.0.5302
    I:openssh.base.server          3.8.0.5302
    I:openssh.license              3.8.0.5302
    I:openssh.man.en_US            3.8.0.5302
    I:openssh.msg.HU_HU            3.8.0.5302
    I:openssh.msg.RU_RU            3.8.0.5302
    I:openssh.msg.hu_HU            3.8.0.5302
    I:openssh.msg.ru_RU            3.8.0.5302
[...]

Don't forget to clean things up...

# rm -r /tmp/_sm_inst.$$
# umount /mnt

For the configuration steps of the two deamons, please consult the following online documentation: How to Add a New "sshd_adm" Service on AIX 5L.

Install some useful tools commonly used nowadays

The tcsh shell

Log in to the NIM server and set the standalone machine configuration for beastie:

# TERM=vt220 smitty nim
/*
 * Perform NIM Software Installation and Maintenance Tasks
 *  Install and Update Software
 *   Install Software
 *    (Choose: "beastie        machines       standalone")
 *    (Choose: "AIX_Toolbox_for_Linux     resources       lpp_source")
 *     (Select: "coreutils-5.0                            ALL")
 *     (Select: "grep-2.5.1                               ALL")
 *     (Select: "tcsh-6.11                                ALL")
 */

The zip and unzip utilities

Log in to the NIM server and set the standalone machine configuration for beastie:

# TERM=vt220 smitty nim
/*
 * Perform NIM Software Installation and Maintenance Tasks
 *  Install and Update Software
 *   Install Software
 *    (Choose: "beastie        machines       standalone")
 *    (Choose: "AIX_Toolbox_for_Linux     resources       lpp_source")
 *     (Select: "zip-2.3                                  ALL")
 *     (Select: "unzip-5.51                               ALL")
 */

The j2se toolkit

Install the Java 1.4.2 packages in mode 32-bit and 64-bit, found on the IBM web site:

# mkdir /tmp/_sm_inst.$$   /* Put the downloaded packages here. */
# /usr/lib/instl/sm_inst installp_cmd -a -Q -d /tmp/_sm_inst.$$ -f _all_latest -g -X -G -Y
geninstall -I "agQqwXY -J"  -Z   -d /tmp/_sm_inst.299180 -f File 2>&1

File:
    I:Java14.license               1.4.2.0
    I:Java14.sdk                   1.4.2.4
    I:Java14_64.license            1.4.2.0
    I:Java14_64.sdk                1.4.2.3
[...]

Don't forget to clean things up...

# rm -r /tmp/_sm_inst.$$

The sudo security program

Log in to the NIM server and set the standalone machine configuration for beastie:

# TERM=vt220 smitty nim
/*
 * Perform NIM Software Installation and Maintenance Tasks
 *  Install and Update Software
 *   Install Software
 *    (Choose: "beastie        machines       standalone")
 *    (Choose: "AIX_Toolbox_for_Linux     resources       lpp_source")
 *     (Select: "sudo-1.6.7p5                             ALL")
 */

Don't forget to add the hostname beastie to the correct list in the sudoers global site configuration file.

The perl parsing tool

The perl program was compiled from sources, and is available as a shared NFS resource for AIX at:

# df -k /Apps/perl
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
XX.XX.XX.XX:/export/nfssrv/apps/AIX/powerpc/64/5.3/perl    35349504  32800724    8%     7885     1% /Apps/perl
#
# /Apps/perl/5.8.7/bin/perl -v

This is perl, v5.8.7 built for aix

The Unix administrative tool lsof (LiSt Open Files)

Log in to the NIM server and set the standalone machine configuration for beastie:

# TERM=vt220 smitty nim
/*
 * Perform NIM Software Installation and Maintenance Tasks
 *  Install and Update Software
 *   Install Software
 *    (Choose: "beastie        machines       standalone")
 *    (Choose: "AIX_Toolbox_for_Linux     resources       lpp_source")
 *     (Select: "lsof-4.61                                ALL")
 */

Configure the OS to boot via a SAN disk (thanks to the VIOS)

So, the operating system is now at the required ML (e.g. 5.3ML3) to support a SAN boot disk via the VIOS. Assuming that all the steps to make available this disk to the VIOC are already done, here is how to fully put this partition onto the SAN.

Information about the corresponding SAN disk provided through the VIOS:

# lscfg -v -l hdisk3
  hdisk3           U9113.550.65E3A0C-V8-C11-T1-L840000000000  Virtual SCSI Disk Drive

Try to put it in the rootvg system volume group:

# extendvg rootvg hdisk3
0516-1254 extendvg: Changing the PVID in the ODM.
0516-1162 extendvg: The Physical Partition Size of 16 requires the creation of
        1078 partitions for hdisk3.  The limitation for volume group rootvg is
        1016 physical partitions per physical volume.  Use chvg command with -t
        option to attempt to change the maximum Physical Partitions per Physical
        volume for this volume group.
0516-792 extendvg: Unable to extend volume group.

As shown, a limitation was reached, especially because of the current settings of the rootvg system volume group. In fact, it is due to the original size of the virtual disk hosting the system file systems... and so the size of the corresponding logical volume on the VIOS, beastielv. Change the rootvg charateristic as proposed and extend the volume group one more time:

# chvg -t 2 rootvg
0516-1193 chvg: WARNING, once this operation is completed, volume group rootvg
        cannot be imported into AIX 430 or lower versions. Continue (y/n) ?
y
0516-1164 chvg: Volume group rootvg changed.  With given characteristics rootvg
        can include upto 16 physical volumes with 2032 physical partitions each.
#
# extendvg rootvg hdisk3

The next step is to evacuate the content of hdisk0 (logical volume via a virtual SCSI disk) to hdisk3 (dedicated SAN disk via a virtual SCSI disk):

# migratepv hdisk0 hdisk3
0516-1011 migratepv: Logical volume hd5 is labeled as a boot logical volume.
0516-1246 migratepv: If hd5 is the boot logical volume, please run 'chpv -c hdisk0'
        as root user to clear the boot record and avoid a potential boot
        off an old boot image that may reside on the disk from which this
        logical volume is moved/removed.
migratepv: boot logical volume hd5 migrated. Please remember to run
        bosboot, specifying /dev/hdisk3 as the target physical boot device.
        Also, run bootlist command to modify bootlist to include /dev/hdisk3.

As explain by the command migratepv, modifiy some boot settings is necessary here and can't be avoided. Clear the boot record on the `old' system disk:

# chpv -c hdisk0

Verify and create a boot image on the newly system disk:

# bosboot -vd hdisk3 && bosboot -ad hdisk3

bosboot: Boot image is 23320 512 byte blocks.

Alter the device boot list to include (new) and remove (old) disks:

# bootlist -m normal -o
hdisk0
# bootlist -m normal hdisk3
# bootlist -m normal -o
hdisk3
#
# ls -ilF /dev/ipldevice /dev/rhdisk3
 1727 crw-------   2 root     system       17,  3 Oct  4 13:01 /dev/ipldevice
 1727 crw-------   2 root     system       17,  3 Oct  4 13:01 /dev/rhdisk3

We are done with this by now. Just clean rootvg, remove hdisk0 and restart the partition:

# reducevg rootvg hdisk0
#
# rmdev -l hdisk0 -Rd
hdisk0 deleted
#
# shutdown -r now

Last, clean the VIOS virtual adapter configuratrion for the partition...

$ rmdev -dev vtscsi16
vtscsi16 deleted
$
$ lsmap -vadapter vhost6
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost6          U9113.550.65E3A0C-V3-C11                     0x00000008

VTD                   vtscsi17
LUN                   0x8200000000000000
Backing device        hdisk15
Physloc               U787B.001.DNW3897-P1-C4-T1-W5006048448930A41-L2000000000000

VTD                   vtscsi18
LUN                   0x8300000000000000
Backing device        hdisk16
Physloc               U787B.001.DNW3897-P1-C4-T1-W5006048448930A41-L3000000000000

VTD                   vtscsi19
LUN                   0x8400000000000000
Backing device        hdisk23
Physloc               U787B.001.DNW3897-P1-C4-T1-W5006048448930A41-L12000000000000

VTD                   vtscsi20
LUN                   0x8500000000000000
Backing device        hdisk24
Physloc               U787B.001.DNW3897-P1-C4-T1-W5006048448930A41-L13000000000000

... and remove the corresponding logical volume:

$ rmlv beastielv
Warning, all data contained on logical volume beastielv will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? y
rmlv: Logical volume beastielv is removed.

Resize the /tmp file system and the swap space logical volume

Because the operating system was installed from scratch and the file system sizes were automatically adapted to the underlying SCSI virtual disk (in fact a logical volume provided by the VIOS on a locally attached SCSI disk), some default values may not be relevant for day to day use, especially on machine of server type.

In that sense, the size of the /tmp file system may be changed to a more sensible setting:

# df -k /tmp
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd3            32768     32388    2%       10     1% /tmp
#
# chfs -a size=1024M /tmp
Filesystem size changed to 2097152
#
# df -k /tmp
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd3          1048576   1048044    1%       10     1% /tmp

In the same time, the swap space may be enlarge to grow the available VM on the system:

# lsps -al
hd6
#
# lsps -as
Total Paging Space   Percent Used
      512MB               1%
#
# lsvg rootvg | grep "PP SIZE"
VG STATE:           active                   PP SIZE:        16 megabyte(s)
#
# echo "(2048-512)/16" | bc
96
#
# chps -s 96 -a y hd6
#
# lsps -as
Total Paging Space   Percent Used
      2048MB               1%

Install and configure the backup software tool (TSM)

Please consult the following documentation: How to Add a New "tsmsched" Service on AIX 5L.

Put this machine under the ldm management tool

Don't forget to add the new machine in the ldm local site utility in order to be able to manage it and obtain some useful information get on a daily basis.

# ldmadd beastie

TESTING beastie REMOTE ACCESS ...
sysadm: access denied on beastie ...
Configuring sysadm's ssh authorized_keys file ... beastie done.

Checking some prerequisites on beastie ... 
ok

Updating ldm agent files on beastie ...
[...]

Interesting additional reading

- page 1 of 2