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: ...

19 December 2011 @ 04:10 · leo

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

19 December 2011 @ 03:48 · leo

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: ...

19 December 2011 @ 03:41 · leo

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

19 December 2011 @ 03:17 · leo

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] ...

19 December 2011 @ 03:05 · leo

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

19 December 2011 @ 02:28 · leo

NetworkManager modifies /etc/hosts

There is an annoying bug (or feature depends on point of view) every restart/reconnect managed by NetworkManager, restore the original /etc/hosts loaded on startup. I’ve made a 3 line script inspired by visudo to manual edit the hosts file and prevent the other unexpected modifies: File like (with +x attribute): /usr/sbin/vihosts #!/bin/sh sudo chattr -i /etc/hosts sudo vim /etc/hosts sudo chattr +i /etc/hosts

26 November 2011 @ 22:09 · leo

Citrix - ICAClient issue on Linux REHL6

Another stupid Citrix ICAClient issue on Redhat linux: [leo@thinkleo2 ~]$ /usr/lib/ICAClient/wfcmgr -icaroot /usr/lib/ICAClient Warning: Missing charsets in String to FontSet conversion Warning: Missing charsets in String to FontSet conversion Warning: Unable to load any usable fontset Error: Aborting: no fontset found Solution 1 force language C (my favourite for any lang problems): [leo@thinkleo2 ~]$ export LANG=C Solution 2 remove charset cjkuni: [leo@thinkleo2 ~]$ sudo yum remove cjkuni* Loaded plugins: priorities, product-id, refresh-packagekit, rhnplugin, subscription-manager Updating Red Hat repositories. Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package cjkuni-fonts-common.noarch 0:0.2.20080216.1-34.el6 will be erased ---> Package cjkuni-fonts-ghostscript.noarch 0:0.2.20080216.1-34.el6 will be erased ---> Package cjkuni-ukai-fonts.noarch 0:0.2.20080216.1-34.el6 will be erased ---> Package cjkuni-uming-fonts.noarch 0:0.2.20080216.1-34.el6 will be erased --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================= Package Arch Version Repository Size ============================================================================================================================= Removing: cjkuni-fonts-common noarch 0.2.20080216.1-34.el6 @anaconda-RedHatEnterpriseLinux-201105101829.i386/6.1 0.0 cjkuni-fonts-ghostscript noarch 0.2.20080216.1-34.el6 @rhel-i386-workstation-6 6.2 k cjkuni-ukai-fonts noarch 0.2.20080216.1-34.el6 @rhel-i386-workstation-6 17 M cjkuni-uming-fonts noarch 0.2.20080216.1-34.el6 @anaconda-RedHatEnterpriseLinux-201105101829.i386/6.1 21 M Transaction Summary ============================================================================================================================= Remove 4 Package(s) Installed size: 37 M Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Erasing : cjkuni-fonts-ghostscript-0.2.20080216.1-34.el6.noarch 1/4 Erasing : cjkuni-ukai-fonts-0.2.20080216.1-34.el6.noarch 2/4 Erasing : cjkuni-uming-fonts-0.2.20080216.1-34.el6.noarch 3/4 Erasing : cjkuni-fonts-common-0.2.20080216.1-34.el6.noarch 4/4 duration: 336(ms) Installed products updated. Removed: cjkuni-fonts-common.noarch 0:0.2.20080216.1-34.el6 cjkuni-fonts-ghostscript.noarch 0:0.2.20080216.1-34.el6 cjkuni-ukai-fonts.noarch 0:0.2.20080216.1-34.el6 cjkuni-uming-fonts.noarch 0:0.2.20080216.1-34.el6 Complete! [leo@thinkleo2 ~]$

24 November 2011 @ 06:05 · leo

Postfix - Auth Dovecot Backend

