backup data of my VM NFS

vesuvienne

Member
Jun 7, 2024
82
3
8
Hi team
i'm struggling to connect my node & my VM on vlan
they can't ping each other: i want to have 1 VM NFS server(on vlan 20) and add nfs in my datacenter->storage->>add NFS,(server NFS on vlan)

- i'm using SDN vlan
- vmbr0 is VLAN aware
- my switch have vlan tag
i have no idea how to do it

if someone can help, Thx!
 
I will not ask why you want to mount an NFS share of a VM in PVE... :)

A bit more information would be helpful.
  • What is the IP address and subnet of your PVE node?
  • What is the IP address and subnet of your VM?
  • Please run this command on your node and post the output: cat /etc/network/interfaces
Cheers
 
Is not recommended to have NFS on VM ? should i install directly on proxmox node? i do that because i don't want to dedicated 1 computer only for nfs ( sry you have touch my curiosity...)
PVE node IP: 192.168.1.24
VM nfs vlan IP: 192.168.20.110

Code:
auto lo
iface lo inet loopback

iface enp1s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.1.24/24
        gateway 192.168.1.254
        bridge-ports enp1s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094
source /etc/network/interfaces.d/*

my sdn: /etc/network/interfaces.d/sdn
Code:
auto Vlan20
iface Vlan20
        bridge_ports vmbr0.20
        bridge_stp off
        bridge_fd 0
        alias Vlan20
 
  • Like
Reactions: weehooey-bh
Is not recommended to have NFS on VM ? should i install directly on proxmox node? i do that because i don't want to dedicated 1 computer only for nfs ( sry you have touch my curiosity...)

It is okay to have NFS on a VM.

I am not sure what you want to achieve with NFS on the VM and adding it as PVE storage.

The VM's storage is on the PVE host. I would assume the storage drives in your PVE host. You then share that storage back with the PVE host.

Once you have shared it back with the PVE host, what will you do with it? PVE storage has one of these purposes:
  • Storage for VM drives
  • Storage for LXC drives
  • Backup files
  • ISO images
  • Container templates
  • Snippets
The PVE host can do all these things without sharing its own storage through a VM and over the network.

So, I assume there is a better way to do what you are trying to do. But, you may have a plan that needs this, so I was going to help you get to where you are going. :)

PVE node IP: 192.168.1.24
VM nfs vlan IP: 192.168.20.110

Your PVE node has a gateway of 192.168.1.254. What is your gateway on VLAN 20? Is it 192.168.20.254?

Is 192.168.1.254 and 192.168.20.254 the same router? Is it a firewall too? If so, you need to allow the traffic from one subnet to the other.
 
my point is to share data between VM with NFS and have a backup of this data, if you have any advice
To share data between VMs does not require it to be added as storage in PVE.

If the VMs are on the same VLAN, you can just share it directly as if they were physical servers on the same subnet.
 
Your PVE node has a gateway of 192.168.1.254. What is your gateway on VLAN 20? Is it 192.168.20.254?
exactly
Is 192.168.1.254 and 192.168.20.254 the same router? Is it a firewall too? If so, you need to allow the traffic from one subnet to the other.
* same physical switch with vlan
* no firewall
If the VMs are on the same VLAN, you can just share it directly as if they were physical servers on the same subnet.
this is what i did it work flawless
i'm a bit lost, i'm wondering how can i make a backup of the data i use in the VM NFS? (do i need to do it manually? mount my second disk into my VM NFS and do a backup?)
1719390593156.png
If possible the best would be to share VM backup & data backup to my cluster
1719392343669.png
 
Last edited:
same physical switch with vlan

Is this a layer 3 switch? Getting from 192.168.1.0/24 to 192.168.20.0/24 needs a router.

i'm a bit lost, i'm wondering how can i make a backup of the data i use in the VM NFS? (do i need to do it manually? mount my second disk into my VM NFS and do a backup?)

There are a lot of options to do backups depending on what you want to achieve. There is a backup built into PVE. You can backup the whole VM.
 
  • Like
Reactions: vesuvienne
There are a lot of options to do backups depending on what you want to achieve. There is a backup built into PVE. You can backup the whole VM.
Backup are only for node right, i can't share it over my cluster, there is a way to share VM backup over the cluster

I have only 2 nodes so no HA
- i need 1 primary node
- 1 emergency node
1719393950129.png
 
Backup are only for node right, i can't share it over my cluster, there is a way to share VM backup over the cluster

I have only 2 nodes so no HA
- i need 1 primary node
- 1 emergency node
View attachment 70401

This should be a new post. Your original post was about network connectivity. This is about backups.

Backup are only for node right

No, PVE backups are for the VMs and LXCs.

You might want to run a Proxmox Backup Server as a guest on Host 2.

Alternatively, use something like rclone as a cronjob to sync the data.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!