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

Remote agent entry incorrectly unlinked (REMOTE_PARENT_DIR/<file_fid>)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      This happens when linkea overflow: some remote entries are not accounted in linkea (trusted.link).

      Reproducer (lustre master branch):
      Create 1000 hardlinks to overflow linkea (4K max):

      [root@client-el8 mdt1]# cd ../mdt0
      [root@client-el8 mdt0]# touch test
      [root@client-el8 mdt0]# printf "%s\n" test_link{1..1000} | xargs -n1 ln test   
      [root@client-el8 mdt0]# debugfs -c -R 'stat /ROOT/mdt0/test' /dev/mapper/mds1_flakey                                                                                                                                                          
      debugfs 1.47.3-wc2 (11-Nov-2025)
      Inode: 166   Type: regular    Mode:  0644   Flags: 0x80000
      Generation: 2615803926    Version: 0x00000001:0000139e
      User:     0   Group:     0   Project:     0   Size: 0
      File ACL: 0
      Links: 1001   Blockcount: 8
      Fragment:  Address: 0    Number: 0    Size: 0
       ctime: 0x6985bae8:00000000 -- Fri Feb  6 10:56:56 2026
       atime: 0x6985ba99:00000000 -- Fri Feb  6 10:55:37 2026
       mtime: 0x6985ba99:00000000 -- Fri Feb  6 10:55:37 2026
      crtime: 0x6985ba99:27a3b61c -- Fri Feb  6 10:55:37 2026
      Size of extra inode fields: 32
      Extended attributes:
        lma: fid=[0x200000402:0x3:0x0] compat=0 incompat=0
        trusted.lov (56) = d0 0b d1 0b 01 00 00 00 03 00 00 00 00 00 00 00 02 04 00 00 02 00 00 00 00 00 10 00 01 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 
        trusted.som (24) = 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
        inode <167> linkea: idx=0 parent=[0x200000402:0x1:0x0] name='test'
                idx=1 parent=[0x200000402:0x1:0x0] name='test_link1'
      ....
                idx=138 parent=[0x200000402:0x1:0x0] name='test_link138'
      EXTENTS:
      

      move all entries to create 1000 remote entries

      [root@client-el8 mdt0]# printf "%s\n" test test_link{1..1000} | xargs -I{} mv {} ../mdt1
      [root@client-el8 mdt0]# debugfs -c -R 'ls /REMOTE_PARENT_DIR' /dev/mapper/mds1_flakey 
      debugfs 1.47.3-wc2 (11-Nov-2025)
       25001  (12) .    2  (12) ..    166  (4072) 0x200000402:0x3:0x0
      

      Unlink all the entries register in linkea:

      [root@client-el8 mdt0]# cd ../mdt1
      [root@client-el8 mdt1]# printf "%s\n" test test_link{1..138} | xargs -n1 unlink
      

      Now the remote agent entry is removed:

      [root@client-el8 mdt1]# debugfs -c -R 'ls /REMOTE_PARENT_DIR' /dev/mapper/mds1_flakey 
      debugfs 1.47.3-wc2 (11-Nov-2025)
       25001  (12) .    2  (4084) ..   
      

      No more entries reference this inode, so e2fsck complains about it:

      [root@client-el8 mdt1]# cd
      [root@client-el8 ~]# umount /dev/mapper/mds1_flakey 
      [root@client-el8 ~]# e2fsck -nvf /dev/mapper/mds1_flakey
      e2fsck 1.47.3-wc2 (11-Nov-2025)
      Pass 1: Checking inodes, blocks, and sizes
      Pass 2: Checking directory structure
      Pass 3: Checking directory connectivity
      Pass 4: Checking reference counts
      Unattached inode 166
      Connect to /lost+found? no
      
      Pass 5: Checking group summary information
      
      lustre-MDT0000: ********** WARNING: Filesystem still has errors **********
      
      
               280 inodes used (0.28%, out of 100000)
                 5 non-contiguous files (1.8%)
                 1 non-contiguous directory (0.4%)
                   # of inodes with ind/dind/tind blocks: 0/0/0
                   Extent depth histogram: 273/1
             30083 blocks used (48.13%, out of 62500)
                 0 bad blocks
                 1 large file
      
               151 regular files
               119 directories
                 0 character device files
                 0 block device files
                 0 fifos
                 0 links
                 0 symbolic links (0 fast symbolic links)
                 0 sockets
      ------------
               269 files
      

      Attachments

        Issue Links

          Activity

            People

              eaujames Etienne Aujames
              eaujames Etienne Aujames
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: