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

"lfs find --mdt-count +1" fails with "Operation not permitted"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.15.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      It appears that "lfs find $MOUNT -type d --mdt-count +1" aborts when it hits non-striped directories rather than ignoring the error and continuing to search the directory tree:

      # lfs find /mnt/testfs -type d --mdt-count +1
      lfs: failed for '/mnt/testfs': Operation not permitted
      # lfs mkdir -c 2 /mnt/testfs/dne
      # lfs find /mnt/testfs/dne -type d --mdt-count +1
      /mnt/testfs/dne
      # mkdir /mnt/testfs/dne/nondne
      # lfs find /mnt/testfs/dne -type d --mdt-count +1
      /mnt/testfs/dne
      lfs: failed for '/mnt/testfs/dne': Operation not permitted
      

      Running strace on the find shows that it is returning -61 = ENODATA:

      open("/mnt/testfs/dne", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
      open("/mnt/testfs/dne", O_RDONLY|O_NONBLOCK|O_NOFOLLOW) = 4
      close(3)                                = 0
      ioctl(4, LL_IOC_LMV_GETSTRIPE, 0x1751170) = 0
      ioctl(4, LL_IOC_MDC_GETINFO_V2, 0x1741040) = 0
      fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 4), ...}) = 0
      mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5
      write(1, "/mnt/testfs/dne\n", 16)       = 16
      /mnt/testfs/dne
      fstat(4, {st_mode=S_IFDIR|0755, st_size=8192, ...}) = 0
      fcntl(4, F_GETFL)                       = 0x28800 (flags O_RDONLY|O_NONBLOCK|O_L
      fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
      getdents(4, /* 3 entries */, 32768)     = 80
      open("/mnt/testfs/dne/nondne", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
      open("/mnt/testfs/dne/nondne", O_RDONLY|O_NONBLOCK|O_NOFOLLOW) = 5
      close(3)                                = 0
      ioctl(5, LL_IOC_LMV_GETSTRIPE, 0x1751170) = -1 ENODATA
      close(5)                                = 0
      getdents(4, /* 0 entries */, 32768)     = 0
      close(4)                                = 0
      write(2, "lfs: failed for '/mnt/testfs/dne"..., 59) = 59
      lfs: failed for '/mnt/testfs/dne
      

      Attachments

        Issue Links

          Activity

            People

              laisiyao Lai Siyao
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: