Operating System - HP-UX
1752812 Members
6022 Online
108789 Solutions
New Discussion юеВ

Mirroring SW on different directories

 
Enrico Venturi
Super Advisor

Mirroring SW on different directories

Hello,
I need an utility (hopefully a HP-UX command) which allows to perform the SW mirroring on between different directories.
In brief, it should be nice that the utility is triggered by the file changes and automatically apply the change (it copies the file).
Does it anything exist?

Thank you
Enrico
11 REPLIES 11
Pete Randall
Outstanding Contributor

Re: Mirroring SW on different directories

It sounds like what you're looking for is the HP product Mirror Disk/UX. It mirrors at the logical volume level.

Pete

Pete
Enrico Venturi
Super Advisor

Re: Mirroring SW on different directories

Maybe I have to be more precise:
I'm using HP-UX MC/SG. Each node has local disks and shared disks; some of the files on the local disks have to be replicated acros s all the nodes; the easiest way is to copy the files from the local disks to the shared disks each time the files change, then to copy the files from the shared disks to the local disks each time the shared disks are mounted by the new active node.
Finally, I need something which copies the files from the local disks to the shared one each time they change.

Thanks
Enrico
Pete Randall
Outstanding Contributor

Re: Mirroring SW on different directories

Ahhhh! I see.

I'm unaware of a command or utility to do this automatically. We use the attached script to propagate files that need to be shared amongst our various servers.

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: Mirroring SW on different directories

If this were across different hosts, I would tell you to look into rdist. You could set up a makefile to do this. Man make for detail.

Perhaps the most strightforward way to do this, is to use a find -newer timestampfile -exec. The -exec would copy the file to the mirror location. The idea is that you would initially manually sync the files and create a timestampfile with touch. You could then have a cron job to run the find command and update the timestamp.

If it ain't broke, I can fix that.
Sanjay_6
Honored Contributor

Re: Mirroring SW on different directories

Hi,

MirrorDisk/UX is used to mirror logical volumes on the same system. This is a licensed product and need a codeword to install. You can also looks at the hp-ux command "rdist" to see if that serves your purpose. Do "man rdist" for more info on this command.

Hope this helps.

Regds
Stefan Farrelly
Honored Contributor

Re: Mirroring SW on different directories


There is NO utility or HP command to do what you require.

You will have to write yourself a script/job to do it using something like software distributor or cron/find etc. Its going to take some time and expertise to accomplish this im afraid.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Enrico Venturi
Super Advisor

Re: Mirroring SW on different directories

I try again to clarify my question:
I use HP-UX + MC/SG.
My cluster is composed by two nodes and three disks, two of them are local to the nodes, the third disk is shared and contains the application XXX.
I create an user of the application XXX when it is running on the node A: the passwd is updated, the /home/newuser directory is created; the application persistent data are updated with the newuser data.
When the appliication XXX switches to B node, the user newuser doesn't exist !! To solve this problem I can copy from A to B the portion of passwd with the line concerning newuser, but I have't yet the /home/newuser on B.
My idea is to copy /home/newuser from local disk to shared disk automatically, then to copy from shared disk to B local disk when the application XXX starts on B.
It must be clear that the copy is performed on the same host, not across different hosts!
So a simple cp command is enough! I need the trigger for the cp command ....

thanks
Enrico
Martin Johnson
Honored Contributor

Re: Mirroring SW on different directories

Veritas has a product called "Veritas File Replicator" which should fit your needs.

Take a look at http://veritas.com


Marty
Wodisch
Honored Contributor

Re: Mirroring SW on different directories

Hi Enrico,

the "trigger" you look for is hidden inside the kernel, so it's not easy (read: pretty difficult) to it that way.
Why not using a "crontab" entry to start "rsync"? That tool is free (get it from http://rsync.samba.org e.g.), has an option to transfer only the changed files (read: synchronize the directories), and can use "ssh" as the transport protcol (for security reasons).

HTH,
Wodisch