File system help please; ftp, mounts, mirror, cluster, etc

If it doesn't fit in another category, ask it here.
Post Reply
raza19
Posts: 1
Joined: 2014/08/05 13:00:22

File system help please; ftp, mounts, mirror, cluster, etc

Post by raza19 » 2014/08/05 13:47:48

Need advice on these two matters

1) We are using multiple virtual machines(vms) spread over several different physical ones. We simply want to be able to mirror few folders on vms A,B & C. Rsyncing both ways i.e. from A to B and then from B to A is simple but does not work in our case because lets say a user is connected to machine A and has 3 files, if he deletes any file and then an automated script runs Rsync from B to A the file will again be replicated. There is indeed a workaround with arguments instructing Rsync to leave deleted files but it all leads to a spaghetti mix. Isn't there something simple for this scenario ? I looked at gluster but it requires partitioning and access to disk, since most of the vms are using openvz this isn't a possibility. Hence, please advise/suggest on any possible solutions.

2) I have a portal where each user has an account and a file repository that goes with it. Whenever any user uploads a file using a form, the php app hashes the file contents first and checks to see if the file already exists in the system (even if uploaded by a different user). If the file exists, no new file is stored, instead the system only saves a row with the details of the uploading user and links to the original file. This method eliminates file duplicates and saves space . But we are encountering a problem now; every user also gets an ftp account which can be utilized to download his repository files, since only unique files are stored we need a way to show to every user all files from his repository. Since this isn't a simple ftp folder it requires tinkering around.. We have seen symlinks and file mounts , both are not practicable because the former blocks access on permission grounds and latter requires thousands of files to be mounted individually at runtime... Please suggest any solution/idea, etc

Thanks a lot.

User avatar
Super Jamie
Posts: 310
Joined: 2014/01/10 23:44:51

Re: File system help please; ftp, mounts, mirror, cluster, e

Post by Super Jamie » 2014/12/04 11:54:17

1 - Use shared storage like NFS

2 - Use hardlinks, not symlinks

Post Reply