btrfs-progs icon indicating copy to clipboard operation
btrfs-progs copied to clipboard

send/receive – lremovexattr security.capability failed: No data available – empty stream

Open leszekdubiel opened this issue 1 year ago • 4 comments

Short description

I get errors:

ERROR: lremovexattr  some-file-here   security.capability failed: No data available
ERROR: empty stream is not considered valid
root@star#   uname -a
Linux star 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux

root@star#   # btrfs --version 
btrfs-progs v6.1.3 

root@star#   cat /etc/issue
Debian GNU/Linux 11 \n \l

Longer description

There is original server "alfa" with data in Btrfs filesystem organized like this:

 /data          <--- here I keep user data 
 /snaps        <--- here I make snapshots of data 
     /100              
     /101
     /102 

On server "alfa" I create snapshots 100, 101, 102 and so on using such a command:

root@alfa#   btrfs subvol snapshot  data  snaps/103

There is a backup server "beta" that imports data by sending and receiving, for example:

root@beta#   ssh  alfa    "btrfs send -p /snaps/102 /snaps/103"   |   btrfs receive ./copies/

on "beta" structure is like this:

/snaps
     /101
    /102
    /103 

There is another server "star" (off site, 50 km away from company) that imports data. When I connect to server "beta" and do like this:

root@star#     ssh   beta    "btrfs send -p /snaps/102 /snaps/103"   |   btrfs receive /snaps/

I get errors:

ERROR: lremovexattr  some-file-here   security.capability failed: No data available
ERROR: empty stream is not considered valid

If I connect to "alfa" instead of beta:

root@star#     ssh   alfa    "btrfs send -p /snaps/102 /snaps/103"   |   btrfs receive /snaps/

everything works ok.

Different info I found here: https://github.com/digint/btrbk/issues/160

  1. I don't know how to track that issue more to give more details.
  2. send/receive alfa->star works always good, and send/receive beta->star fails very often

leszekdubiel avatar Apr 06 '23 20:04 leszekdubiel

More info.

root@alfa# getcap /snaps/105/some-file-here

root@star# getcap /snaps/105/some-file-here
/snaps/105/some-file-here   cap_net_raw=ep

On server "alfa" getcap prints no result. On remote servers "beta" or "star" there is "cap_net_raw=ep".

On remote servers "cap_net_raw=ep" is set for some files during send --> receive process.

leszekdubiel avatar Apr 23 '23 16:04 leszekdubiel

Debian stable. Error is still there.

# btrfs --version 
btrfs-progs v6.2

# cat /etc/issue
Debian GNU/Linux 12 \n \l

Temporary solution -- change erorr to warning:

cmds/receive.c
	868,869c868,869
	< 		ret = -errno;
	< 		error("lremovexattr %s %s failed: %m", path, name);
	---
	> 		ret = 0; 
	> 		warning("leszek 2023-12-17: lremovexattr %s %s failed: %m", path, name);

After this patch backup works normally, prints warnings.

Checked subvolumes with rsync -avixc — are exactly the same.

leszekdubiel avatar Dec 17 '23 16:12 leszekdubiel

@leszekdubiel

btrfs --version btrfs-progs v6.2

I suggest you try static build v6.6.3 from the releases page. It does not need installation and should work on all x86_64/amd64 machines.

Forza-tng avatar Dec 17 '23 22:12 Forza-tng

I have put v6.6.3. Didn't help unfortunatelly.


ERROR: lremovexattr root/Omega/Domains/Zakupy/Folders/ZK_85142/Documents/IMG_1430.JPG security.capability failed: No data available



# getcap "/mnt/sde3/orion_snaps/2023-12-04 23:54:01 908003686"/root/Omega/Domains/Zakupy/Folders/ZK_85142/Documents/IMG_1430.JPG

/mnt/sde3/orion_snaps/2023-12-04 23:54:01 908003686/root/Omega/Domains/Zakupy/Folders/ZK_85142/Documents/IMG_1430.JPG cap_net_raw=ep



# ls -l "/mnt/sde3/orion_snaps/2023-12-04 23:54:01 908003686"/root/Omega/Domains/Zakupy/Folders/ZK_85142/Documents/IMG_1430.JPG

-rwxrwxr-x 1 1045 1031 3010166 2023-04-05  '/mnt/sde3/orion_snaps/2023-12-04 23:54:01 908003686/root/Omega/Domains/Zakupy/Folders/ZK_85142/Documents/IMG_1430.JPG'


# btrfs --version 
btrfs-progs v6.6.3


# ls -lt /usr/bin/btrfs
-rwxr-xr-x 1 root root 2749872 12-19 13:15 /usr/bin/btrfs

leszekdubiel avatar Dec 26 '23 17:12 leszekdubiel