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

remote inode should inherit agents inode UID and GID

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • None
    • 3
    • 9223372036854775807

      If move a file from one MDT to another, it causes to create a remote inode. This inode inherits project id, but UID and GID are to 0. Agent inode UID, GID and PROJID remain unchanged. That said each file moved between MDTs causes creating a new inode that increments project ID usage(if agent ahs project ID set on it).

      I think agents inode UID and GID should be also set to the remote inode as well as PROJID to be considered by account by quota accounting subsystem. I don't have a good example, but probably it also makes sense from the security point of view(inode has ROOT UID and GID).

      Below is a simple example with the details:

      [root@vm3 ~]# cat repro3.sh 
      #!/bin/bash
      
      cd /mnt/lustre
      mkdir my_project
      chattr +P -p 32 my_project
      lsattr -dp my_project/
      #   32 -------------------P-- my_project/
      cd my_project/
      #mkdir p{1..3}
      lfs mkdir -i 1 p1
      lfs mkdir -i 2 p2
      lfs mkdir -i 3 p3
      touch p1/truc
      chown 64030:112 p1/truc
      mv p1/truc p2/truc
      lsattr -dp *
      [root@vm3 ~]# bash repro3.sh 
         32 -------------------P-- my_project/
         32 -------------------P-- p1
         32 -------------------P-- p2
         32 -------------------P-- p3
      [root@vm3 ~]# debugfs -c -R "stat REMOTE_PARENT_DIR/0x280000404:0x5:0x0/truc" /tmp/lustre-mdt3 
      debugfs 1.47.3-wc2 (11-Nov-2025)
      Inode: 162   Type: regular    Mode:  0000   Flags: 0x20080000
      Generation: 766296278    Version: 0x00000000:00000000
      User:     0   Group:     0   Project:    32   Size: 0
      File ACL: 0
      Links: 1   Blockcount: 0
      Fragment:  Address: 0    Number: 0    Size: 0
       ctime: 0x6aa43332:0b32b67c -- Fri Sep 11 19:58:26 2026
       atime: 0x00000000:fffffff8 -- Thu Jan  1 03:00:00 1970
       mtime: 0x00000000:fffffff8 -- Thu Jan  1 03:00:00 1970
      crtime: 0x6aa43332:0b32b67c -- Fri Sep 11 19:58:26 2026
      Size of extra inode fields: 32
      Extended attributes:
        lma: fid=[0x240000404:0x9:0x0] compat=0 incompat=2
      EXTENTS:
      
      [root@vm3 ~]# debugfs -c -R "stat REMOTE_PARENT_DIR/0x240000404:0x9:0x0" /tmp/lustre-mdt2
      debugfs 1.47.3-wc2 (11-Nov-2025)
      Inode: 156   Type: regular    Mode:  0644   Flags: 0x20080000
      Generation: 1320037609    Version: 0x00000001:00000054
      User: 64030   Group:   112   Project:    32   Size: 0
      File ACL: 0
      Links: 1   Blockcount: 0
      Fragment:  Address: 0    Number: 0    Size: 0
       ctime: 0x6aa43332:00000000 -- Fri Sep 11 19:58:26 2026
       atime: 0x6aa43332:00000000 -- Fri Sep 11 19:58:26 2026
       mtime: 0x6aa43332:00000000 -- Fri Sep 11 19:58:26 2026
      crtime: 0x6aa43332:00ebdbec -- Fri Sep 11 19:58:26 2026
      Size of extra inode fields: 32
      Extended attributes:
        lma: fid=[0x240000404:0x9:0x0] compat=0 incompat=4
        trusted.lov (56) = d0 0b d1 0b 01 00 00 00 09 00 00 00 00 00 00 00 04 04 00 40 02 00 00 00 00 00 40 00 01 00 00 00 02 04 00 40 03 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 
        security.selinux (37) = "unconfined_u:object_r:unlabeled_t:s0\000"
        user.job (7) = "touch.0"
        linkea: idx=0 parent=[0x280000404:0x5:0x0] name='truc'
        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 
      EXTENTS:

            wc-triage WC Triage
            scherementsev Sergey Cheremencev
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: