Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-4760

New files written to Lustre clients mounted with 'nolock' option are corrupted.

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • None
    • Lustre 2.5.0, Lustre 2.4.2
    • Rosso, Shadow
    • 2
    • 13094

    Description

      If I mount Lustre clients with the nolock option, any new files that are created seem to be aligned along the 4K boundary, even if the total length may fall before the boundary. This causes the file to contain garbage data trailing EOF.

      Please see the attached console output.

      Additional information: Not sure if this is relevant, but Lustre clients were mounted directly on the OSS and MDS. I haven't tested with standalone clients.

      Attachments

        Activity

          [LU-4760] New files written to Lustre clients mounted with 'nolock' option are corrupted.

          Just to clarify - there are separate options "flock", "localflock", and "noflock" that enable/disable the flock behaviour for the mountpoint. This is different from the "nolock" feature being tested here, which disables DLM locking entirely and forces the application to handle the file consistency on its own. I believe that this would work if you are doing O_DIRECT page-aligned and page-sized IO.

          According to Jinshan, this is just a problem in setting the file size correctly, so maybe it will be a small fix.

          Note also that this feature has very rarely been tested, so it will take some work to get into shape.

          adilger Andreas Dilger added a comment - Just to clarify - there are separate options "flock", "localflock", and "noflock" that enable/disable the flock behaviour for the mountpoint. This is different from the "nolock" feature being tested here, which disables DLM locking entirely and forces the application to handle the file consistency on its own. I believe that this would work if you are doing O_DIRECT page-aligned and page-sized IO. According to Jinshan, this is just a problem in setting the file size correctly, so maybe it will be a small fix. Note also that this feature has very rarely been tested, so it will take some work to get into shape.

          People

            wc-triage WC Triage
            okulkarn Omkar Kulkarni (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: