Ubuntu cp -p on mounted ZFS pool

Solution 1:

Solution: Disable ACL fabrication

It because of the extra ACL permissions

See & Upvote: https://superuser.com/questions/198758/what-does-the-mean-in-the-acl-output-of-ls-l

You get "preserving permissions for some: Operation not supported" when you cp -p from an NFS mount that has the extra ACL (ls -l shows +'s) to something like /tmp which does not support the extra permissions.

To fix this you first need to make your NFS server stop adding the extra permissions to new files. On a OpenSolaris or OpenIndiana ZFS box you can do it like this:

zfs get sharenfs myzpool1
zfs set sharenfs=XXX myzool1

but instead of XXX put what you had before and add ",noaclfab" (see man share_nfs)

You can also remove these extra ACLs for existing files:

apt-get install acl
setfacl -b test.sh

Recursively:

find . -exec setfacl -b {} \;

To fix this on the client side, you can update these lines in /etc/sysconfig/autofs:

APPEND_OPTIONS="yes"
OPTIONS="--global-options nosuid,noacl,vers=3,retry=5000”

The "noacl" keyword is the relevant part, the other options are probably not required to work around this specific issue, but they are things to consider.

Solution 2:

The -p option preserves several different types of file attributes, such as ownership, time, etc., and if any one of those was not properly preserved or had to undergo some sort of potentially lossy transformation then you might see that error. It's very possible that you were also perhaps indirectly instructing the process to preserve attributes (such as xattrs or acls) that you paid no attention to and contained no meaningful data.

The bottom line is that if it preserves the attributes you're interested in, then don't worry.