2006-10-28

CentOS-4.4 Samba config

Use System Settings/Server Settings/Samba Gui editor
Firewall / system-config-securitylevel / other ports
137:udp, 138:udp, 139:tcp, 445:tcp

D-Link DGE-530T 10/100/1000 Gigabit Ethernet

How to install D-Link DGE-530T 10/100/1000 Gigabit Ethernet driver
on CentOS-4.4

/Linux driver/install-8_23.tar.bz2 from CD in D-Link box,
note: there is also a half-height bracket in the box.

make sure the link
ln -s ... /usr/src/linux is ok, especially if a new kernel is installed
When I built the driver :
ls -ltrd /usr/src/linux
lrwxrwxrwx 1 root root 37 Oct 27 21:26 /usr/src/linux -> /usr/src/kernels/2.6.9-42.0.3.EL-i686

/etc/modeprobe.conf - replace sky2 driver with installed sk98lin
...
alias eth0 forcedeth
alias eth1 sk98lin

Quoted from:
http://www.phoronix.com/lch/?k=entry&l=53&t=D-Link%20DGE-530T%2010/100/1000
I installed the sk98lin driver in the supplied CDROM.

I followed the installation instructions in the README file in /Linux driver/install-8_23.tar.bz2. I did not follow the procedure in /Linux driver/sk98lin.txt - I suspect that is for an older driver version.

I loaded the driver module and it worked first time.

2006-10-06

Growing a raid5 array

Grow a raid5 array from 3 disks to 4.

mdadm - lvm(2) - evm - extfs

A- Growing a raid5 directly
get mdadm 2.5.2 or above
-found http://www.cse.unsw.edu.au/~neilb/source/mdadm/RPM/mdadm-2.5.3-1.i386.rpm
confir kernel >2.6.17

first create 4 devices in vmware. /dev/sd[bdce]1
mdadm --create --verbose /dev/md0 -l5 -n3 /dev/sdb1 /dev/sdc1 /dev/sdd1
# how big does the backup file need to be?
mdadm --grow /dev/md0 -n4 --backup-file=/tmp/raidbackup
mdadm -a /dev/md0 /dev/sde1

Then redo this with a filesystem on /dev/md0, or better ext3fs over lvm over /dev/md0

B- Alternatively using multiple raid5 pv's we can simply grow each pv independantly:
* pvmove /dev/md3 # Move all data off of /dev/md3
* vgreduce vg /dev/md3 # Remove /dev/md3 from the volume group
* pvremove /dev/md3 # Remove the LVM signature from /dev/md3
* mdadm --stop /dev/md3 # Stop the array
* mdadm --zero-superblock /dev/md3 # Remove the md signature from the disk
* mdadm --create /dev/md3 --level=5 --raid-devices=4 /dev/hda3 /dev/hdc3 /dev/hde3 /dev/hdg3 # Create the new array
* pvcreate /dev/md3 # Prepare /dev/md3 for LVM use
* vgextend vg /dev/md3 # Add /dev/md3 into the array

---- found this enabling note---
http://www.gagme.com/greg/linux/raid-lvm.php
For those now reading this, you can actually expand a raid 5 array with mdadm for software based raid in linux. At least as of kernel 2.6.17 and mdadm 2.5.2 it is possible. One easy way to stest this is to create 4 files with dd, I created 4 100MB files named raidfile[1-4]. Next, use losetup to set them up as loop back devices, I used loop[0-3]. To create the initial array do:
mdadm --create --verbose /dev/md0 -l5 -n3 /dev/loop0 /dev/loop1 /dev/loop2
The array should now be initializing, when it is finished, increase the number of raid devices in the array by issuing the command:
mdadm --grow /dev/md0 -n4 --backup-file=/tmp/raidbackup
This part requires a backup file in case power is lost during the reordering of data, this backup file has to be used to assemble the raid array in that case.
Next, to add the other drive to the array use:
mdadm -a /dev/md0 /dev/loop4
the new drive will then be added to the array with no data lose hopefully. During my testing it has worked flawlessly so far, but as for using it on a production box its probably not recommended unless you have backups. You do keep backups correct?
--------------------------------------------------

2006-08-27

galo on drupal and gallery2

New implementation choice for galo:
vmware running ubuntu server with drupal and gallery2.
Here is the logo image:



2006-08-01

NSLU2 dl-slug

After a part swap from linksys, which turned out to be another Power supply failure...

Restoring the slug:
-confirm working
configure : ip 192.168.5.200
Server Name dl-slug
Workgroup : SOLO
Lang Support: Western Europe/Latin-1

