Another LVS note, in case I would forgot this. This is from http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.arp_problem.html
5. LVS: The ARP Problem: "2.4.26 and 2.6.4 will come with 2 new device flags for tuning the ARP stack: arp_announce and arp_ignore. All IPVS like setups can use arp_announce=2 and arp_ignore=1/2/3 to solve the 'ARP problem' with DR/TUN setups. These flags are going to replace the 'hidden' functionality which does not work well for directors when they are changing their role between master/slave for a particular VIP. The risk is that other hosts can probe for VIP using unicast packets for which the hidden flag always replies. I'll continue to support the hidden flag for 2.4 and 2.6 to help existing setups but switching to the new device flags (or other solutions) is recommended.
Documentation is in the 2.6 kernel docs (linux/Documentation/networking/ip-sysctl.txt).
arp_ignore: 1 - reply only if the target IP address is local address configured on the incoming interface. if eth0/arp_ignore=1 then all IPs on eth0 are replied, all others (on lo) are not."
Monday, January 16, 2006
Friday, January 13, 2006
Sunday, December 11, 2005
Save Mozilla profiles and mail and migrate to another machine
Mozilla profiles are stored at C:\Documents and Settings\\Application Data\Thunderbird\Profiles by default. There will be a random-named directory inside the Profiles directory. That's our profile directory. Save it somewhere (including all mails) and move it to another machine.
In another machine, install TB and then goes to the Thunderbird directory in Application Data. Open profiles.ini and replace [Profile0] section with
In this case, I place the old profiles at D:\ so that it will not ever lost again.
Now, restart Thunderbird. This time thunderbird might crash, dont' worry. Just remove all extensions and re-install it and everything should works fine.
In another machine, install TB and then goes to the Thunderbird directory in Application Data. Open profiles.ini and replace [Profile0] section with
[Profile0]
Name=default
IsRelative=0
Path=D:\Documents and Settings\\Application Data\Thunderbird\Profiles\8c9mmh0q.default
In this case, I place the old profiles at D:\ so that it will not ever lost again.
Now, restart Thunderbird. This time thunderbird might crash, dont' worry. Just remove all extensions and re-install it and everything should works fine.
Wednesday, October 05, 2005
Monday, September 26, 2005
Backing up a DVD to AVI with merged subtitle using Mencoder
- Encode Audio
- mencoder vob_03_005t.vob -ovc frameno -oac mp3lame -o frameno.avi
- Encode Video 1st pass
- mencoder vob_03_005t.vob -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1973:vhq:vqmin=2:vpass=1:autoaspect -oac copy -o /dev/null
- Encode Video 2nd pass
- mencoder vob_03_005t.vob -ovc lavc -sub subtitle.srt -lavcopts vcodec=mpeg4:vbitrate=1973:vhq:vqmin=2:vpass=2:autoaspect -af volumn=10db -oac copy -o video.avi
Thursday, September 22, 2005
Wednesday, September 21, 2005
Setting-up a Certificates Authority using OpenSSL
I forget this almost everytime, so write it down here just in case.
- Have OpenSSl install somewhere.
- Go to
/share/ssl or sometimes ssl directory - Fix openssl.conf. Change "demoCA" to "somethingCA" that's more appropriate.
- Change "-days 365" in misc/CA.sh to "-days 3650"
- misc/CA.sh -newca. A directory called "somethingCA" will be here.
- Now create a cert request
- misc/CA.sh -newreq for cert with passphrase
- To create a cert request without passphrase. "openssl genrsa -out newkey.pem 1024" then "openssl req -new -key newkey.pem -out newreq.pem"
- Sign the generated request with "misc/CA.sh -sign". It always looking for "newreq.pem" so be carefull. The new certificates will be in newcert.pem
- Copy key and cert to the machine which want to use these. Put it in appropriate directory (/usr/share/ssl/certs/{slapd-key.pem,slapd.pem} for OpenLDAP)
- Find the hash number of ca by "misc/c_hash somethingCA/cacert.pem". The printed value is the file name. Copy somethingCA/cacert.pem to /usr/share/ssl/certs/
.0.
- Need to fix /etc/openldap/ldap.conf and /etc/openldap/slapd.conf to accept the new CA
- Fix the following configuration
- "TLS_CACERT /usr/share/ssl/certs/fde68c33.0" in /etc/openldap/ldap.conf
- "TLSCACertificateFile /usr/share/ssl/certs/fde68c33.0" in /etc/openldap/slapd.conf
Monday, September 19, 2005
Filters (Thunderbird) - MozillaZine Knowledge Base
Managing ThunderBird Filter - There's a short guide to copy filter from one account to another. Why don't it has "Copy" button?
Sunday, September 18, 2005
Friday, September 16, 2005
GridShib: A Policy Controlled Attribute Framework
Shibboleth is an initiative by Internet2 member universities to develop and deploy new middleware technologies that can facilitate inter-institutional collaboration and access to digital content. More information on Shibboleth can be found on the Internet2 middleware web site
GridShib: Integrating federated authorization infrastructure (Shibboleth) with Grid technology (the Globus Toolkit) to provide attribute-based authorization for distributed scientific communities
GridShib: Integrating federated authorization infrastructure (Shibboleth) with Grid technology (the Globus Toolkit) to provide attribute-based authorization for distributed scientific communities
Wednesday, September 07, 2005
Adding driverdisk to Compute Node in ROCKS
This should be usefull for us. We can install compute node which required some driver disk. Just grab it from ROCKS mailing-list.
if you can PXE boot your compute nodes, then on your frontend, try:
# cd /home/install
# mkdir driverdisk
# cp/home/install/driverdisk/dd.img
# vi /tftpboot/pxelinux/pxelinux.cfg/default
change the line:
append ks initrd=initrd.img ramdisk_size=150000 lang= devfs=nomount headless pxe kssendmac selinux=0
to:
append ks initrd=initrd.img ramdisk_size=150000 lang= devfs=nomount headless pxe kssendmac selinux=0 driverdisk=http://10.1.1.1/install/driverdisk/dd.img
Friday, September 02, 2005
Monday, August 29, 2005
Sunday, August 14, 2005
cksfv 1.3 patch for x86_64
I've made cksfv version 1.3, a SFV checksum checker for Linux, a patch to make it works under Linux x86_64 platform. Here's the patch
diff -Naru cksfv-1.3/src/crc32.c cksfv-1.3-mod/src/crc32.c
--- cksfv-1.3/src/crc32.c 2001-07-06 13:33:08.000000000 +0700
+++ cksfv-1.3-mod/src/crc32.c 2005-08-14 00:08:13.000000000 +0700
@@ -18,6 +18,7 @@
#include
#include
+#include
#include
#include
@@ -91,11 +92,11 @@
};
-int crc32(register int fd, unsigned long *main_val, unsigned long *main_len)
+int crc32(register int fd, uint32_t *main_val, uint32_t *main_len)
{
char buf[BUFFERSIZE], *p;
int len = 0, nr;
- unsigned long crc = ~0, crc32_total = ~0;
+ uint32_t crc = ~0, crc32_total = ~0;
while ((nr = read(fd, buf, sizeof(buf))) > 0)
for (len += nr, p = buf; nr--; ++p) {
diff -Naru cksfv-1.3/src/newsfv.c cksfv-1.3-mod/src/newsfv.c
--- cksfv-1.3/src/newsfv.c 2001-07-06 13:33:08.000000000 +0700
+++ cksfv-1.3-mod/src/newsfv.c 2005-08-14 00:12:17.000000000 +0700
@@ -18,20 +18,21 @@
#include
#include
+#include
#include
#include
#include
extern void pnsfv_head();
extern void pfileinfo(char**);
-extern void pcrc(char*, unsigned long);
-extern int crc32(int, unsigned long*, unsigned long*);
+extern void pcrc(char*, uint32_t);
+extern int crc32(int, uint32_t *, uint32_t *);
int newsfv(char **argv)
{
int fd, rval = 0;
char *fn;
- unsigned long len, val;
+ uint32_t len, val;
pnsfv_head();
pfileinfo(argv);
diff -Naru cksfv-1.3/src/readsfv.c cksfv-1.3-mod/src/readsfv.c
--- cksfv-1.3/src/readsfv.c 2001-07-06 13:33:08.000000000 +0700
+++ cksfv-1.3-mod/src/readsfv.c 2005-08-14 00:08:56.000000000 +0700
@@ -19,6 +19,7 @@
#include
#include
+#include
#include
#include
#include
@@ -28,7 +29,7 @@
#include
#include
-extern int crc32(int, unsigned long*, unsigned long*);
+extern int crc32(int, uint32_t *, uint32_t *);
extern void prsfv_head(char*);
int find_file(char*, char*);
@@ -39,7 +40,7 @@
FILE *fd;
char buf[512], *end, filename[512], crc[9], path[256];
int file, rval = 0;
- unsigned long len, val, sfvcrc;
+ uint32_t len, val, sfvcrc;
if (quiet == 0) {
prsfv_head(fn);
Subscribe to:
Posts (Atom)