On Sun, Jan 10, 2021 at 4:39 PM Matthew Miller <mat...@fedoraproject.org> wrote:
>
> On Sun, Jan 10, 2021 at 11:09:31PM +0000, Patrick O'Callaghan wrote:
> > > It's not possible to set this attribute once a file has data in it, it's
> > > not retroactive. You'll need to duplicate the file, in that same 
> > > directory.
> > > Because the directory has the attribute now, the duplicate will inherit 
> > > the
> > > attribute.
> >
> > That's somewhat painful as the file is over 900GB and will need to be
> > copied to another drive and then back again, but thanks anyway.
>
> Can you use `cp --reflink=always`?

No, it will fail.

A reflink copy creates shared extents. It can't change them between
datacow and nodatacow. Whatever they are in the source, datacow or
nodatacow, they must be in the copy.

If the +C attribute is set on the enclosing directory, and the file
being copied is datacow - there's a mismatch. A cp operation requires
a conventional copy in this case, to create the nodatacow extents. But
with --reflink=always, the conversion is disallowed, so the cp will
fail.

This applies to both directions, so it's datacow<-->nodatacow, is a
conventional copy operation. It also means as long as you aren't
switching between them, you automatically get a reflink copy because
the default on Fedora 33 is cp --reflink=auto, i.e. it'll try to
reflink copy if it can, and if it can't it'll fall back to a
conventional copy.

-- 
Chris Murphy
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to