Before updating to unslung firmware
test telnet into redboot as in
http://www.nslu2-linux.org/wiki/HowTo/TelnetIntoRedBoot
I used the following (Third manual method):
while ! ping -W 1 -c 1 192.168.0.1 2>&1 >/dev/null; do true; done && telnet 192.168.0.1 9000

From the readme : Unslung-6.8-beta-README.txt
I think It will be better to upgrade to linksys V23R63 first.
Having to do with the unslng disk being in USB port1 or port2.
And I intend putting the drive in port1.
But if I unsling a brand new drive, Then I will do as sugessted and unsling to port2.

HOLD EVERYTHING, will redo this as per readme with a brand new drive.....

Checksums for reference...

-update to latest firmware : NSLU2_V23R63.bin
423f65fb2121bbf9855d060dce29b3af NSLU2_V23R63.zip
007fa7a32c20e29411922b41370962c8 NSLU2_V23R63.bin
- or unslung
b0c1c53c8d707477ac8f14e23f344713 Unslung-6.8-beta-firmware.zip

2006-07-17

RPC options

Results:
Basic transport is workable now.
For initial tests php-o-lait will be simpler, (requires php 4.3 (.1)+ (not boole)

JSON-RPC
Server side -
JSON.php wrapped by me
php-o-lait includes JSON.php , and rpcproxy classes
json-rpc-java-1.0

Client side
php-o-lait rpcproxy classes
Hand written code in HttpPostTest
including cookie tracking.

Impedence mismatch: Types!
If php is in the chain, whoe dow we adapt the class hinting scheme from java client:
remove it from the source by hand ?
Implement Objects in php ?

Other transports:
REST, XMLRPC, SOAP
JAX-RPC -> supplanted by JAX-WS 2.0 (which supplants JAX-RPC), JAXB 2.0, and SAAJ 1.3.

What about http://xins.sourceforge.net/
handles all three: REST, XMLRPC, SOAP

for xmlrpc :
implementation list : http://www.xmlrpc.com/directory/1568/implementations
top candidates for java:
http://ws.apache.org/ or http://ws.apache.org/xmlrpc/index.html
http://xmlrpc.sourceforge.net/ (redstone , was Marquée)
top candidates for php: not yet reviewed
There is already a module in php :php-xmlrpc (on euler,abel,rack2)
article describing this extension :
http://www.devshed.com/c/a/PHP/Using-XMLRPC-with-PHP/
this is the xlmrpc-epi (epinions extension)
http://keithdevens.com/software/xmlrpc
http://scripts.incutio.com/xmlrpc/
http://phpxmlrpc.sourceforge.net/ (has some json stuff too, had trouble making it work ?)
but maybe that was on boole)

2006-06-22

CJK - I18N

Get some chinese text - google china
pick a language code (zh)
zh-tw Chinese (Taiwan)
zh-cn Chinese (PRC)
zh-hk Chinese (Hong Kong SAR)
zh-sg Chinese (Singapore)

Use google language tools : Chinese -> 中国 -> China
tranlate big resource file:
for i in ./heads/aviso-core/conf/internationalization/action.xml ./heads/aviso-core/conf/internationalization/bluebox.xml ./heads/aviso-core/conf/internationalization/calendar.xml ./heads/aviso-core/conf/internationalization/db.xml ./heads/aviso-core/conf/internationalization/dialog.xml ./heads/aviso-core/conf/internationalization/error.xml ./heads/aviso-core/conf/internationalization/fsm.xml ./heads/aviso-core/conf/internationalization/menu.xml ./heads/aviso-core/conf/internationalization/message.xml ./heads/aviso-core/conf/internationalization/misc.xml ./heads/aviso-core/conf/internationalization/search.xml ./heads/btna/conf/internationalization/action.xml ./heads/btna/conf/internationalization/db.xml ./heads/btna/conf/internationalization/error.xml ./heads/btna/conf/internationalization/ncrcodes.xml ./heads/btna/conf/internationalization/report.xml ./heads/bwsc/conf/internationalization/db.xml ./heads/bwsc-linden/conf/internationalization/db.xml ./heads/cascades/conf/internationalization/menu.xml ./heads/cascades/conf/internationalization/db.xml ./heads/cascades/conf/internationalization/message.xml ./heads/cascades/conf/internationalization/misc.xml ./heads/cascades/conf/internationalization/search.xml ./heads/r142/conf/internationalization/db.xml ./heads/r160/conf/internationalization/db.xml ./heads/unique/conf/internationalization/db.xml ./heads/viau/conf/internationalization/bluebox.xml ./heads/viau/conf/internationalization/fsm.xml; do echo ""; grep -v "" $i; echo ""; done

Use unique database/head on branch_2006-06-20_daniel_utf8_devel

