2001-03-05 -+- Neal Becker -+- nbecker@fred.net -+- The FAM site seems very quiet. Is it alive? Where is 2.4.xxx support? 2001-03-06 -+- szaka -+- szaka @ sienet.hu -+- 2.4.x supports file/directory notification out of the box,
for more see /usr/src/linux/Documentation/dnotify.txt 2001-03-09 -+- guido socher -+- guido@linuxfocus.org -+- Thanks for this hint. Nobody from the LinuxFocus
team was really aware of this new 2.4 Kernel feature:
http://www.yggdrasil.com/cgi-bin/cvsweb.cgi/linux/Documentation/dnotify.txt?rev=1.1

Many other readers will find this information as well useful. 2001-03-12 -+- Atif Ghaffar -+- aghaffar@developer.ch -+- Hi Szaka,
thanks for the info about dnotify.
I have asked about the possibility of using it with fam at the FAM mailing list.

2001-03-13 -+- Johan Isacsson -+- johan@mgon.com -+- The dnotify approach requires a filehandle for each file being watched (at least that's how i understood it). For large directories that could be a problem.
I think the imon approach is more elegant :) There is a version of imon for 2.4 kernels, when i last checked it was for test9 i think.
Unfortunately imon and possibly fam has some limitations. Imon uses kmalloc to allocate memory for the hashtable where it keeps all inode numbers to monitor. For a large directory the hash table needed to be bigger than 128 k. Kmalloc can't allocate larger chunks than that.
I tried to use vmalloc instead but there seem to be something more that needs to be done (it could be in fam or imon).
I think what this article describes would be a very good thing to have working. If the fam/imon folks see a large interest in getting imon to work with large directories it will proibably be fixed soon. They have a mailinglist... :P
2001-03-15 -+- Atif Ghaffar -+- aghaffar@developer.ch -+- Another File synchronizer I came through today is
Unison
http://www.cis.upenn.edu/~bcpierce/unison/

I havent tested it yet, just went through the online docs.


2001-06-04 -+- tom -+- -+- hi,
very interesting article -thanks.
another question:
how you would sync two (failover) webservers with (postgres-)databases installed?

thanks in advance,
tom 2001-09-05 -+- Kelly McGranahan -+- sv1@myrealbox.com -+- Database failover should always be done with database specific utilities. If you look on the Postgresql to list replication and failover are listed on the top as urgent. Hopefully, we will see some inherant abilities soon. 2001-09-18 -+- Vladimir Natalenko -+- vladimir@milo1.com -+- Hi All!

I tried to set up Installing FAM and IMON. It was ok.
But when I tried to set up Installing SGI::FAM Perl module I had received the message:

[root@bkupdirector SGI-FAM-1.002]# perl Makefile.PL
Ignore "Not a known parameter name" warnings.'PRCS_PROJECT' is not a known MakeMaker parameter name.
Note (probably harmless): No library found for -lC

I could not find module "ExtUtils::MM_PRCS". It seems to me this module is required.
Could you please to help me. What should I do? Where can I find this module.
Thank you in advance for your prompt answer.

Vladimir Natalenko 2001-11-19 -+- Gonzalo -+- gonzalo@unixpac.com.au -+- Vladimir,

Perhaps this will help?:

http://prcs.sourceforge.net/

2001-12-20 -+- Bill -+- bill@_REMOVEME_sanac.net -+- Hi,

I've played a bit with many filesystems trying to solve the synchronisation problem...

do you think this solution could be adapted to a two-hosts cluster acting both as webservers AND ftpservers?

thanks!

Bill 2002-01-03 -+- Kingsley Tart -+- kingsley@skymarket.co.uk -+- We have some web sites with active content - some sites have CGI programs that manage bulletin boards, for example. As far as I understand it, the scenario with one FTP server and a cluster of web servers replicating from it would fall down in this situation. Is this sort of thing beyond the current scope of FAM and IMON?

Cheers,
Kingsley. 2002-01-04 -+- Kingsley Tart -+- kingsley@skymarket.co.uk -+- We have some web sites with active content - some sites have CGI programs that manage bulletin boards, for example. As far as I understand it, the scenario with one FTP server and a cluster of web servers replicating from it would fall down in this situation. Is this sort of thing beyond the current scope of FAM and IMON?

Cheers,
Kingsley. 2002-02-22 -+- Brian McQueen -+- bqueen@nas.nasa.gov -+- Here is a nice page on our technique for sync'ing our web servers using
fam and imon. The client/server code is available, but its beta:

http://www.nas.nasa.gov/Groups/WWW/subpages/topology.html
2002-07-23 -+- jib -+- -+- I've got a problem to install SGI::FAM, this way don't works on my configuration (mandrake 8.2), it seems to be library problem and I'm not able to see where it is. Can somebody help me? I download last perl version. -+- 193.252.188.243 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) 2002-08-01 -+- jean francois panico -+- 922354@sitoverde.com -+- In MDK8.2 you have to install fam-...rpm, libfam-...rpm, and libfam-devel...rpm BEFORE installing SGI::FAM.
That's all you need to get it running.

Bye
JF
-+- 194.153.206.80 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) 2002-12-01 -+- philippe -+- pizoret@free.fr -+- it is possible to avoid the size limitation of imon ?
by exemple with several instance of script fam_mirror , launch on several part of the big arborescence ..

perhaps it's a folish thinks ...

Thanks . -+- 213.245.9.100 = Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020623 Debian/1.2.5-0.woody.1 2003-01-22 -+- Bernd Hinrichsen -+- hinrichsen@gamax.de -+- Hallo all!
I have a problem running SGI::FAM scripts on my Redhat 7.2 box. I have no problems running the fam test script but all perl scripts result in a 'Your vendor has not defined SGI::FAM macro new at...'. This is after a successfull installation of SGI::FAM according to CPAN.

Any ideas?

Thnx
Bernd -+- 213.70.79.227 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 2003-02-12 -+- MichaelPavlovsky -+- spavlov@t2.technion.ac.il -+- Hi,
I think that "fam & imon" are nice tools but
there are tons of similar solutions for resource monitoring.
By resources I mean file system's trees or even shared memory.
The real problem in my opinion is a notification!.
Fam worths nothing without fast, " reliable " messaging system.
I think that current solution is not fast and clean enough.
If you know about anything worth looking please send me a link.

Thanks,
Michael Pavlovsky:
"spavlo@t2.technion.ac.il" -+- 128.139.197.31 = Mozilla/5.0 (compatible; Konqueror/3; Linux) 2003-02-28 -+- Penguin -+- penguin@linuxdumps.com -+- Hey.... I have 2 file servers each with 400GB of data. Is it feesable to use your method to replicate in realtime between the 2?

thx
-+- 216.208.130.66 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 2003-03-21 -+- ponomario -+- ponomario@yahoo.es -+- Hi....

I have a problem when try install the module SGI::FAM display follow errors:

BEGIN failed--- compilation aborted at t/fam.t line 1
t/fam... dobious
test returned status 2 (wstat 512 0x200)
FAILED test script could be run alas--no output ever seen
make *** [test_dynamic error 2]
/usr/bin/make test not Ok

running make install
make test had returned bad status, won't install without force

Any ideas?


thanks for the atention lent...


PD: sorry for my english -+- 80.58.4.170 = Mozilla/5.0 Galeon/1.2.0 (X11; Linux i686; U;) Gecko/20020408 2003-03-26 -+- kapachov -+- ponomario@yahoo.es -+- hi
I can install the module, I do manualy

#perl Maekefile.pl
#make
#make test (optional)
#make install

But now I try run the progrma monitor or fam_mirror.

for example:

#./monitor /var/www/

or

#./fam_mirror /var/www


this show me that error:


Your vendor has not defined SGI::FAM macro new at ./monitor (or ./fam_mirror) in the line ?


thanks for the atention lent....
-+- 80.58.4.170 = Mozilla/5.0 Galeon/1.2.0 (X11; Linux i686; U;) Gecko/20020408 2003-05-15 -+- Alguien -+- -+- El error "Your vendor has not defined SGI::FAM" esta en el codigo
la funcion AUTOLOAD en FAM.pm:

sub AUTOLOAD {
my $constname;
($constname = $AUTOLOAD) =~ s/.*:://;
my $val = constant($constname);
if ($! != 0) {
if ($! =~ /Invalid/) {
$AutoLoader::AUTOLOAD = $AUTOLOAD;
goto &AutoLoader::AUTOLOAD;
} else {
croak "Your vendor has not defined SGI::FAM macro $constname";
}
}
eval "sub $AUTOLOAD { $val }";
goto &$AUTOLOAD;
}

Incluye una comprobacion de error en "ingles":

" if ($! =~ /Invalid/) { "

en las versiones en castellano deberia ser:

" if ($! =~ /inválido/) { "

Se me ha ocurrido usar "use English" pero no funciona. Una solucion de urgencia es modificar el esa linea de codigo de FAM.pm:

