ZFS File flag defaults on ZFS

Hi! Running 12.1 and decided to try out ZFS for the first time. Followed the handbook and some forum posts and all OK.

But when I try to move a directory from a ZFS filesystem to an NFS filesystem, I get:

Code:
% mkdir foo
% mv foo /backup
mv: chflags: /backup/foo: Operation not supported
mv: /bin/cp foo /backup/foo: terminated with 1 (non-zero) status
% chflags nouarch foo
% mv foo /backup
%

So the problem appears to be because the "uarch" flag is set on all files on the ZFS filesystem. Is this the default on ZFS or have I misconfigured something? Don't have this problem with UFS.

Is is possible to disable this flag being set by default or is there something else going on? Thanks!
 
This is expected, and is a consequence of moving files across different types of file systems. ZFS sets the uarch flag following any change to the file, UFS doesn't. The NFS mount likely doesn't support flags at all. Moving across filesystems is equivalent to "cp -pRP source destination" followed by "rm -rf source", so you may as well do something similar, perhaps using another tool like pax/tar/rsync.
 
Thanks for your reply. Moving a file works (mv does the copy itself and ignores the loss of uarch) so I can even "mv *" in a directory and it will work, but as you say, moving a directory invokes cp and an error results.

I understand why it's happening but it's pretty annoying that you can't move a directory from a ZFS filesystem to an NFS mount (at least without chflags -R). I was hoping there might be a ZFS setting to disable or set the default flags.
 
Back
Top