either
-translate ./heads/aviso-core/conf/internationalization by adding : 中国 suffix/prefix whith a style sheet. i18n-zh.xsl
-modify localization.xsl to produce zh, unicode escaped properties files...

Apply a global servlet filter to change default encoding type...

Change database encoding to utf-8 (mysql4) try users table first.

--------------------------------------------------------
-- What I've learned: from static page experiments
The browser detection seems to hinge on the jsp directive:
<%@ page language="java" contentType="text/html; charset=UTF-8" %>

which affects the http Content-Type header:
Content-Type: text/html;charset=UTF-8
whereas the default is
Content-Type: text/html;charset=ISO-8859-1

The html/head/meta/@content doesn't seem to affect the browser charset selection:
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
when the content type is set in the http response header, which is always the case with jsp pages.
You can observe the headers with:
wget -S -O - http://boole:8080/unique/china-UTF-8.jsp

2006-04-25

Openvpn - Openwrt

-backup /etc/openvpn on abel and boole
-compare example tls conf for 2.0 vs 1.5
-openvpn-2.0.5 between abel and goedel
-openvpn between dl-openwrt and goedel
-openvpn between dl-openwrt and rd-openwrt

2006-04-09

Architects

Philip Johnson - Pritzker 1979
-Glass House, New Canaan, CT.
-Bell Tower, Crystal Cathedral, Garden Grove Community Church, California

Ieoh Ming Pei - Pritzker 1983
-Grand Louvre, Paris, France
-The Bank of China, Hong Kong
-Meyerson Symphony Center, Dallas, Texas

Frank Gehry - Pritzker 1989
-Guggenheim Museum Bilbao, Spain
-Dancing House or Ginger and Fred

Renzo Piano - Pritzker 1998
-Centre George Pompidou, Paris France
-The Beyeler Foundation Museum Basel, Switzerland
-Kansai Air Terminal, Osaka Bay, Japan

Oscar Niemeyer - Pritzker 1988
Brasilia Cathedral

Rem Koolhaas - Pritzker 2000
Seattle Central Library (2004)
Louis I. Kahn
Ludwig Mies van der Rohe
Le Corbusier

Jože Plečnik
-Church of the Sacred Heart. Prague, (1922-1933)
-Prague Castle (various projects). Prague. (1920-1934)

2006-03-28

mp3 cover art and tagger

Linux & Windows Tagger
http://musicbrainz.org/

Cover Art:
Gotcha covered is for windows,

but for linux
http://www.victorland.com/slimp3/

[root@abel mp3]# perl -MCPAN -e shell
cpan> install Image::Info SOAP::Lite

[daniel@abel media]$ tar xzvf amazon_image-1.5.4.tar.gz
[daniel@abel media]$ cd amazon_image-1.5.4
daniel@abel media]$ ./make_cover.pl -p /usr/local/slimserver/ -m /archive/media/mp3/ -i FOlder.jpg
Beyond media wants that name !

2006-03-22

Zabbix re-born

Put zabbix back on its feet.
-reduce the frequency of polled data
down to 5 minutes ( 15 would break slave rule. )
-add new hosts
viau, wdel, unique (btna)

check history table on zabbix database on rack3:

select m.host, count(*) as num from history h left join items i on i.itemid=h.itemid left join hosts m on i.hostid=m.hostid where h.clock>unix_timestamp(now() - INTERVAL 10 minute) group by m.hostid;

new infrastructure heatbeat.

2006-02-20

Oracle over VMWare

Baseline test
Restore btna-20051220 oracle -> mysql
opteron , disabled keys:
pump: 16275s
+ EVENT: dumped 31842812 records at rate 3375.422 rec/s. (9433.728s.)
+ MATERIAL: dumped 2827883 records at rate 2610.8193 rec/s. (1083.14s.)
+ MATMASTER: dumped 56497 records at rate 997.44006 rec/s. (56.642s.)
+ TASK: dumped 7848729 records at rate 1521.2045 rec/s. (5159.549s.)
enable keys: 3960s
mysqldump --opt: 917s
bzip2: 5258s

2006-02-03

Lascala Install - Round3

Lascala Motherborad was swapped and returned on 2006-02-17
Was delivered with a different set of drivers: These do not seem
to be the MCE specific drivers, but they work...
Took Snapshot at 2006-02-17 22:39 - Round31AfterMoboSwap

For testing -
Restored Round2 Snapshot3, which froze after 7 hours
Restored that Round31-AfterMoboSwap Image, which ran without incident for 35 hours;
well acutally, the image froze once, but btv, was not even frozen.

So this is the driver picture as delivered after Mobo swap:
-Catalyst 1.2.2217.17271
-.NET 1.1.4322,2032
-Realtek AC'97 Audio 5.10.0.5890
-MSI Radeon Xpress 200 - 8.221.0.0
-Hauppage WinTV PVR PCI II (23xx) (Tuner 1&2) - 2.0.35.23348

-ATI Radeo Xpress 200 Crossfire Display Adpater 8.17-050813a1-026236C
-Hauppage WinTV PVR PCI II (23xx) (Tuner 1&2) - 2.0.35.23301

-=-= Round 3 Snapshot 2 =-=-
Auto-login (run...:control userpasswords2
Screen-saver off
Disable Media Center Services Automatic start
Install Snapstream FF-1.2, BeyondTV-4.1, BeyondMedia-111- AutoStart
Atomic clock - auto-start

When we are done with baremetal restores...
Media - daniel/mp3/photo/clips/divx TA01-113
ITunes - For ripping

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-=-= Round2 - Before Mobo swap =-=-
Restore as Delivered 2006-01-20 with WinXP-MCE 2005
Note current versions
-Catalyst 1.2.2051.42447
-ATI Radeo Xpress 200 Crossfire Display Adpater 8.17-050813a1-026236C
-.NET Framework 1.1.4322
-Realtek AC'97 Audio 5.13
-Hauppage WinTV PVR PCI II (23xx) (Tuner 1&2) - 2.0.35.23301

-=-= Snapshot 2 =-=-
Auto-login (run...:control userpasswords2
Screen-saver off
Disable Media Center Services Automatic start
Hauppauge - pvr150_20_35_23348.zip
ATI > Windows Media Center Edition > Motherboards with ATI Graphics >
- 6-1-igp_xp-2k_dd_ccc_wdm_sb_gart_enu_29602.exe
-- with Display Driver, Catalyst, SouthBridge Gart
Yields
-MSI Radeon Xpress 200 - 8.205.0.0
-Catalyst 1.2.2195.38647
-Hauppage WinTV PVR PCI II (23xx) (Tuner 1&2) - 2.0.35.23348

-=-= Snapshot 3 =-=-
Windows Updates
-.NET 1.1 Service Pack 1
-Optional Windows MCE Update
Install Snapstream FF-1.2, BeyondTV-4.1, BeyondMedia-111- AutoStart

-=-= Snapshot n =-=-
Atomic clock - auto-start

When we are done with baremetal restores...
Media - daniel/mp3/photo/clips/divx TA01-113
ITunes - For ripping

2006-02-01

Yum refresh - Centos4.2

install centos4.2 minimal in vmware
mount iso/CentOS-4.2-i386-bin1of4.iso
linux askmethod
nfs: 192.168.3.200 /archive /archive/iso/centos4-U2-i386/

For nagios -
check yum.conf
add dag or freshrpms - to get nagois/nagois plugins
dag: dag.repo--------------------------
[dag]
name=dag
baseurl=http://apt.sw.be/redhat/el4/en/i386/dag
enabled=1
gpgcheck=1
------------------------------
rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
yum install nagios nagios-plugins

now do this from a mirrored dag/freshrpm ?

WDEL Firefight

WDEL Setup documentation
-printers (metadata-setup)
-cron jobs (system) - keepTomcatAlive,printeralive
-interfaces
ports,protoclol,transport,directory (location permissions)

Performance
setup profiling scripts
check indexes - correlate with search's
-what is coprinter ?

Slave Setup
-backup taken every two hours
-backups mirrored (hq,rd)
-alarms
-failover directories for cma and flex
-replicate directory structures

-Alarms

2006-01-27

Infrastructure Planning

Alarms
-- Investigate Zabbix alternatives
-- Monitored Monitor
-- Failsafe Messaging
-- Scalability, and administration
Shared Homes
-- NIS or LDAP
-- Fedora Directory Server
-- Mounting /home over nfs on goedel.

Mirored Archives
Virtualization
replicate oracle 9i install over Centos-4.2 over vmware / Xen
replicate websphere install over Centos-4.2 over vmware / Xen
combine both
free up opteron or euler for GSX install
try GSX Server and Xen

Later:
-- Shared homes with GFS
-- Shared Everything -- diskless / stateless / dhcp
---- http://www.openqrm.org/
-- Virtualized server over iSCSI ala vm6

2006-01-23

Flickr API Java - flickrj

Emulate API (REST)
cd /home/daniel/downloads/flickr/flickrapi-1.0a9-src/api/examples
Backup has Broken Directory Names
time java -classpath .:../build/flickrapi-1.0a9.jar flickrj.samples.Backup c5f36426bd41cf771cf5fcf11f467c73 48704656@N00 de2e684eeb503608 coco


./flickrapi-1.0a9/Flickeroo.java
./flickrapi-1.0a9-src/api/src/flickrj/samples/Backup.java
./flickrapi-1.0a9-src/api/examples