Nfs

Discussion in 'Installation/Configuration' started by alicumircea, Dec 23, 2013.

  1. alicumircea

    alicumircea New Member

    Hi,

    I want to use an NFS server that should share the www and vmail folders.
    My setup is as follows:
    NFS server (192.168.9.128) - exports file:
    I created a /data partition on the NFS server that contain a folder called web1 and that folder contains www and vmail
    /data/web1/www 192.168.9.129(rw,sync,fsid=0,no_root_squash,no_subtree_check)
    /data/web1/vmail 192.168.9.129(rw,sync,fsid=0,no_root_squash,no_subtree_check)

    WEB server (192.168.9.129)
    I installed the server and I added the following entry in /etc/fstab:
    192.168.9.128:/data/web1/www /var/www nfs rw,rsize=4096,wsize=4096,hard,intro,async,nodev,nosuid 0 0
    192.168.9.128:/data/web1/vmail /var/vmail nfs rw,rsize=4096,wsize=4096,hard,intro,async,nodev,nosuid 0 0

    The problem is now that if I create a folder or copy a file to www folder on the WEB server, the same file/folder appears also in the vmail folder
    I guess I'm not configuring correctly the nfs share/mount and I need your help figuring out what's causing this.
    The distro is Debian Wheezy

    Thanks for your help!
     
  2. alicumircea

    alicumircea New Member

    More details:
    NFS server:

    Code:
    [SIZE="1"][email protected]:/# cat /etc/exports
    # /etc/exports: the access control list for filesystems which may be exported
    #		to NFS clients.  See exports(5).
    #
    # Example for NFSv2 and NFSv3:
    # /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
    #
    # Example for NFSv4:
    # /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
    # /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
    #
    /data/web1/www 10.10.10.23(rw,sync,fsid=0,no_root_squash,no_subtree_check)
    /data/web1/vmail 10.10.10.23(rw,sync,fsid=0,no_root_squash,no_subtree_check)[/SIZE]
    WEB server:

    Code:
    [SIZE="1"][email protected]:/# cat /etc/fstab
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/cciss/c0d0p2 during installation
    UUID=420ee7cf-0e3e-484f-a251-007f61eb9f63 /               ext4    errors=remount-ro 0       1
    # swap was on /dev/cciss/c0d0p1 during installation
    UUID=fb59e479-b93a-45b6-b43e-3d7965fcb0d4 none            swap    sw              0       0
    /dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
    10.10.10.22:/data/web1/www /var/www nfs rw,rsize=4096,wsize=4096,hard,intr,async,nodev,nosuid 0 0
    10.10.10.22:/data/web1/vmail /var/vmail nfs rw,rsize=4096,wsize=4096,hard,intr,async,nodev,nosuid 0 0
    /var/log/ispconfig/httpd/test.com /var/www/clients/client1/web1/log    none    bind,nobootwait    0 0
    [email protected]:/# 
    [email protected]:/# 
    [email protected]:/# df -h
    Filesystem                                              Size  Used Avail Use% Mounted on
    rootfs                                                  131G  1.8G  123G   2% /
    udev                                                     10M     0   10M   0% /dev
    tmpfs                                                   397M  260K  397M   1% /run
    /dev/disk/by-uuid/420ee7cf-0e3e-484f-a251-007f61eb9f63  131G  1.8G  123G   2% /
    tmpfs                                                   5.0M     0  5.0M   0% /run/lock
    tmpfs                                                   1.7G     0  1.7G   0% /run/shm
    10.10.10.22:/data/web1/vmail                            248G  188M  235G   1% /var/www
    10.10.10.22:/data/web1/vmail                            248G  188M  235G   1% /var/vmail
    [/SIZE]
    As you can see the fstab mounts the /data/web1/vmail twice. Why is it doing that?
     
    Last edited: Dec 24, 2013

Share This Page