Skip to main content

Configure NFS for OHVs

  1. Install NFS
    1. sudo apt install nfs-server
  2. Create an entry in /etc/exports for filesystems to be exported (ex. raid/scratch/scratch-test)
    1. sudo vi /etc/exports
    2. /raid/scratch/scratch-test 128.111.100.0/23(rw,no_root_squash) 128.111.236.0/24(rw,no_root_squash) 128.111.104.0/24(rw,no_root_squash)
  3. Restart Nfs-server service
    1. sudo systemctl restart nfs-server.service
    2. sudo systemctl status nfs-server.service
  4. Check/configure UFW (firewall) for NFS
    1. sudo ufw status
    2. Example output:
      
      gritadm@ohv-44:~$ sudo ufw status
      Status: active
      To                         Action      From
      --                         ------      ----
      OpenSSH                    ALLOW       128.111.61.0/24           
      OpenSSH                    ALLOW       128.111.64.0/22           
      OpenSSH                    ALLOW       128.111.100.0/24          
      OpenSSH                    ALLOW       128.111.101.0/24          
      OpenSSH                    ALLOW       128.111.102.0/24          
      OpenSSH                    ALLOW       128.111.103.0/24          
      OpenSSH                    ALLOW       128.111.104.0/24          
      OpenSSH                    ALLOW       128.111.106.0/24          
      OpenSSH                    ALLOW       128.111.180.0/22          
      OpenSSH                    ALLOW       128.111.188.0/22          
      OpenSSH                    ALLOW       128.111.234.0/24          
      OpenSSH                    ALLOW       128.111.236.0/24          
      OpenSSH                    ALLOW       169.231.80.0/20           
      OpenSSH                    ALLOW       169.231.96.0/19           
      OpenSSH                    ALLOW       169.231.112.0/20          
      OpenSSH                    ALLOW       169.231.128.0/20          
      OpenSSH                    ALLOW       169.231.144.0/20          
      OpenSSH                    ALLOW       169.231.160.0/20          
      OpenSSH                    ALLOW       169.231.208.0/20          
      Web Server Full            ALLOW       Anywhere                  
      10050/tcp                  ALLOW       128.111.104.137            # allow zabbix
      2633                       ALLOW       128.111.104.0/24           # allow ONE XML-RCP        
      Web Server Full (v6)       ALLOW       Anywhere (v6)             
      
    3. Check for the following rules:
      1. Anywhere                   ALLOW       128.111.104.0/24          
        Anywhere                   ALLOW       128.111.100.0/24          
        Anywhere                   ALLOW       128.111.101.0/24          
        Anywhere                   ALLOW       128.111.236.0/24
    4. Add missing rules:
      1. sudo ufw allow from 128.111.104.0/24
        sudo ufw allow from 128.111.100.0/24
        sudo ufw allow from 128.111.101.0/24
        sudo ufw allow from 128.111.236.0/24
    5. Create Autofs mounts
      1. https://bookstack.grit.ucsb.edu/books/autofs/page/creating-autofs-mounts