Jump to content

Getting lsetxattr and space errors using rsync with some files that have extended attributes


Recommended Posts

using rsync to backup iMac to unraid.

 

Updated the rsync version on the Mac so it is identical with the version on the unraid server:
On MacOS: rsync  version 3.2.7  protocol version 31 - Sonoma 14.1.2
On Unraid:  rsync  version 3.2.7  protocol version 31 - Linux #1 SMP PREEMPT_DYNAMIC Wed Nov 29 12:48:16 PST 2023

 

After starting the rsync job on the Mac
 

# sudo rsync -M--fake-super -rlatgoDiv --force -h --fake-super --iconv=utf-8-mac,utf-8 --acls --stats -X -q -v -P --perms --inplace --remote-option=--log-file=/mnt/user/backup-clients/log/rsyncd-daily.log --include-from=rsync_include_daily.txt --exclude-from=rsync_imac_exclude.txt --log-file-format='%m %B %U %G %o %8l %n' --log-file=rsyncd-daily-on-macos.log /* / [email protected]:/mnt/user/backup-clients/Backup_iMac_Daily

 

suddenly a lot of errors are noted in the log:

Quote

rsync: [receiver] rsync_xal_set: lsetxattr("/mnt/user/backup-clients/Backup_iMac_Daily/Users/testuser/Library/Containers/jp.co.canon.ij.pesp.esplaunchagent","user.com.apple.data-container-personality") failed: Argument list too long (7)

 

and

Quote

rsync: [receiver] rsync_xal_set: lsetxattr("/mnt/user/backup-clients/Backup_iMac_Daily/Users/testuser/Library/Parallels/Applications Menus/{4213ed9c-93c1-4138-b98f-4cb03a98df9e} Applications Menu.localized/Elaborate Bytes/VirtualCloneDrive/Virtual CloneDrive Revision History ","user.com.apple.ResourceFork") failed: No space left on device (28)

 

both are nonsense ...

 

 


When checked extended attribute on macOS:

$ xattr -l /Users/testuser/Library/Containers/jp.co.canon.ij.pesp.esplaunchagent
com.apple.FinderInfo:
com.apple.containermanager.identifier: jp.co.canon.ij.pesp.esplaunchagent
com.apple.containermanager.schema-version: 44
com.apple.containermanager.uuid: 13090346-5FB4-4E22-B6EB-83030C9FD044
com.apple.data-container-personality: bplist00?

 

Same on Unraid after running rsync job

# getfattr -d /mnt/user/backup-clients/Backup_iMac_Daily/Users/testuser/Library/Containers/jp.co.canon.ij.pesp.esplaunchagent
getfattr: Removing leading '/' from absolute path names
# file: mnt/user/backup-clients/Backup_iMac_Daily/Users/testuser/Library/Containers/jp.co.canon.ij.pesp.esplaunchagent
user.com.apple.FinderInfo=0sAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
user.com.apple.containermanager.identifier="jp.co.canon.ij.pesp.esplaunchagent"
user.com.apple.containermanager.schema-version="44"
user.com.apple.containermanager.uuid="13090346-5FB4-4E22-B6EB-83030C9FD044

 

The extended  attribute com.apple.data-container-personality and it’s value “bplist00?“ actually missing
 
When storing this attribute manually on the Unraid server via

# setfattr -n "user.com.apple.data-container-personality" -v 'bplist00?' /mnt/user/backup-clients/Backup_iMac_Daily/Users/testuser/Library/Containers/jp.co.canon.ij.pesp.esplaunchagent

 

and check the same file again:
 

# getfattr -d /mnt/user/backup-clients/Backup_iMac_Daily/Users/testuser/Library/Containers/jp.co.canon.ij.pesp.esplaunchagent
getfattr: Removing leading '/' from absolute path names
# file: mnt/user/backup-clients/Backup_iMac_Daily/Users/testuser/Library/Containers/jp.co.canon.ij.pesp.esplaunchagent
user.com.apple.FinderInfo=0sAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
user.com.apple.containermanager.identifier="jp.co.canon.ij.pesp.esplaunchagent"
user.com.apple.containermanager.schema-version="44"
user.com.apple.containermanager.uuid="13090346-5FB4-4E22-B6EB-83030C9FD044"
user.com.apple.data-container-personality="bplist00?"

 

—> all fine. That means that the BTRFS can store this extended attributes.

So what could be the reason that this is not done by rsync during the backup ?

 

 

Because the error „.. no space left on device“ is noted in the same log :

# mount
shfs on /mnt/user type fuse.shfs (rw,nosuid,nodev,noatime,user_id=0,group_id=0,default_permissions,allow_other)

which is a raid of 7 disks and formatted with btrfs.

 

# df -h /mnt/user
Filesystem      Size  Used Avail Use% Mounted on
shfs             84T   28T   57T  34% /mnt/us

 

# df -ih /mnt/user
Filesystem     Inodes IUsed IFree IUse% Mounted on
shfs                0     0     0     - /mnt/user

 

So enough space incl for inodes are availible.

No quota installed.

 

Any help is appreciated !

Edited by Goulasch
Link to comment
  • Goulasch changed the title to Getting lsetxattr and space errors using rsync with some files that have extended attributes

Points I noted:

 

  • you have not set the MinimumFree Space setting for the ‘cache’ pool.    This means if it fills up you will start getting ‘out of space errors’.    This should be set to something like twice the size of the largest file you expect to write.   Not sure if you encountered this at any point.
  • in a similar vein you should set the Minium Free Space setting for each User Share to set the condition for switching to another array drive.    Probably not going to impact you until the drives start getting close to full.
  • there were lots of panic’s in the syslog that appear to be samba related.   No idea of the cause.
  • you have quite a few .cfg files in the config/shares folder on the flash drive that relate to shares you no longer have.   A good idea to remove superfluous ones to tidy up the diagnostics.

None of these, however, seem to explain all your symptoms so not sure what to suggest. 

Link to comment
Quote

you have not set the MinimumFree Space setting for the ‘cache’ pool.    This means if it fills up you will start getting ‘out of space errors’.    This should be set to something like twice the size of the largest file you expect to write.   Not sure if you encountered this at any point.

you mean the 1st attached screenshot ? I never received "out of space" errors.

 

Quote

in a similar vein you should set the Minium Free Space setting for each User Share to set the condition for switching to another array drive.    Probably not going to impact you until the drives start getting close to full.

like screenshot #2 or for every disk ?

On this share you can see that distribution should be made to the assigned disks 2,3,4,7 taking the free storage space into account "Allocation method: Most-free".

Strangely,

disk 2 is 95% full,

disk 3 is 11% full

disk 4 is 11%  full

disk 7 is 40% full.

This memory allocation is actually incorrect. I don't think it could have anything to do with the cache setting, right ?

 

Quote

there were lots of panic’s in the syslog that appear to be samba related.   No idea of the cause.

Maybe another specialist can take a look at it?

 

 

Quote

None of these, however, seem to explain all your symptoms so not sure what to suggest. 

There must be more users who back up macOS data with extended attributes on unraid (also with rsync) ?!

Don't they all have any problems?

 

Unraid cache disk.png

Unraid, user share.png

Link to comment

Because using the rsync-daemon on unraid produces the same failures, I checked this problem by using

an unassigned XFS formatted disk + rsync --> no problem --> all extended attributes were copied.

Same disk formatted with btrfs --> error: rsync_xal_set: lsetxattr...

 

Searching for "btrfs lsetxattr" produces a lot of discussions about this problem - most of them are older.

But there are indications that this is a BTRS problem (maybe in combination with the kernel ?).

Here is a link for a work-around on SELinux.

 

As a user, I cannot solve such a problem. But perhaps the developers at unraid can take a closer look and give feedback here ?

 

Any help is appreciated !

 

Edited by Goulasch
Link to comment
  • 2 weeks later...

I didn't find a solution.

Therefore I have to switch my raid to XFS or ZFS. What would be the recommendation?

 

Size of the raid is 92 TB - filled with 32 TB - splitted over 7 disks.

 

Any trick to save the data from raid, format the disks and restore the data ?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...