main.cf file Postfix related parametes: smtpd_sasl_authenticated_header = yes smtpd_sasl_auth_enable = yes smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth dovecot.conf file Dovecot related parameters: auth default { mechanisms = plain login […removed irrelevance parameters…] socket listen { client { path = /var/spool/postfix/private/auth mode = 0660 user = postfix group = postfix } } }

27 October 2011 @ 22:21 · leo

Linux - Multicast DVB-S router for EUMETCast

This simple script transform a linux box into a DVB-S Satellite router to receive data from Eurobird 9E used by EUMETSAT to redistribute weather satellite image. REQUIRE: DVB Tools SMCroute PCI Card supported by Linux/DVB Tools (ex. Skystar 2) #!/bin/bash #################################################################### # # # Leonardo Rizzi # # Late night 24/04/2010 # # Revision 1.0 # # Tune DVB-S pci card for Eurobird 9E shifted from 13E Hotbird # # Tune, set net PID, Enable multicasting ecc. ecc. blah blah buuuu # # # #################################################################### #Globalvar DTUNE="/usr/bin/dvbtune" DNET="/usr/bin/dvbnet" MROUTE="/usr/sbin/smcroute" IFCONFIG="/sbin/ifconfig" SERVICE="eumetsat" #Set dvbcard 0-3 INT="0" #Set multicast forwarding interface and ip (by default TelliCast bind on 192.168.238.238) MINT="eth1" MIP="192.168.238.238" #Set absolute frequency in Hz FREQ=11977000 #Set polarization POL=H #Set symbol rate SYR=27500 #Set PID one space for value separation PID="100 300 301 302 500 509 510 511" #Begin start!! case "$1" in start) # Pre-Start check test -x $DTUNE || { echo "$DTUNE not installed or not configured properly"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } test -x $DNET || { echo "$DNET not installed or not configured properly"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } test -x $MROUTE || { echo "$MROUTE not installed or not configured properly"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } test -x $IFCONFIG || { echo "$IFCONFIG not installed or not configured properly"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } test -d /dev/dvb/adapter$INT || { echo "DVB$INT device not installed or not configured properly"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } # Tuning the dvb frequency echo "" echo "Tune the satellite donwlink on interface ${INT}" ${DTUNE} -c ${INT} -f ${FREQ} -p ${POL} -s ${SYR} -m >/dev/null 2>&1 & # Set address on local forwarding interface and bring it up echo "" echo "Set multicast forwarding interface ${MINT}" ${IFCONFIG} ${MINT} ${MIP} multicast up # Set PID on active dvb interface echo "" echo "Set net interface for listed PID:" for i in ${PID} do echo "Bring up PID $i" ${DNET} -a ${INT} -p $i>/dev/null 2>&1 done # Set address on dvbs interfaces and bring it up echo "" echo "Set net interface up:" for ii in {0..7} do echo "Bring up dvb net interface $ii" ${IFCONFIG} dvb${INT}_$ii 192.168.22$ii.238 up >/dev/null 2>&1 done # Start multicast router echo "" echo "Enable Multicast Router" ${MROUTE} -d #PID 100 multicast forward echo "Set multicast for PID 100" ${MROUTE} -a dvb0_0 192.168.1.1 224.223.222.34 ${MINT} ${MROUTE} -a dvb0_0 192.168.1.1 224.223.222.36 ${MINT} ${MROUTE} -a dvb0_0 192.168.1.1 224.223.222.40 ${MINT} ${MROUTE} -a dvb0_0 192.168.1.1 224.223.222.223 ${MINT} #PID 300 multicast forward echo "Set multicast for PID 300" ${MROUTE} -a dvb0_1 192.168.1.1 224.223.222.21 ${MINT} ${MROUTE} -a dvb0_1 192.168.1.1 224.223.222.31 ${MINT} ${MROUTE} -a dvb0_1 192.168.1.1 224.223.222.32 ${MINT} ${MROUTE} -a dvb0_1 192.168.1.1 224.223.222.37 ${MINT} ${MROUTE} -a dvb0_1 192.168.1.1 224.223.222.226 ${MINT} ${MROUTE} -a dvb0_1 192.168.1.1 224.223.222.252 ${MINT} ${MROUTE} -a dvb0_1 192.168.1.1 224.223.222.253 ${MINT} #PID 301 multicast forward echo "Set multicast for PID 301" ${MROUTE} -a dvb0_2 192.168.1.1 224.223.222.23 ${MINT} ${MROUTE} -a dvb0_2 192.168.1.1 224.223.222.33 ${MINT} ${MROUTE} -a dvb0_2 192.168.1.1 224.223.222.38 ${MINT} ${MROUTE} -a dvb0_2 192.168.1.1 224.223.222.39 ${MINT} ${MROUTE} -a dvb0_2 192.168.1.1 224.223.222.35 ${MINT} ${MROUTE} -a dvb0_2 192.168.1.1 224.223.222.227 ${MINT} ${MROUTE} -a dvb0_2 192.168.1.1 224.223.222.251 ${MINT} #PID 302 multicast forward echo "Set multicast for PID 302" ${MROUTE} -a dvb0_3 192.168.1.1 224.223.222.25 ${MINT} #PID 500 multicast forward echo "Set multicast for PID 500" ${MROUTE} -a dvb0_4 192.168.1.1 224.223.222.1 ${MINT} ${MROUTE} -a dvb0_4 192.168.1.1 224.223.222.22 ${MINT} ${MROUTE} -a dvb0_4 192.168.1.1 224.223.222.28 ${MINT} ${MROUTE} -a dvb0_4 192.168.1.1 224.223.222.27 ${MINT} ${MROUTE} -a dvb0_4 192.168.1.1 224.223.222.29 ${MINT} ${MROUTE} -a dvb0_4 192.168.1.1 224.223.222.30 ${MINT} #PID 509 multicast forward echo "Set multicast for PID 509" ${MROUTE} -a dvb0_5 192.168.1.1 224.223.222.248 ${MINT} ${MROUTE} -a dvb0_5 192.168.1.1 224.223.222.249 ${MINT} ${MROUTE} -a dvb0_5 192.168.1.1 224.223.222.250 ${MINT} #PID 510 multicast forward echo "Set multicast for PID 510" ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.231 ${MINT} ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.232 ${MINT} ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.233 ${MINT} ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.234 ${MINT} ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.235 ${MINT} ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.236 ${MINT} ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.237 ${MINT} ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.239 ${MINT} ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.240 ${MINT} ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.242 ${MINT} ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.243 ${MINT} ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.244 ${MINT} ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.245 ${MINT} ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.246 ${MINT} ${MROUTE} -a dvb0_6 192.168.1.1 224.223.222.247 ${MINT} sleep 5 ;; stop) # Stopping the dvb card echo "" echo "Stopping Satellite Downlink" killall dvbtune >/dev/null 2>&1 echo "" echo "Stopping Multicast Routing" # Stopping Multicast Router ${MROUTE} -k # Disable dvbs interfaces and remove active PID echo "" echo "Shutting down DVB-S interfaces" for iii in {0..7} do /sbin/ifconfig dvb0_$iii down >/dev/null 2>&1 ${DNET} -d $iii >/dev/null 2>&1 done # Remove and disable multicasting forwarding interface echo "" echo "Shutting down multicasting forwarding interface" ${IFCONFIG} ${MINT} del ${MIP} multicast ${IFCONFIG} ${MINT} down ;; restart) $0 stop $0 start ;; status) PID1='pidof dvbtune' echo "" echo "Tuning subsystem running at pid" $PID1 PID2='pidof smcroute' echo "" echo "Mulicast router running at pid" $PID2 ;; multicast) echo "Multicasting Routing table:" ip mroute show ;; *) echo "Usage: $0 [start|stop|restart|status|multicast]" ;; esac exit;s

10 October 2011 @ 04:19 · leo