I'm in charge of migrating our website. We currently have a single server hosting both prod and preprod environment.

On our new hosting provider we have 2 servers :

  • Prod server hosting prod environment
  • Preprod server hosting Preprod and Dev environments

We wanted to share a media/ directory to avoid duplication. Our provider mounted a NFS on the prod server.

We currently can access the directory as expected and create / edit any file when connecting to the Prod server.

Lastly we have on Preprod (and Dev) a php script importing datas and creating (moving, in fact) images to media/. The script generates an error in preprod because the filesystem is in read-only. Makes sense.

When i ask my provider about it he simply answered "it is risky to set NFS in read-write mode. Do you still want to do it ?"

So here is the question :

Are the risks acceptable and what are they ?

I may update the script to write on NFS only in prod environment but then we wont be able to have the preview on preprod. That makes no sense i guess.

I do apologize for my English first and then if i should have post this on another SE site.

Thanks in advance for your tips

  • 1
    I personally do not see the issue in read write. There is always a chance you will overwrite some data you didn't want to overwrite. So if you have a solution for that no problem. And of course only your servers should be able to acces the data on the NFS, So you need your security to be in check, to keep it less hackable. – BonifatiusK Sep 11 '15 at 9:43
  • 1
    Given that your provider was the one who recognised the risks, I would suggest you ask him what they are. From there you can determine if they're acceptable. – womble Sep 11 '15 at 9:49
  • @BonifatiusK Indeed the only "person" who may write in the NFS is a cron job. – Kévin Bruneau Sep 11 '15 at 9:50
  • @womble I did but it's taking a bunch of time... – Kévin Bruneau Sep 11 '15 at 9:51

After getting in touched with my provider they explained the above mentioned risks are NOT about stability or anything like that.

The only risk is data being overwritten by our users. That solves the problem. Thanks for your advices.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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