Web sites on NFS share

Discussion in 'Installation/Configuration' started by TomSc, Mar 23, 2022.

  1. TomSc

    TomSc New Member

    Hi there,
    I am running out of disk space on my web hosting server.
    But I can order additional storage space which can be connected using NFS.
    Is there a way to put the /var directory on an NFS share?
    (Or maybe only the /var/www directory?)
    I already tried different approaches, but none of them worked.
    Is there a way to accomplish that?
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What were those and in which way did they not work? I mean, if you already know the usual ways of mounting NFS shares do not work, I can save time by not suggesting those.
    Have you checked you can not change your web host to a bigger disk? Or increase the size of the disk?
  3. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  4. TomSc

    TomSc New Member

    You are absolutely right. I'm sorry for my inaccurate question.
    Here's what I tried so far:
    1. Mount the NFS volume to /media/newvol, make a symlink /var which points to /media/newvol/var (with the /var directory copied to /media/newvol/var)
    2. Directly mount the NFS filesystem to /var
    3. Mount the NFS volume to /media/newvol, make a bind mount to /var
    4. tried the above not only with the whole /var directory, but also with parts of it like /var/lib or /var/www

    When trying to move the whole /var directory, the NFS mount does not work at all anymore, as the directory /var/lib/nfs is needed for the NFS mount itself to succeed.
    When trying to only move the /var/www directory, there's another error message shown during boot. The message is "Ordering cycle found" during loading the unit local-fs.target. This probably is triggered by some cyclic dependencies between the /var/www mount and the bind mounts of the log directories within /var/www

    Unfortunately, that's not an option, as I have a fixed hosting product which I can only upgrade by adding additional NFS storage. The only option would be to get a new, bigger hosting product, which I would like to avoid.

    Sorry again for my poorly worded question and thank you for your support!

    Best regards,
  5. TomSc

    TomSc New Member

Share This Page