nfs and btrfs get error

hi

i mount nfs drive with this line
192.168.31.115:/volume1/NetBackup /mnt/nfs/nas nfs noauto,nfsvers=4.1 0 0

this drive is formatted in btrfs

that work fine

when i tried to save

sudo btrfs send /.snapshots/root-2022-09-16 | sudo btrfs receive /mnt/nfs/nas/test 

At subvol /.snapshots/root-2022-09-16
ERROR: /mnt/nfs/nas/test doesn’t belong to btrfs mount point

it’s like drive is not see like a btrfs mount point

my nas use nfs version 4.1

i have nothing in /etc/exports

thanks

I don’t believe it’s possible for an NFS export to exist without being included in /etc/exports, nor for the filesystem type on the server to be exposed to the client.

This is not a recommended procedure. Enable password-less login and send to a remote ssh: https://forums.opensuse.org/showthread.php/575437-backup-btrfs?p=3159349#post3159349

See also [Use btrbk for remote backup solution with btrfs | amedeos home

https://linuxize.com/post/how-to-setup-passwordless-ssh-login/](Use btrbk for remote backup solution with btrfs | amedeos home)
](Use btrbk for remote backup solution with btrfs | amedeos home)

Assuming that that is a line in /etc/fstab (which you do not say, but we, poor potential helpers are sentenced to trying to help on the base of guesses:( ), that looks syntactical OK.

You probably mean that on the NFS server, the directory /volume1/NetBackup is part of a Btrfs file system. That is fine, but not very important IMO.

Hurray!

I do not know much about Btrfs and thus about the btrfs commands you use here. But I doubt very much that a btrfs receive (or any other btrfs task) can be done on an NFS file system. On your client it is only an NFS file system and has no knowledge about the original file system on the server.

This I do not understand. Which “drive”? And what should a “drive” be able to "see.

That is nice to know, but not very important because you say “it works” and thus it is proven that NFS client and server can talk to each other very well.

That is strange, because then the server will not “serve” anything NFS.

This getting a bit difficult, but please do not tell only, but show. E.g. one does not say "I have nothing in /etc/exports, but one shows the computer evidence with e.g.

cat /etc/exports

Copy/paste that complete: with the prompt/command line (so we can see if a command is from the server or the client), all output (unchanged and complete), and the new prompt line (so we can see it is complete, even if there is no output. Only so people here will trust the information given.
This is only an example, but the same is for your /etc/fstab. Post the cat (or the grep) command, the output, etc. Only so can other see what you did, as what user, on what system and what the results of that action is.

cat /etc/fstab    
UUID=63b88ee6-c1fd-44eb-8765-749c256d9988  /                       btrfs  defaults                      0  0 
UUID=63b88ee6-c1fd-44eb-8765-749c256d9988  /var                    btrfs  subvol=/@/var                 0  0 
UUID=63b88ee6-c1fd-44eb-8765-749c256d9988  /usr/local              btrfs  subvol=/@/usr/local           0  0 
UUID=63b88ee6-c1fd-44eb-8765-749c256d9988  /srv                    btrfs  subvol=/@/srv                 0  0 
UUID=63b88ee6-c1fd-44eb-8765-749c256d9988  /root                   btrfs  subvol=/@/root                0  0 
UUID=63b88ee6-c1fd-44eb-8765-749c256d9988  /opt                    btrfs  subvol=/@/opt                 0  0 
UUID=63b88ee6-c1fd-44eb-8765-749c256d9988  /home                   btrfs  subvol=/@/home                0  0 
UUID=63b88ee6-c1fd-44eb-8765-749c256d9988  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0 
UUID=63b88ee6-c1fd-44eb-8765-749c256d9988  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0 
UUID=5A33-A688                             /boot/efi               vfat   utf8                          0  2 
UUID=63b88ee6-c1fd-44eb-8765-749c256d9988  /.snapshots             btrfs  subvol=/@/.snapshots          0  0 
UUID=f1bdcb94-c0cf-494d-ae0d-3a80b9eb1296  swap                    swap   defaults                      0  0 
192.168.31.115:/volume1/NetBackup          /mnt/nfs/nas            nfs    noauto,nfsvers=4.1            0  0

for exports

cat /etc/exports 
# See the exports(5) manpage for a description of the syntax of this file. 
# This file contains a list of all directories that are to be exported to  
# other computers via NFS (Network File System). 
# This file used by rpc.nfsd and rpc.mountd. See their manpages for details 
# on how make changes in this file effective.



i used yast client to generate nfs config

so it’s yast who have generated entry in fstab don’t create an entry in /etc/exports

on the contrary it is very important, source and destination must be btrfs format otherwise that will not work

without too much info on the web there are people who seem to have done it

  		 				it's like drive is not see like a btrfs mount point

i mean btrfs receive need to know the destination use btrfs

That is nice to know, but not very important because you say “it works” and thus it is proven that NFS client and server can talk to each other very well.

You are still missing things (either my English is not good enough, or you do not read properly).

I asked you to post including the prompt. Now we can still not see the difference between postings from the server and postings from the client.

I get the strong idea that you post your cat /etc/exports from the NFS client. And that is of course empty, because /etc/exports is the configuration file of an NFS server!

on the contrary it is very important, source and destination must be btrfs format otherwise that will not work

You still seem not to understand that you are trying to send something from a Btrfs file system to it being received a NFS file system.
An NFS file system is NOT a Btrfs file system.

Re-read this (your own configuration) where I have emphasized an important point:

192.168.31.115:/volume1/NetBackup          /mnt/nfs/nas            **nfs**    noauto,nfsvers=4.1            0  0

The file system mounted on /mnt/nfsw/nas is an NFS file system. Not Btfs.

I think this is your major point of misunderstanding.

It is also what your error message says.

BTRFS-RECEIVE(8)                                                                                                  BTRFS                       
**NAME**
       btrfs-receive - receive subvolumes from send stream 

**SYNOPSIS**
       **btrfs receive **[options] <path>

Required argument must be a mounted BTRFS.

From: SLES 15 SP4 | Storage Administration Guide | Overview of file systems in Linux

Tip: Sending to a remote target side

To send the snapshots to a remote machine, use SSH:

btrfs send /data/bkp_data | ssh root@jupiter.example.com 'btrfs receive /backup'