Bug 496142

Summary: new mv xattr-preservation behavior can be very noisy ....
Product: [Fedora] Fedora Reporter: Eric Sandeen <esandeen>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: kdudka, ovasik, redhat-bugzilla, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 496143 (view as bug list) Environment:
Last Closed: 2009-04-17 13:48:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 496143    

Description Eric Sandeen 2009-04-16 20:23:51 UTC
In the latest coreutils it attempts to preserve xattrs, and it can lead to very noisy output if the target filesystem does not support xattrs (or, perhaps, does not support selinux xattrs):

root@inode tmp]# mv newdir/ mnt/
mv: setting attributes for `mnt/newdir/file58': Operation not supported
mv: setting attributes for `mnt/newdir/file85': Operation not supported
mv: setting attributes for `mnt/newdir/file68': Operation not supported
mv: setting attributes for `mnt/newdir/file74': Operation not supported
mv: setting attributes for `mnt/newdir/file1': Operation not supported
mv: setting attributes for `mnt/newdir/file69': Operation not supported
mv: setting attributes for `mnt/newdir/file95': Operation not supported
mv: setting attributes for `mnt/newdir/file42': Operation not supported
mv: setting attributes for `mnt/newdir/file77': Operation not supported
mv: setting attributes for `mnt/newdir/file44': Operation not supported
mv: setting attributes for `mnt/newdir/file38': Operation not supported
mv: setting attributes for `mnt/newdir/file36': Operation not supported
mv: setting attributes for `mnt/newdir/file31': Operation not supported
mv: setting attributes for `mnt/newdir/file25': Operation not supported
mv: setting attributes for `mnt/newdir/file57': Operation not supported
mv: setting attributes for `mnt/newdir/file32': Operation not supported
mv: setting attributes for `mnt/newdir/file100': Operation not supported
mv: setting attributes for `mnt/newdir/file89': Operation not supported
.....
mv: setting attributes for `mnt/newdir/file96': Operation not supported
mv: setting attributes for `mnt/newdir': Operation not supported
[root@inode tmp]#

This would happen when copying to a filesystem that does not support selinux, or does not support xattrs - fat, cifs, nfs, mounts with selinux contexts ...

mv /home/myphotos /mnt/vfat-usbstick for example would probably trigger this.

I'm not sure it's worth issuing a warning for every file if the target doesn't support the thing mv is trying to preserve.  For that matter maybe mv should stop trying after the first EOPNOTSUPP?

Thanks,
-Eric

Comment 1 Ondrej Vasik 2009-04-17 08:39:06 UTC
Thanks for report, as there is already a way to silent error messages from xattr's preserving (done for cp -a), it could be easily used for mv as well... will do that...

Comment 2 Ondrej Vasik 2009-04-17 13:48:20 UTC
Reported upstream, patch which fixes the issue via reduce_diagnostics (comment#1) was rejected, I proposed another patch which should behave the same way as already accepted SELinux diagnostic suppresing (not showing them for ENOTSUP and ENODATA errors), waiting for review. Anyway built with it in Rawhide as coreutils-7.2-2.fc12, closing RAWHIDE - as this message spam is unacceptable and has to be solved somehow.

Comment 3 Eric Sandeen 2009-04-17 13:57:44 UTC
Thanks.  If this exists in F11, is it worth trying to get an exception to make the change there post-freeze?

-Eric

Comment 4 Ondrej Vasik 2009-04-17 14:09:48 UTC
Will see on Monday - if accepted that way, it's small change and maybe could be fixed/tagged for F-11 final - or at least done via 0day update

Comment 5 Eric Sandeen 2009-04-17 15:07:15 UTC
Thanks, yep 0day is probably fine too.