All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory Farnum <gfarnum@redhat.com>
To: Allen Samuels <Allen.Samuels@sandisk.com>
Cc: Sage Weil <sage@newdream.net>, Michael Wyraz <michael@wyraz.de>,
	"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: Problems with cephfs, rsync and xattr because cephfs internal xattrs are exposed to clients.
Date: Wed, 22 Jun 2016 13:15:59 -0700	[thread overview]
Message-ID: <CAJ4mKGazjjLN45XWB8n+Ft_mchgy=+DC6a0X_rg25aC2ea+uKQ@mail.gmail.com> (raw)
In-Reply-To: <CY1PR0201MB153287AC1F0E255401237EA6E82B0@CY1PR0201MB1532.namprd02.prod.outlook.com>

On Tue, Jun 21, 2016 at 3:30 PM, Allen Samuels
<Allen.Samuels@sandisk.com> wrote:
> I doubt that rsync is the only application that's going to be confused by the presence of attributes it doesn't understand.
>
> What is the value in having these attributes be visible to user-space applications? Is there a better mechanism for conveying this information?

This is something I think we've talked about before, and I keep on
being surprised to learn we *do* list them without a specific query.
So, what are the upsides of listing them without being asked?

*) Easier to view for users
*) If syncing between Ceph clusters with the same pool names, you can
transfer layouts properly (except...probably xattrs are set after data
is written in most systems, so that doesn't work?)
*) ...I've got nothing else

Downsides:
*) Other tools get very confused by viewing xattrs they can't set

Personally, I'd rather only list them when the Ceph namespace is
specifically queried (or the xattr itself is, at whatever granularity
we can do). This isn't like directory sizes; xattrs have defined
semantics that we're breaking, *and* exposing them all the time just
doesn't seem that useful. Why would anybody care about the data
they're sharing, who doesn't already know that it's available?
-Greg

>
> There's nothing to prevent having a debug-ish toggle to expose them when you really want to see them.
>
> Allen Samuels
> SanDisk |a Western Digital brand
> 2880 Junction Avenue, San Jose, CA 95134
> T: +1 408 801 7030| M: +1 408 780 6416
> allen.samuels@SanDisk.com
>
>
>> -----Original Message-----
>> From: ceph-devel-owner@vger.kernel.org [mailto:ceph-devel-
>> owner@vger.kernel.org] On Behalf Of Sage Weil
>> Sent: Tuesday, June 21, 2016 2:30 PM
>> To: Michael Wyraz <michael@wyraz.de>
>> Cc: ceph-devel@vger.kernel.org
>> Subject: Re: Problems with cephfs, rsync and xattr because cephfs internal
>> xattrs are exposed to clients.
>>
>> On Tue, 21 Jun 2016, Michael Wyraz wrote:
>> > Hi,
>> >
>> > I do rsync based backups against a cephfs. If I do sync xattrs, rsync
>> > tries to delete ceph-internal xattrs (e.g. ceph.dir.entries) which fails with an
>> error.
>> > xattrs does not get synchronized in this case.
>> > IMO the problem is, that ceph's internal attributes are exposed to the
>> > mounted fileystem (I can do "getfattr -n ceph.dir.entries *" on the
>> > mounted cephfs and get results). So rsync sees these xattrs and tries to
>> remove it.
>> >
>> > Example output:
>> >
>> >    rsync: rsync_xal_set:
>> >    lremovexattr(""/backups/2016-05-31_00-09-
>> 32/etc/acpi/events"","ceph.dir.entries")
>> >    failed: Operation not supported (95)
>> >    rsync: rsync_xal_set:
>> >    lremovexattr(""/backups/2016-05-31_00-09-
>> 32/etc/acpi/events"","ceph.dir.files")
>> >    failed: Operation not supported (95)
>> >    rsync: rsync_xal_set:
>> >    lremovexattr(""/backups/2016-05-31_00-09-
>> 32/etc/acpi/events"","ceph.dir.subdirs")
>> >    failed: Operation not supported (95)
>> >    rsync: rsync_xal_set:
>> >    lremovexattr(""/backups/2016-05-31_00-09-
>> 32/etc/acpi/events"","ceph.dir.rentries")
>> >    failed: Operation not supported (95)
>> >    rsync: rsync_xal_set:
>> >    lremovexattr(""/backups/2016-05-31_00-09-
>> 32/etc/acpi/events"","ceph.dir.rfiles")
>> >    failed: Operation not supported (95)
>> >    rsync: rsync_xal_set:
>> >    lremovexattr(""/backups/2016-05-31_00-09-
>> 32/etc/acpi/events"","ceph.dir.rsubdirs")
>> >    failed: Operation not supported (95)
>> >    rsync: rsync_xal_set:
>> >    lremovexattr(""/backups/2016-05-31_00-09-
>> 32/etc/acpi/events"","ceph.dir.rbytes")
>> >    failed: Operation not supported (95)
>> >    rsync: rsync_xal_set:
>> >    lremovexattr(""/backups/2016-05-31_00-09-
>> 32/etc/acpi/events"","ceph.dir.rctime")
>> >    failed: Operation not supported (95)
>>
>> I think the right fix here is to patch rsync to ignore ceph.* xattrs.
>> Does that seem reasonable?
>>
>> Other possible workarounds might be:
>>
>>  - ignore setxattr and removexattr requests on these xattrs (return success
>> but do nothing)
>>  - never show these xattrs in listxattr.  this makes them less useful or friendly
>> :(
>>
>> sage
>> --
>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the
>> body of a message to majordomo@vger.kernel.org More majordomo info at
>> http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-06-22 20:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21 20:34 Problems with cephfs, rsync and xattr because cephfs internal xattrs are exposed to clients Michael Wyraz
2016-06-21 21:30 ` Sage Weil
2016-06-21 22:30   ` Allen Samuels
2016-06-22  4:46     ` Michael Wyraz
2016-06-22 20:15     ` Gregory Farnum [this message]
2016-06-22 20:24       ` Allen Samuels
2016-06-24 10:08       ` John Spray
2016-06-24 12:27         ` Sage Weil
2016-06-24 13:53           ` Gregory Farnum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ4mKGazjjLN45XWB8n+Ft_mchgy=+DC6a0X_rg25aC2ea+uKQ@mail.gmail.com' \
    --to=gfarnum@redhat.com \
    --cc=Allen.Samuels@sandisk.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=michael@wyraz.de \
    --cc=sage@newdream.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.