If automatic migration is not possible, is there at
least an efficient way to
*find* everything with special ceph attributes?
IIRC, you can still see all these attributes by querying for the
"ceph" xattr. Does that not work for you?
In case I misunderstand this part of your message, something like this
getfattr -d -m "ceph.*" dir
does not work any more, the xattribs are no longer discoverable. In addition, quota
settings were never discoverable. The earlier thread
https://lists.ceph.io/hyperkitty/list/ceph-users@ceph.io/message/3HWU4DITVD…
is about this.
Best regards,
=================
Frank Schilder
AIT Risø Campus
Bygning 109, rum S14
________________________________________
From: Gregory Farnum <gfarnum(a)redhat.com>
Sent: 26 March 2020 18:36
To: Frank Schilder
Cc: ceph-users
Subject: Re: [ceph-users] How to migrate ceph-xattribs?
On Thu, Mar 26, 2020 at 9:24 AM Frank Schilder <frans(a)dtu.dk> wrote:
De all,
we are in the process of migrating a ceph file system from a 2-pool layout (rep meta+ec
data) to the recently recommended 3-pool layout (rep meta, per primary data, ec data). As
part of this, we need to migrate any ceph xattribs set on files and directories. As these
are no longer discoverable, how would one go about this?
Special cases:
How to migrate quota settings?
How to migrate dir- and file-layouts?
Ideally, at least quota attributes should be transferable on the fly with tools like
rsync.
These are all policy decisions that seem pretty cluster-specific to
me. We hid them in the first place because exposing ceph xattrs to
rsync was breaking it horribly.
If automatic migration is not possible, is there
at least an efficient way to *find* everything with special ceph attributes?
IIRC, you can still see all these attributes by querying for the
"ceph" xattr. Does that not work for you?
We mainly turned them off to follow the existing conventions in the
kernel (see commit e09580b343aa in the Linux kernel). Doing otherwise
was causing xattr conformance tests to fail, and (like Greg mentioned)
that has always been problematic for backup programs.
I'm afraid I don't know of a workaround. The big issue is that
listxattr() itself doesn't do any filtering. You just get a dump of
names and have to filter them in userspace yourself. It also doesn't
help that xattrs aren't governed by any sort of standard so the rules
for all of this are quite vague.
Personally, I find xattrs to be a garbage interface for this sort of
thing, but we're sort of stuck with it at this point. One possibility
would be to add a well-known "meta" ceph xattr that lists the xattrs
that are not set to the defaults.
We could also start reporting them to listxattr() again, but that has
its own issues.
--
Jeff Layton <jlayton(a)redhat.com>