December 2011

AIX – loopmount

Finally on aix 6.1 ibm have introduced mounting of iso directly without raw copy on lv:

Check if necessary loopback device is available

# lsdev -C | grep loop

if nothing returned, run:

# mkdev -c loopback -s node -t loopback
loop0 Available

If the device is not present on system you get this error:

1320-003 loopmount: Specified loopback device is not found in ODM

Now for mount:

# loopmount -i /iso/dvd.iso -l loop0 -o "-V cdrfs -o ro" -m /mnt/dvd

And umount:

# loopumount -l loop0 -m /mnt/dvd

Attention: an image file can be associated with only one loopback device.

VIO – iso virtual DVD

Example of PowerVM virtual dvd setup:

login: padmin
padmin's Password:
1 unsuccessful login attempt since last login.
Last unsuccessful login: Mon Jan 31 18:51:28 CST 2011 on /dev/vty0
Last login: Mon Jan 31 18:28:29 CST 2011 on /dev/vty0

$
$ mkrep -sp rootvg -size 10G
Virtual Media Repository Created
Repository created within "VMLibrary" logical volume
$ mkvopt -name 6_1_6osp.iso -dev cd0 -ro
$
$ mkvdev -vadapter vhost1 -fbo -dev vcd1
vcd0 Available
$ loadopt -vtd vcd0 -disk 6_1_6osp.iso
$ unloadopt -vtd vcd0

Linux – IBM LinTape driver

If you need to user ibm lto tape drive inside IBM, Adic, Dell tapelibrary, with Tivoli Storage Manager is necessary to use

Download latest driver from IBM Fixcentral:
Storage Systems => Tape Systems => Tape device drivers and software => Linux

Get two two RPMs (my system is an RHEL 5 on 32bit hardware) :
lin_tape-1.61.0-1.src.rpm <== Kernel module
lin_taped-1.61.0-rhel5.i386.rpm <== Binary services

First step, rebuild the source:

# rpmbuild --rebuild lin_tape-1.61.0-1.src.rpm

Installing lin_tape-1.61.0-1.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.625
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd /usr/src/redhat/BUILD
+ rm -rf lin_tape-1.61.0
+ /bin/gzip -dc /usr/src/redhat/SOURCES/lin_tape-1.61.0.tgz
[cut]
Wrote: /usr/src/redhat/RPMS/i386/lin_tape-1.61.0-1.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.18792
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd lin_tape-1.61.0
+ rm -rf /var/tmp/lin_tape-1.61.0-1-root-root
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.18792
+ umask 022
+ cd /usr/src/redhat/BUILD
+ rm -rf lin_tape-1.61.0
+ exit 0

Second step, install all:

# rpm -Uhv /usr/src/redhat/RPMS/i386/lin_tape-1.61.0-1.i386.rpm
# rpm -Uhv lin_taped-1.61.0-rhel5.i386.rpm

Last step, start service and check for the probed devices:

# /etc/init.d/lin_tape start

# cat /proc/scsi/IBM*
lin_tape version: 1.61.0
lin_tape major number: 253
Attached Changer Devices:
Number model SN HBA SCSI FO Path
lin_tape version: 1.61.0
lin_tape major number: 253
Attached Tape Devices:
Number model SN HBA SCSI FO Path
0 ULTRIUM-TD2 1110274799 Adaptec 29160B Ultra160 SCSI 2:0:1:0 NA
1 ULTRIUM-TD2 1110275058 Adaptec 29160B Ultra160 SCSI 2:0:2:0 NA

AIX – lpp incosistent

# lppchk –v

lppchk: The following filesets need to be installed or corrected to bring the system to a consistent state:
9a33182fe26f1beae04e59e5cb6d3cdb 0.0.0.0 (COMMITTED)

# lslpp -L

Backup the ODM using the following command:

# tar -cvf /tmp/odm.tar ./etc/objrepos ./usr/lib/objrepos
# export ODMDIR=/usr/lib/objrepos
# odmget -q name= lpp
# odmdelete -q name= -o lpp
# odmdelete -q lpp_name= -o product
# odmdelete -q lpp_id= -o history
# odmdelete -q lpp_id= -o inventory
# export ODMDIR=/etc/objrepos
# odmdelete -q name= -o lpp
# odmdelete -q lpp_name= -o product
# odmdelete -q lpp_id= -o history
# odmdelete -q lpp_id= -o inventory
# export ODMDIR=/etc/objrepos

Check lppchk -v again to see if those entries are gone from ODM

AIX – Warning, savebase failed

0516-1734 extendlv: Warning, savebase failed. Please manually run ‘savebase’ before rebooting.

If you run savebase -v and you get “non-bootable LV name given” try reconstucting your /dev/ipldevice file.

Run savebase -v again and if you get the same error, try follow procedure:

# bosboot -ad /dev/hdiskX (a disk that has hd5 on it)
# bosboot -ad /dev/hdiskY (a disk that has hd5 on it)
# ipl_varyon -i

[You’ll get a return on every physical disk on the system]

You will then get a return similar to this:

# savebase -v

saving to ‘/dev/hd5’
99 CuDv objects to be saved
240 CuAt objects to be saved
44 CuDep objects to be saved
51 CuVPD objects to be saved
407 CuDvDr objects to be saved
5 CuPath objects to be saved
0 CuPathAt objects to be saved
0 CuData objects to be saved
0 CuAtDef objects to be saved
Number of bytes of data to save = 49587
Compressing data
Compressed data size is = 12069
bi_start = 0x3600
bi_size = 0x1820000
bd_size = 0x1800000
ram FS start = 0x8d6ca0
ram FS size = 0xea34cf
sba_start = 0x1803600
sba_size = 0x20000
sbd_size = 0x2f29
Checking boot image size:
new save base byte cnt = 0x2f29
Wrote 12073 bytes
Successful completion

AIX – lslpp

Memo: lslpp

List the package that owns a file

# lslpp -w

List the files in a package

# lslpp -f

List all packages installed

# lslpp -L