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

pcc: auto_attach doesn't work after client cache cleared

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.13.0
    • Lustre 2.13.0
    • pcc
    • 3
    • 9223372036854775807

    Description

      PCC auto_attach feature doesn't work and no re-attach after clear caches on client.
      Here is a reproducer.

      PCC auto_attach feature doesn't work and no re-attach after clear caches on client.
      
      Enable HSM
      [root@c01 ~]# clush -w mds[01-02] lctl set_param mdt.*.hsm_control=enabled
      mds01: mdt.ai400-MDT0000.hsm_control=enabled
      mds02: mdt.ai400-MDT0001.hsm_control=enabled
      
      Create PCC cache space
      [root@c01 ~]# mkfs.ext4 /dev/sdb 
      [root@c01 ~]# mount /dev/sdb /pcc 
      
      Start HSM copytool
      [root@c01 ~]# lhsmtool_posix --daemon --hsm-root /pcc --archive=1 /ai400
      [root@c01 ~]# ps -ef | grep hsm
      root      2872     1  0 15:09 ?        00:00:00 lhsmtool_posix --daemon --hsm-root /pcc --archive=1 /ai400
      root      2874  2340  0 15:09 pts/0    00:00:00 grep --color=auto hsm
      
      Enable PCC with projid=100
      [root@c01 ~]# lctl pcc add /ai400 /pcc -p "projid={100} auto_attach=1 rwid=1"
      [root@c01 ~]# lctl pcc list /ai400
      /pcc:
        rwid: 1
        flags: 1f
        autocache: projid={100}
      
      Reproducer
      [root@c01 ~]# mkdir /ai400/lpcc
      [root@c01 ~]# lfs project -sp 100 /ai400/lpcc/
      [root@c01 ~]# echo "QQQ" > /ai400/lpcc/test
      [root@c01 ~]# lfs pcc state /ai400/lpcc/test
      file: /ai400/lpcc/test, type: readwrite, PCC file: /0082/0000/0403/0000/0002/0000/0x200000403:0x82:0x0, user number: 0, flags: 1c
      [root@c01 ~]# echo 3 > /proc/sys/vm/drop_caches
      
      [root@c01 ~]# lfs pcc state /ai400/lpcc/test
      file: /ai400/lpcc/test, type: none
      [root@c01 ~]# lfs pcc state /ai400/lpcc/test
      file: /ai400/lpcc/test, type: none
      

      After drop cache on client, 'lfs pcc state' should trigger auto_attach, but it doesn't.

      Attachments

        Activity

          People

            qian_wc Qian Yingjin
            sihara Shuichi Ihara
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: