Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dcp: copy lustre striping params, even if -p not thrown #49

Open
adammoody opened this issue Apr 2, 2017 · 12 comments
Open

dcp: copy lustre striping params, even if -p not thrown #49

adammoody opened this issue Apr 2, 2017 · 12 comments
Assignees
Milestone

Comments

@adammoody
Copy link
Member

Currently we only copy lustre stripe params if user adds -p, but it's likely they want this, even if they don't want to update timestamps and permissions. Enable lustre striping by default.

@adammoody adammoody self-assigned this Apr 2, 2017
@adammoody adammoody added this to the v0.9 milestone Aug 30, 2018
@gonsie gonsie assigned dsikich and unassigned adammoody Dec 13, 2018
@thiell
Copy link

thiell commented Jul 26, 2019

Hmm, we are not very fond of this idea. Our users are using dcp between different Lustre filesystems, with different versions or different features, and we don't always want lustre striping params (lustre.lov) to be copied over. A real case example is that we have a scratch filesystem (1) with both DoM and PFL enabled, and a longer-term Lustre filesystem (2) with traditional striping( without DoM nor PFL), and when copying from (1) to (2), dcp -p generates a LOT of warnings (EINVAL -22) in that case.

The best for us would be an option separate from -p to enable/disable the copy of the Lustre striping info.

@thiell
Copy link

thiell commented Jul 26, 2019

... also when copying from (2) to (1) we don't want to copy the traditional striping info over, indeed we much prefer that DoM and PFL do their job on filesystem (1). I hope this makes sense. If at all possible, we would actually prefer to disable copying of all striping info with dcp, but still allow users to use -p to preserve permissions and ACLs. Thanks!

@adammoody
Copy link
Member Author

adammoody commented Jul 29, 2019

Thanks for your suggestions and use cases @thiell . We should probably explode this ticket into 3 parts:

  1. We can look into splitting -p into sub-options so that one can select whether to copy timestamps, groups, permissions, and xattrs independently.

  2. As Lustre piggybacks its striping info in xattrs, it would also be nice to have a way to copy xattrs but optionally exclude Lustre attributes.

  3. It would be useful to be able to specify Lustre striping parameters via options, like we do in dstripe.

@adilger , thought I'd ping you for your input, too. If we add options to specify Lustre striping parameters, perhaps we should consider how we'd want to construct a syntax for progressive striping.

@adilger
Copy link
Contributor

adilger commented Jul 29, 2019

Stephane, it is understandable that you would want the target layout to be based on the capabilities of the destination filesystem. In the case of DoM+PFL source to non-PFL destination, the layout parameters should be based on the "plain" layout parameters (stripe_size, stripe_count) of the last component of the file. These are essentially the "best" layout parameters for the particular file, given its current size.

What is interesting is that on the reverse operation (copy from non-PFL/DoM source to PFL+DoM target), I would argue that the same is true, that you would want to keep the "plain" layout parameters for the file rather than use the full PFL layout. The reason is that PFL layouts are a compromise based on the lack of information about size and usage at the time the file is first created, typically picking DoM and/or a small stripe_count for small files to minimize overhead, and a large stripe_count (and maybe a larger stripe_size) for large files to maximize throughput and balance space usage.

If we know the file size at the time it is being migrated, then why would we add the extra overhead of a few stripes + DoM for a few MiB at the start of the file, when the file is already known to be large and should be widely striped? My thought has always been that in the case of data migration (either between filesystems or within them) it makes sense to use a plain layout, and drop the DoM component of the file, for the target file. This should result in slightly better performance (fewer objects for the target file), and also reduce space usage on the MDT for the first MiB(s) that do not really improve performance on a multi-GiB file.

@thiell
Copy link

thiell commented Jul 29, 2019

This makes sense @adilger. I agree with you for files that have properly been striped in the first place (on the source filesystem). Those are usually files that have been properly striped by the user or a Lustre-aware application. But in my experience, it's not the majority. What if we were able to distinguish between default striping and custom striping? In that case, it would make sense to preserve the custom striping, assuming it's already the best one. But for files with the filesystem default striping, in most case you would not want it to be preserved, because why would it be better than the target layout? But I'm not sure it's easily doable as of today though.

