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

do not copy lustre striping info with dsync #324

Closed
thiell opened this issue Feb 19, 2020 · 7 comments
Closed

do not copy lustre striping info with dsync #324

thiell opened this issue Feb 19, 2020 · 7 comments

Comments

@thiell
Copy link

thiell commented Feb 19, 2020

Hi,

dsync cannot always be used from Lustre 2.12 to Lustre 2.10, as it tries to copy lustre striping params. Is there a way to not copy striping info with dsync? IIRC, with dcp, it only tries to copy lustre striping info when -p is provided. We have seen a weird behavior after a user used dsync with PFL'ed files: the result was that the first stripe on the destination filesystem is only using OST 0 (so this OST has become full of course), while the source files are also PFL'ed but their first stripe is spread across all OSTs (normal behavior).

We would like to simply rely on the default striping configuration of the target filesystem. Each filesystem is different. This is related to #49 but more critical I think.

Resulting bogus files:

$ lfs getstripe /oak/stanford/groups/***/***/sherlock_scratch_archive_Feb2020_2/ml/QM9_Stanford_data/transfer_learning_E_ccsdt_avtz_nolinearcorrection_minibatches_batchsize48/ | grep l_ost_idx | head
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x1eb0396:0x0] }
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x1e9e323:0x0] }
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x1eb4f03:0x0] }
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x1eadcd3:0x0] }
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x1eaa3ab:0x0] }
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x1eb3b08:0x0] }
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x1eb9a49:0x0] }
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x1ea5c4b:0x0] }
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x1eaf35e:0x0] }
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x1ea5ad8:0x0] }
@adammoody
Copy link
Member

adammoody commented Feb 19, 2020

Ugh, thanks for tracking this down and reporting it. I think this happens because dsync copies over the extended attributes verbatim from the source files. There is no command line option to disable copying those in dsync, though that would not be hard to add.

As a work around, you could disable copying of extended attributes by modifying this function to just immediately return 0 and avoid copying any attributes:

static int mfu_copy_xattrs(

Or we have a CMake option to disable support for extended attributes at configure time. My CMake syntax may be incorrect here:

cmake ... -DENABLE_XATTRS=0

Can you try either of those and let us know if it helps?

Long term, we need to come up with a proper fix here so that we can optionally copy extended attributes, but still exclude copying of the Lustre-related extended attributes. Shorter term, we could likely add an option to skip those on dsync.

@adilger
Copy link
Contributor

adilger commented Sep 23, 2020

This may be a bug in the Lustre xattr code for PFL file layouts - OST offset defaults to 0 when coying a PFL via xattrs.

@akesandgren
Copy link
Contributor

I worked around it by filtering out lov.lustre xattrs completely in mfu_copy_xattrs. But my reason for doing so was that I wanted the new file systems PFL layout to take effect and not whatever was on the old file system.

That's likely not the correct thing to do...

@adilger
Copy link
Contributor

adilger commented Oct 5, 2020

I think this needs to be a runtime option, since there are definitely users that want to copy the layout. For "lfs_migrate" there is a "--restripe" option that uses the default layout of the target instead of copying the source layout xattr.

@akesandgren
Copy link
Contributor

Yes, definitely, I just needed a quick fix since I hit the https://jira.whamcloud.com/browse/LU-13062 problem when testing.

What I've seen just now is that the fiemap call fails on anything that uses > 1 stripe, even without a PFL layout.

Is that expected too?

@adilger
Copy link
Contributor

adilger commented Oct 5, 2020

Yes, FIEMAP does not use the standard interface for files > 1 stripe because it would return a different extent for each 1MB (or other stripe_size) of the file, which would grow large rather quickly.

For efficiently copying files with holes, we are planning to use SEEK_HOLE and SEEK_DATA, which is being implemented in https://jira.whamcloud.com/browse/LU-10810 but has not landed yet. This interface doesn't really care about the underlying file layout.

@ofaaland
Copy link
Collaborator

Hi @adilger @akesandgren @thiell please see #503. I believe that PR allows users sufficient control over whether xattrs are copied (and whether striping is preserved), but it would be great if you could confirm that. And if you're in the mood for a full review, that would be great, too. Thank you!

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
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