" if ($! =~ /inv/i) { "

Si a alguien se le ocurre otra cosa....

-+- 212.59.220.116 = Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) 2003-06-09 -+- Stanislav Brabec -+- sbrabec@suse.cz -+- "LANG=C LC_ALL=C fam_mirror" works around "Your vendor has not defined SGI::FAM macro new at ./fam_mirror line 50" for all locales. -+- 213.210.157.162 = Mozilla/5.0 Galeon/1.2.8 (X11; Linux i686; U;) Gecko/20030317 2003-07-17 -+- Siti Muna Payordueramae -+- -+- i think FAM is very intresting.. but i'm haven't basic in peal.. just have a little bit basic in unix... can anybody tell me how to install FAM, i means from the first step untill how to run the programming... thank u -+- 161.142.148.101 = Mozilla/4.0 (compatible; MSIE 5.01; Windows 98) 2003-07-17 -+- Maurizio -+- matalla@inwind.it -+- Hi,
i'm trying to get through with fam_monitor but my (maybe stupid) problem is: how do i transfer my RSA (DSA) data in order to go through ssh without authorization ..better with key-pair authorization ?

Thanks

Maurizio -+- 212.102.34.93 = Mozilla/5.0 (X11; U; Linux i586) Gecko/20030704 Galeon/1.3.5 Debian/1.3.5.20030714-1 2003-11-26 -+- james bya -+- hustjby@sohu.com -+- i could not make the perl script run rightly because the same no vendor something like this.So i rewrite it by c.Now it works.But it has not been well tested.Anyone who are interesting plz mail hustjby@sohu.com and maybe u can give me some suggestion -+- 202.106.182.176 = Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.2.1) Gecko/20030225 2003-12-12 -+- Zia -+- zia@zort.org -+- Hi Atif,

Great script (fam_mirror).

I just needed it to be a daemon instead appending a & with it and putting in background. So, worked on it a bit, came up with a decent Daemon. Here is the patch:

--- patch starts here ---

--- fam_mirror 2003-12-12 00:05:11.000000000 +0800
+++ fam_mirrord 2003-12-12 22:16:38.000000000 +0800
@@ -45,6 +45,7 @@
use File::Basename;
use File::Find;
use SGI::FAM;
+use POSIX;

#start a fam object
my $fam=new SGI::FAM;
@@ -102,7 +103,38 @@
# for the timebeing you can run it with &
# perhaps I will use POE at somepoint with this

-while (1) {
+# Put the program in DAEMON mode... Zia (zia at zort dot org)
+my $pidFile = '/var/run/fam_mirrord.pid';
+chdir("/")
+ or die "Couldn't chdir to /: $!";
+open STDIN, '/dev/null' or die "Can't read /dev/null: $!";
+open STDOUT, '>>/dev/null' or die "Can't write to /dev/null: $!";
+open STDERR, '>>/dev/null' or die "Can't write to /dev/null: $!";
+umask 0;
+my $pid = fork;
+if ($pid) # parent: save PID
+{
+ open PIDFILE, ">$pidFile" or die "can't open $pidFile: $!\n";
+ print PIDFILE $pid;
+ close PIDFILE;
+ exit 0;
+}
+die "Couldn't fork: $!" unless defined($pid);
+
+POSIX::setsid()
+ or die "Can't start a new session: $!";
+
+my $time_to_die = 0;
+
+sub signal_handler {
+ $time_to_die = 1;
+}
+
+$SIG{INT} = $SIG{TERM} = $SIG{HUP} = &signal_handler;
+# trap or ignore $SIG{PIPE}
+
+
+while ($time_to_die) {
do {
$event=$fam->next_event;
$dir=$fam->which($event);

--- patch end here ---

If you want the whole code with the daemon code in it, you can get it here: http://zort.org/work/codes/fam/fam_mirrord

I have also created a startup (/etc/init.d/fam_mirrord) script for Redhat, you can get it here: http://zort.org/work/codes/fam/fam_mirrord-redhatstartup

Regards,

Zia -+- 210.193.0.209 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705) 2003-12-26 -+- Travis L. Bean -+- -+- If anyone could shed some light on this problem I am experiencing, I would be very grateful: The fam_mirrord daemon fails to start when there are multiple directories under /home. A couple of directories and it starts just fine. I don't experience this problem when mirroring /var/www. It doesn't matter how many directories are created under /var/www; the daemon always starts just fine. This stall problem only happens when mirroring /home. I am using Fedora Linux Core 1. -+- 66.191.26.179 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 2003-12-27 -+- Travis L. Bean -+- -+- When I execute (DEBUG=1 INIT_MIRROR=1 CREATE_DIRS=1 /bin/fam_mirrord /home) I get debugging output and then it stalls at random. I haven't been able to track down what would be causing this stall problem. I also notice that when I am mirroring /var/www (fam_mirrord correctly reads the /var/www directory structure without stalling - unlike /home) if I create a directory structure, the directories mirrored on the replica host only go two levels deep (e.g. If I create a structure of pdc-srv/var/www/test/test2/test3, only the test directory and test2 subdirectory appear on the bdc-srv, but not the test3 subdirectory). So on the primary domain controller there would be /var/www/test/test2/test3, but the backup domain controller would only receive /var/www/test/test2. I have used a wide variety of rsync switches and none of them seem to make a difference on the results I am getting. I am currently using: ($rsync="rsync --archive --checksum --update --delete -e 'ssh -l root' ";).

One more thing I noticed about the fam_mirrord script. The only way I have been successful in getting directories to delete properly on the replica host (backup domain controller) is to edit line 178 ($cmd="$rsh $host 'rm $filepath'";) and change it to ($cmd="$rsh $host 'rm -rf $filepath'";). -+- 66.191.26.179 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 2004-03-29 -+- manish -+- manishc@hitechexport.com -+- We at Hi-Tech Export have simple 1-Linux Server(RedHat-9.0) running SAMBA server providing files to all windows and linux desktops. We are planning to setup other 2-Linux Server, How can we simply setup mirroring or anything such so that all of the 1-Linux Server (including system changes etc...) is mirrored to 2-Linux Server. We are not knowldgeable for this. Kindly help us out and thanks in advance.
Help would be appreciable. -+- 203.77.197.98 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 2004-04-30 -+- Kelly Sidener -+- kelly.sidener@nexinnovations.com -+- Atif, are you still monitoring this? If you are, have you resolved the large directories known problem? I have a need to implement this with a file system that has a directory with currently 18000 subdirectories. The administrator thinks he can get it down to 12000, and wants to go to more of a tree structure at some point in the future.

Please let me know.

Thanks, Kelly -+- 66.183.226.191 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) 2004-08-30 -+- Bikr -+- bikr@bikr.net -+- Hey guys I'm having some trouble with this. It works flawlessly as far as mirroring the information , but whether I use the original script or the Daemon script , I get this:


"stdin: is not a tty"


Everytime I change a file I get that message times 2.
I have tried suppressing errors , piping to /dev/null etc. I just can't get it to work without those errors.

Let me know if you can think of anything.

--Josh
bikr@bikr.net -+- 208.17.122.156 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 2004-09-26 -+- Johnny Bandwith -+- linuxfocus.org@icarus.hafnet.com -+- I have fam_mirror working properly on my identical (and I mean Identical, except for the hostnames and IP addresses) RH9 boxes. It works nice, although I have to ru fam_mirror multiple times for multiple directories or else it gets a bit slow.
My problem can be reproduced:

# fam_mirror /tmp/
# mkdir /tmp/dir1
# mkdir /tmp/dir1/dir2
# mkdir /tmp/dir1/dir2/dir3

So far so good; everything within tmp, tmp/dir1 and tmp/dir1/dir2 is being mirrored. When you go deeper:

mkdir /tmp/dir1/dir2/dir3/dir4

fam_mirror doesn't mirror. It seems it can only look at directories three levels deep- no deeper. And that's where my problem lies: I have users creating directory trees deeper than three (who doesnt?)...

Any hints?

Kind regards,

rogier AT icarus DOT hafnet DOT com
-+- 80.126.25.2 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 #2004-10-13 -+- UNISOFT DATATECH -+- info@unisoftdatatech.com -+- We offer Data Entry, data entry india, offshore data-entry india, Data Conversion, Data Processing, Form Processing, Scanning, OCR, Accounting and Bookkeeping Servivces.

http://www.unisoftdatatech.com
http://www.unisoftdatatech.com/services.htm
http://www.unisoftdatatech.com/dataentry_and_processing.htm
http://www.unisoftdatatech.com/data_conversion.htm
http://www.unisoftdatatech.com/scanning.htm
-+- 61.11.3.116 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 2004-11-09 -+- Travis L. Bean -+- support@biologicaqua.com.nospam -+- I posted back in 2003-12-27 in regard to what I consider to be a bug in this script. It does not replicate directories correctly and does not recurse deep enough to be useful for anything in a production environment (such as a Samba file server or Apache webserver). If anyone could shed some light on how to get this script parsing multiple directories correctly, it would be much appreciated.

Travis L. Bean
Systems Administrator
Bio-Logic Aqua Technologies
Grants Pass, OR - United States
-+- 66.191.27.173 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) #2004-12-11 -+- unisoftdatatech -+- info@unisoftdatatech.com -+- www.data-entry-conversion-india.com...We offer Data Entry, data entry india, offshore data-entry india, Data Conversion, Data Processing, Form Processing, Scanning, OCR, Accounting and Bookkeeping Servivces.
-+- 210.211.249.235 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 2005-10-30 -+- peter koegel -+- pkoegel@azxws.com -+- How about FAM and system load ? We get a lot collision on our switch (100 Mb/s). Do we need gigabit? FAM slows our system ~ 50 % down.
So what you recoment ssh ftp or nfs?
Any recommedation?
Peter


-+- 68.142.66.200 = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050829 Firefox/1.0.6 2005-11-25 -+- Keith Reynolds -+- -+- The following patch fixes the deep directory problem, and properly handles removing directories.

--- fam_mirror 2005-11-25 08:51:57.000000000 -0800
+++ fam_mirror.new 2005-11-25 10:16:16.000000000 -0800
@@ -53,11 +53,15 @@ my $event;
#define the rsh command. This could be rsh, ssh or whatever
my $rsh="ssh -l root ";
#define the rsync command with the flags that you want
-my $rsync="rsync -rlopgztC --delete -e 'ssh -l root' ";
+my $rsync="rsync -rlopgztC --delete -e '$rsh'";

#define replica hosts separated by space
my @replicaHosts=qw(host1 host2 host3);

+#keep track of what we're monitoring; SGI::FAM doesn't give us enough info
+#when a tree is removed with rm -r.
+my %monitored;
+
#fill up the @directories list
my @directories;
find(sub { -d && -e && push @directories, $File::Find::name; }, @ARGV);
@@ -81,6 +85,7 @@ for (@directories){

print "setting monitor on $directory\n" if $ENV{'DEBUG'};
$fam->monitor(realpath($_));
+ $monitored{$_}=1;
}


@@ -104,53 +109,91 @@ if ($ENV{'INIT_MIRROR'}){

while (1) {
do {
+ my $isDirectory=0;
+ my $filepath;
+
$event=$fam->next_event;
$dir=$fam->which($event);
$file=$event->filename;
#dont copy swap files
next if $file=~/(\.swp|\~)$/;
if ($dir eq $file){
- $file="";
+ $filepath=$file;
+ } else {
+ #set correct filename. dir/file
+ $filepath="$dir/$file";
}

- #set correct filename. dir/file
- my $filepath="$dir/$file";

#remove multiple / from filepath
$filepath=~s/\/+/\//g;
-
+
#set dirname
$dirname=dirname($filepath);


+ if (-d $filepath)
+ {
+ $isDirectory=1;
+ }
+

# if there a change or create event then
# rsync the file to the replica hosts

if ($event->type =~/^(change|create)$/){
+ if ($isDirectory && $event->type eq "create")
+ {
+ #
+ # A new directory has been created;
+ # monitor it. There is a race condition
+ # here; new subdirectories might get
+ # created before we can install the
+ # monitor. So, monitor all existing
+ # subdirectories as well.
+ #
+ find(sub {
+ my $path=$File::Find::name;
+ if (-d _) {
+ print "setting monitor on $path\n" if $ENV{'DEBUG'};
+ $fam->monitor($path);
+ $monitored{$path}=1;
+ };
+ }, $filepath);
+ }
for my $host(@replicaHosts){
$cmd="$rsync $filepath $host:$dirname/";
print "$cmd\n" if $ENV{'DEBUG'};
- system ("$cmd 2>&1 >/dev/null");
+ system ("$cmd > /dev/null 2>&1");
}
}
-
+
# if the file or directory is deleted
# then delete it on the server too
# This needs some testing
- if ($event->type =~/^(delete)$/){
+ if ($event->type eq "delete"){
+ if -+- 67.183.155.147 = Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051107 Firefox/1.5 2006-11-23 -+- Fran CASSEL -+- -+- HI,

I can install fam and SGI::FAM on debian successfuly but when I run the fam_mirror script I've the following error :

SGI::FAM: Address already in use at ./fam_mirror line 50

If someone can help me, thanks in advance. -+- 217.109.179.3 = Mozilla/5.0 (compatible; Konqueror/3.3; Linux) KHTML/3.3.2 (like Gecko)