@thiell
Copy link

thiell commented Aug 2, 2019

Ah, we totally forgot about /etc/xattr.conf and just remember this [1]. It's useful and works well with mv. I'm not sure in which case exactly (and officially) this file should be used but perhaps a simple solution would be that mpifileutils check for this xattr.conf config file too?

Example of error from fir (2.12 with DoM/PFL) to oak (2.10 with plain layout)

$ cat /etc/xattr.conf 
lustre.lov  skip

$ dcp -p sh-06-34 $OAK/sthiell/
[2019-08-02T16:46:40] [0] [dcp.c:1218] Preserving file attributes.
...
[2019-08-02T16:46:40] [0] [common.c:250] Failed to set value for name=lustre.lov on /oak/stanford/groups/ruthm/sthiell/sh-06-34 llistxattr() errno=22 Invalid argument
...
[2019-08-02T16:46:40] [0] [common.c:250] Failed to set value for name=lustre.lov on /oak/stanford/groups/ruthm/sthiell/sh-06-34/linux-4.20.5.tar.xz llistxattr() errno=22 Invalid argument
...

[1] https://groups.google.com/d/msg/lustre-discuss-list/WWKPrgWlKJQ/IIirSrVv67cJ

@adilger
Copy link
Contributor

adilger commented Aug 3, 2019 via email

@thiell
Copy link

thiell commented Aug 3, 2019

I don't think dcp returns an error at the end, but since we recommended to our users the use of dcp to move large quantity of data from lustre to lustre, several of our users recently had concern about these warning messages. Users likely don't know that they mean and they had concern regarding the copy. We would like to avoid such user-facing warning messages, that's basically our main problem right now with dcp. We also had tickets coming when using mv from lustre to lustre but as I mentioned, we were able to disable the warnings using the xattr.conf trick. Hope this makes sense.

@adilger
Copy link
Contributor

adilger commented Aug 7, 2019

By "this error can be ignored" I mean that dcp should not print any error message if setxattr("lustre.lov") or setxattr("trusted.lov") returns an error when copying a file, since there isn't really anything that the user can do about it.

@adammoody
Copy link
Member Author

We could filter error messages to avoiding printing anything for failures on lustre.lov and trusted.lov.

Are there any other Lustre related attributes to watch out for?

Are there any valid error conditions for these attributes that we should still be careful to print?

I think it also makes sense to look at adding support for processing entries in /etc/xattr.conf. That file is new to me. Is there a good reference for documentation on its syntax?

@adilger
Copy link
Contributor

adilger commented Aug 15, 2019 via email

@ofaaland
Copy link
Collaborator

My new PR #503 almost addresses this, I think, but currently, in dcp, --copy-xattrs is only allowed in combination with --preserve. It sounds like I should make them independent. I'll take a look at that.

One idea mentioned above was suppressing error messages when setxattr("lustre.lov") or setxattr("trusted.lov") returns an error. I think that is not appropriate if they are only copied due to the user specifying --copy-xattrs=all or --copy-xattrs=libattr. Do you agree?

My thinking is that dcp and dsync should behave the same way WRT copying xattrs - that the defaults should be the same, and the options to change those defaults should be the same. Does anyone here think otherwise?

ofaaland added a commit to ofaaland/mpifileutils that referenced this issue Oct 29, 2021
Rather than always copying xattrs, introduce option
"--xattrs | -X" to allow the user to control how this is done.

-X is chosen for consistency with rsync.

Options are
  "none"        Copy no xattrs
  "all"         Copy all xattrs (prior default)
  "non-lustre"  Copy non-lustre xattrs (new default)
  "libattr"     Copy xattrs not excluded by /etc/xattr.conf

Copying xattrs is now independent of whether the user used the
--preserve option.

Lustre uses xattrs to record important information such as how the file
data should be distributed among the Lustre servers.  As a result,
copying the lustre xattrs prevents certain default values from taking
effect.

If "non-lustre" option is in effect, xattrs named in lustre
source file lustre_idl.h as of this writing are not copied (see
XATTR_NAME_SOM and friends).  In addition, xattrs with prefix
"lustre" are not copied.

