Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have 3 servers, same OS (redhat 5.5 x64). There's the same package installed on these servers. Server 01 and 02 store their files at the directory /A (cause they use the same package, the directory which places the output files is the same, too). Server03 has a folder which can be accessed by WEBGUI, called /B I need to synchonize files in /A of serevr 01 ad 02 to /B (server03), means mount both directories /A from the first machines (01 and 02) to only directory /B. so that server 03 will be able to copy all files from the folders /A of the other servers. I would be happy to receive your supports. I have been struggle with this issue for months.

share|improve this question

2 Answers 2

If I understand correctly, you'd need a union mount.

For instance using aufs on server3:

mount -r server1:/A /B1
mount -r server2:/A /B2
mount -rt aufs br:/B1=ro:/B2=ro merge-of-B1-and-B2 /B

If a file exists in both /B1 and /B2, it's the one in /B1 that will show up in /B.

share|improve this answer

You cannot mount two file systems to one mount point simultaneously. That would make no sense: which file system's content should be used when accessing a directory which is the mount point for two separate file systems?

Depending on your needs, it may be as simple as mounting the two servers' directories to separate local directories and using something as trivial as cp -R (or rsync) to copy the files.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.