[nfs] how to use correct source address

npeca75

Member
Feb 9, 2023
4
1
8
Hi
proxmox 9.2.3

i have two vlan_if
vlan255 for cluster communication
vlan1000 for external nfs storage

problem is that proxmox choose wrong SOURCE address for vlan1000 when mounting nfs
it choose 169.254.2.211 (which is from vlan255) instead of 192.168.254.211 (from vlan1000)

192.168.254.221:/mnt/backup2 on /mnt/pve/s1_vmbackups type nfs4 ... clientaddr=169.254.221 ... addr=169.254.2.221

how to solve this ??


ip route

Code:
ip r
default via 192.168.254.1 dev vlan1000 proto kernel onlink
169.254.0.0/16 via 169.254.2.1 dev vlan255 metric 20
169.254.2.0/24 dev vlan255 proto kernel scope link src 169.254.2.211
192.168.254.0/24 dev vlan1000 proto kernel scope link src 192.168.254.211

mount
Code:
169.254.2.221:/mnt/vmdisks on /mnt/pve/s1_vmdisks type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,fatal_neterrors=none,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=169.254.2.211
,local_lock=none,addr=169.254.2.221)
169.254.2.222:/mnt/data/backup2 on /mnt/pve/s2_vmbackups type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,fatal_neterrors=none,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=169.25
4.2.211,local_lock=none,addr=169.254.2.222)
192.168.254.221:/mnt/backup2 on /mnt/pve/s1_vmbackups type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,fatal_neterrors=none,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=169.254.2
.211,local_lock=none,addr=169.254.2.221)
 
Last edited:
Hi @npeca75

thanks for posting in the forum!

I am a little bit confused what your setup looks like, so to clarify:
Your nodes IP address is 169.254.2.211 in VLAN 255 and 192.168.254.211 in VLAN 1000
The problematic NFS share you are trying to mount is at 192.168.254.221 so in the subnet of VLAN 1000
Your mount for this share is
192.168.254.221:/mnt/backup2 on /mnt/pve/s1_vmbackups type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,fatal_neterrors=none,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=169.254.2.211,local_lock=none,addr=169.254.2.221)

If thats all correct the problem seems to be your clientaddr and addr parameters, which still point to the server in the subnet of VLAN 255.

Yours sincerely
Jonas
 
@bbgeek17 , @j.theisen

hi, sorry for late reply

ok, here is config
Code:
nfs: s1_vmbackups
        export /mnt/backup2
        path /mnt/pve/s1_vmbackups
        server 2a00:e90:ffe:51e::c0a8:fedd
        content backup
        prune-backups keep-all=1

nfs: s2_backups
        export /mnt/data/backup2
        path /mnt/pve/s2_backups
        server 2a00:e90:ffe:51e::c0a8:fede
        content backup
        prune-backups keep-all=1

nfs: s1_vmdisks
        export /mnt/vmdisks
        path /mnt/pve/s1_vmdisks
        server 192.168.254.221
        content images
        prune-backups keep-all=1

Code:
auto vlan1000
iface vlan1000 inet static
        vlan-raw-device vmbr0
        address 192.168.254.213/24
        gateway 192.168.254.1
        post-up sysctl -w net.ipv6.conf.$IFACE.autoconf=0
        post-up sysctl -w net.ipv6.conf.$IFACE.accept_ra=0
        post-up sysctl -w net.ipv4.conf.$IFACE.rp_filter=1

iface vlan1000 inet6 static
        address 2a00:e90:ffe:51e:169:254:2:213/64
        gateway 2a00:e90:ffe:51e::1
        autoconf 0
        accept_ra 0
        dhcp 0
        privext 0

Code:
[2a00:e90:ffe:51e::c0a8:fedd]:/mnt/backup2 on /mnt/pve/s1_vmbackups type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,fatal_neterrors=none,proto=tcp6,timeo=600,retrans=2,sec=sys,clientaddr=2a00:e90:ffe:51e:169:254:2:213,local_lock=none,addr=2a00:e90:ffe:51e::c0a8:fedd)
192.168.254.221:/mnt/vmdisks on /mnt/pve/s1_vmdisks type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,fatal_neterrors=none,proto=tcp6,timeo=600,retrans=2,sec=sys,clientaddr=2a00:e90:ffe:51e:169:254:2:213,local_lock=none,addr=2a00:e90:ffe:51e::c0a8:fedd)
[2a00:e90:ffe:51e::c0a8:fede]:/mnt/data/backup2 on /mnt/pve/s2_backups type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,fatal_neterrors=none,proto=tcp6,timeo=600,retrans=2,sec=sys,clientaddr=2a00:e90:ffe:51e:169:254:2:213,local_lock=none,addr=2a00:e90:ffe:51e::c0a8:fede)

so, this line is confusing
192.168.254.221:/mnt/vmdisks on /mnt/pve/s1_vmdisks type nfs4 ... proto=tcp6 ... clientaddr=2a00:e90:ffe:51e:169:254:2:213 .... addr=2a00:e90:ffe:51e::c0a8:fedd)

how could IPv4 share have tcp6 mount with IPv6 src/dst address ???