The format of /etc/xattr.conf seems not to be described in man pages on
RHEL 7 and RHEL 8 machines.  Until that is fixed, see
http://git.savannah.nongnu.org/cgit/attr.git/tree/xattr.conf

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>

Closes hpc#324
Partially Addresses hpc#49
Partially Addresses hpc#400
ofaaland added a commit to ofaaland/mpifileutils that referenced this issue Nov 18, 2021
Rather than always copying xattrs, introduce option
"--xattrs | -X" to allow the user to control how this is done.

-X is chosen for consistency with rsync.

Options are
  "none"        Copy no xattrs
  "all"         Copy all xattrs (prior default)
  "non-lustre"  Copy non-lustre xattrs (new default)
  "libattr"     Copy xattrs not excluded by /etc/xattr.conf

Copying xattrs is now independent of whether the user used the
--preserve option.

Lustre uses xattrs to record important information such as how the file
data should be distributed among the Lustre servers.  As a result,
copying the lustre xattrs prevents certain default values from taking
effect.

If "non-lustre" option is in effect, xattrs named in lustre
source file lustre_idl.h as of this writing are not copied (see
XATTR_NAME_SOM and friends).  In addition, xattrs with prefix
"lustre" are not copied.

Adds a dsync test that verifies "none", "all", and "libattr" variants.
Tested on an xfs file system.

The format of /etc/xattr.conf seems not to be described in man pages on
RHEL 7 and RHEL 8 machines.  Until that is fixed, see
http://git.savannah.nongnu.org/cgit/attr.git/tree/xattr.conf

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>

Closes hpc#324
Partially Addresses hpc#49
Partially Addresses hpc#400
ofaaland added a commit to ofaaland/mpifileutils that referenced this issue Nov 18, 2021
Rather than always copying xattrs, introduce option
"--xattrs | -X" to allow the user to control how this is done.

-X is chosen for consistency with rsync.

Options are
  "none"        Copy no xattrs
  "all"         Copy all xattrs (prior default)
  "non-lustre"  Copy non-lustre xattrs (new default)
  "libattr"     Copy xattrs not excluded by /etc/xattr.conf

Copying xattrs is now independent of whether the user used the
--preserve option.

Lustre uses xattrs to record important information such as how the file
data should be distributed among the Lustre servers.  As a result,
copying the lustre xattrs prevents certain default values from taking
effect.

If "non-lustre" option is in effect, xattrs named in lustre
source file lustre_idl.h as of this writing are not copied (see
XATTR_NAME_SOM and friends).  In addition, xattrs with prefix
"lustre" are not copied.

Adds a dsync test that verifies "none", "all", and "libattr" variants.
Tested on an xfs file system.

The format of /etc/xattr.conf seems not to be described in man pages on
RHEL 7 and RHEL 8 machines.  Until that is fixed, see
http://git.savannah.nongnu.org/cgit/attr.git/tree/xattr.conf

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>

Closes hpc#324
Partially Addresses hpc#49
Partially Addresses hpc#400
ofaaland added a commit to ofaaland/mpifileutils that referenced this issue Nov 19, 2021
Rather than always copying xattrs, introduce option
"--xattrs | -X" to allow the user to control how this is done.

-X is chosen for consistency with rsync.

Options are
  "none"        Copy no xattrs
  "all"         Copy all xattrs (prior default)
  "non-lustre"  Copy non-lustre xattrs (new default)
  "libattr"     Copy xattrs not excluded by /etc/xattr.conf

Copying xattrs is now independent of whether the user used the
--preserve option.

Lustre uses xattrs to record important information such as how the file
data should be distributed among the Lustre servers.  As a result,
copying the lustre xattrs prevents certain default values from taking
effect.

If "non-lustre" option is in effect, xattrs named in lustre
source file lustre_idl.h as of this writing are not copied (see
XATTR_NAME_SOM and friends).  In addition, xattrs with prefix
"lustre" are not copied.

Adds a dsync test that verifies "none", "all", and "libattr" variants.
Tested on an xfs file system.

The format of /etc/xattr.conf seems not to be described in man pages on
RHEL 7 and RHEL 8 machines.  Until that is fixed, see
http://git.savannah.nongnu.org/cgit/attr.git/tree/xattr.conf

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>

Closes hpc#324
Partially Addresses hpc#49
Partially Addresses hpc#400
ofaaland added a commit to ofaaland/mpifileutils that referenced this issue Nov 20, 2021
Rather than always copying xattrs, introduce option
"--xattrs | -X" to allow the user to control how this is done.

-X is chosen for consistency with rsync.

Options are
  "none"        Copy no xattrs
  "all"         Copy all xattrs (prior default)
  "non-lustre"  Copy non-lustre xattrs (new default)
  "libattr"     Copy xattrs not excluded by /etc/xattr.conf

Copying xattrs is now independent of whether the user used the
--preserve option.

Lustre uses xattrs to record important information such as how the file
data should be distributed among the Lustre servers.  As a result,
copying the lustre xattrs prevents certain default values from taking
effect.

If "non-lustre" option is in effect, xattrs named in lustre
source file lustre_idl.h as of this writing are not copied (see
XATTR_NAME_SOM and friends).  In addition, xattrs with prefix
"lustre" are not copied.

Adds a dsync test that verifies "none", "all", and "libattr" variants.
Tested on an xfs file system.

The format of /etc/xattr.conf seems not to be described in man pages on
RHEL 7 and RHEL 8 machines.  Until that is fixed, see
http://git.savannah.nongnu.org/cgit/attr.git/tree/xattr.conf

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>

Closes hpc#324
Partially Addresses hpc#49
Partially Addresses hpc#400
ofaaland added a commit to ofaaland/mpifileutils that referenced this issue Dec 7, 2021
Rather than always copying xattrs, introduce option
"--xattrs | -X" to allow the user to control how this is done.

-X is chosen for consistency with rsync.

Options are
  "none"        Copy no xattrs
  "all"         Copy all xattrs (prior default)
  "non-lustre"  Copy non-lustre xattrs (new default)
  "libattr"     Copy xattrs not excluded by /etc/xattr.conf

Copying xattrs is now independent of whether the user used the
--preserve option.

Lustre uses xattrs to record important information such as how the file
data should be distributed among the Lustre servers.  As a result,
copying the lustre xattrs prevents certain default values from taking
effect.

If "non-lustre" option is in effect, xattrs named in lustre
source file lustre_idl.h as of this writing are not copied (see
XATTR_NAME_SOM and friends).  In addition, xattrs with prefix
"lustre" are not copied.

Adds a dsync test that verifies "none", "all", and "libattr" variants.
Tested on an xfs file system.

The format of /etc/xattr.conf seems not to be described in man pages on
RHEL 7 and RHEL 8 machines.  Until that is fixed, see
http://git.savannah.nongnu.org/cgit/attr.git/tree/xattr.conf

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>

Closes hpc#324
Partially Addresses hpc#49
Partially Addresses hpc#400
adammoody pushed a commit that referenced this issue Dec 9, 2021
Rather than always copying xattrs, introduce option
"--xattrs | -X" to allow the user to control how this is done.

-X is chosen for consistency with rsync.

Options are
  "none"        Copy no xattrs
  "all"         Copy all xattrs (prior default)
  "non-lustre"  Copy non-lustre xattrs (new default)
  "libattr"     Copy xattrs not excluded by /etc/xattr.conf

Copying xattrs is now independent of whether the user used the
--preserve option.

Lustre uses xattrs to record important information such as how the file
data should be distributed among the Lustre servers.  As a result,
copying the lustre xattrs prevents certain default values from taking
effect.

If "non-lustre" option is in effect, xattrs named in lustre
source file lustre_idl.h as of this writing are not copied (see
XATTR_NAME_SOM and friends).  In addition, xattrs with prefix
"lustre" are not copied.

Adds a dsync test that verifies "none", "all", and "libattr" variants.
Tested on an xfs file system.

The format of /etc/xattr.conf seems not to be described in man pages on
RHEL 7 and RHEL 8 machines.  Until that is fixed, see
http://git.savannah.nongnu.org/cgit/attr.git/tree/xattr.conf

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>

Closes #324
Partially Addresses #49
Partially Addresses #400
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants