Bug 873467

Summary: rsync -pogAXtlHrDx tries to modify xattrs on bind mounted directories
Product: [Fedora] Fedora Reporter: Brian Lane <bcl>
Component: rsyncAssignee: Michal Luscon <mluscon>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: mluscon, ssorce, stephent98, vvitek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-08 15:10:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Brian Lane 2012-11-05 22:59:49 UTC
In the live install of Anaconda we use rsync to copy the install over to the target system. We bind mount /dev/ /proc/ /sys/ and a number of things under /dev/. When running rsync using -x (single file system) we get some errors:

17:48:50,259 INFO program: Running... rsync -pogAXtlHrDx /mnt/install/source/ /mnt/sysimage
17:48:51,536 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev"","security.selinux") failed: Permission denied (13)
17:48:51,538 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev/fd"","security.selinux") failed: Permission denied (13)
17:48:51,538 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev/full"","security.selinux") failed: Permission denied (13)
17:48:51,538 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev/null"","security.selinux") failed: Permission denied (13)
17:48:51,539 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev/ptmx"","security.selinux") failed: Permission denied (13)
17:48:51,539 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev/random"","security.selinux") failed: Permission denied (13)
17:48:51,539 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev/stderr"","security.selinux") failed: Permission denied (13)
17:48:51,540 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev/stdin"","security.selinux") failed: Permission denied (13)
17:48:51,540 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev/stdout"","security.selinux") failed: Permission denied (13)
17:48:51,540 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev/tty"","security.selinux") failed: Permission denied (13)
17:48:51,541 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev/urandom"","security.selinux") failed: Permission denied (13)
17:48:51,541 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev/vcsa"","security.selinux") failed: Permission denied (13)
17:48:51,541 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev/zero"","security.selinux") failed: Permission denied (13)
17:48:51,542 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev/pts"","security.selinux") failed: Operation not supported (95)
17:48:51,542 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/dev/shm"","security.selinux") failed: Permission denied (13)
17:48:58,245 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/proc"","security.selinux") failed: Operation not supported (95)
17:48:58,249 ERR program: rsync: rsync_xal_set: lremovexattr(""/mnt/sysimage/sys"","security.selinux") failed: Operation not supported (95)
17:51:47,024 ERR program: rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]

Adding these directories as --excludes works, but isn't it an error that -x doesn't skip them?

Comment 1 Michal Luscon 2013-02-08 15:10:37 UTC
This is know rsync issue caused by using stat() function for recognizing filesystem boundaries. Upstream advise to use excludes as you already did.