Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-18456 TCU: Trash Can/Undelete for Lustre
  3. LU-20024

TCU: Space accounting with Trash Can enabled is not correct

    XMLWordPrintable

Details

    • Technical task
    • Resolution: Unresolved
    • Medium
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      filled up the system to almost full

      [root@trevis-90vm1 lustre]# df -h
      Filesystem Size Used Avail Use% Mounted on
      devtmpfs 4.0M 0 4.0M 0% /dev
      tmpfs 1.4G 0 1.4G 0% /dev/shm
      tmpfs 557M 13M 544M 3% /run
      /dev/vda1 20G 3.3G 16G 18% /
      10.240.32.204:/export/autotest 1.5T 712G 724G 50% /autotest
      10.240.32.204:/export/scratch 5.0T 4.2T 558G 89% /scratch
      tmpfs 279M 0 279M 0% /run/user/0
      trevis-88vm6@tcp:/lustre 4.6G 4.3G 36M 100% /mnt/lustre
      [root@trevis-90vm1 lustre]# lfs df -h
      UUID bytes Used Available Use% Mounted on
      lustre-MDT0000_UUID 2.8G 1.9M 2.5G 1% /mnt/lustre[MDT:0]
      lustre-OST0000_UUID 4.6G 4.3G 25.3M 100% /mnt/lustre[OST:0]
      filesystem_summary: 4.6G 4.3G 25.3M 100% /mnt/lustre
      [root@trevis-90vm1 lustre]# ls -al
      total 4485176
      drwxr-xr-x 11 root root 4096 Mar 18 21:14 .
      drwxr-xr-x. 4 root root 4096 Feb 25 22:32 ..
      rw-rr- 1 root root 1069547520 Mar 18 21:04 f1-1G
      rw-rr- 1 root root 1069547520 Mar 18 21:05 f2-1G
      rw-rr- 1 root root 1069547520 Mar 18 21:06 f3-1G
      rw-rr- 1 root root 1069547520 Mar 18 21:08 f4-1G
      rw-rr- 1 root root 314572800 Mar 18 21:14 f5-300m
      drwxr-xr-x 4 root root 4096 Mar 18 16:16 .fscrypt
      drwx------ 2 root root 4096 Mar 18 16:47 name-encrypt
      drwxr-xr-x 2 root root 4096 Mar 18 19:04 nodemap1
      drwxr-xr-x 2 root root 4096 Mar 18 19:13 nodemap2
      drwx------ 2 root root 4096 Mar 18 16:33 private
      d--------- 2 root root 4096 Mar 17 19:54 proj-2
      d--------- 2 root root 4096 Mar 17 17:44 rrr
      drwxr-xr-x 3 test1 test1 4096 Mar 17 16:15 test1

      Then remove a 1G file, check the space usage, after sync, 'df -h' shows usage 0 which is not correct

      [root@trevis-90vm1 lustre]# rm f1-1G 
      rm: remove regular file 'f1-1G'? yes
      [root@trevis-90vm1 lustre]# df -h
      Filesystem Size Used Avail Use% Mounted on
      devtmpfs 4.0M 0 4.0M 0% /dev
      tmpfs 1.4G 0 1.4G 0% /dev/shm
      tmpfs 557M 13M 544M 3% /run
      /dev/vda1 20G 3.3G 16G 18% /
      10.240.32.204:/export/autotest 1.5T 712G 724G 50% /autotest
      10.240.32.204:/export/scratch 5.0T 4.2T 557G 89% /scratch
      tmpfs 279M 0 279M 0% /run/user/0
      trevis-88vm6@tcp:/lustre 4.6G 4.3G 34M 100% /mnt/lustre
      [root@trevis-90vm1 lustre]# sync
      [root@trevis-90vm1 lustre]# df -h
      Filesystem Size Used Avail Use% Mounted on
      devtmpfs 4.0M 0 4.0M 0% /dev
      tmpfs 1.4G 0 1.4G 0% /dev/shm
      tmpfs 557M 13M 544M 3% /run
      /dev/vda1 20G 3.3G 16G 18% /
      10.240.32.204:/export/autotest 1.5T 712G 724G 50% /autotest
      10.240.32.204:/export/scratch 5.0T 4.2T 557G 89% /scratch
      tmpfs 279M 0 279M 0% /run/user/0
      trevis-88vm6@tcp:/lustre 4.6G 0 4.6G 0% /mnt/lustre
      [root@trevis-90vm1 lustre]# ls -al
      total 3440692
      drwxr-xr-x 11 root root 4096 Mar 18 21:18 .
      drwxr-xr-x. 4 root root 4096 Feb 25 22:32 ..
      rw-rr- 1 root root 1069547520 Mar 18 21:05 f2-1G
      rw-rr- 1 root root 1069547520 Mar 18 21:06 f3-1G
      rw-rr- 1 root root 1069547520 Mar 18 21:08 f4-1G
      rw-rr- 1 root root 314572800 Mar 18 21:14 f5-300m
      drwxr-xr-x 4 root root 4096 Mar 18 16:16 .fscrypt
      drwx------ 2 root root 4096 Mar 18 16:47 name-encrypt
      drwxr-xr-x 2 root root 4096 Mar 18 19:04 nodemap1
      drwxr-xr-x 2 root root 4096 Mar 18 19:13 nodemap2
      drwx------ 2 root root 4096 Mar 18 16:33 private
      d--------- 2 root root 4096 Mar 17 19:54 proj-2
      d--------- 2 root root 4096 Mar 17 17:44 rrr
      drwxr-xr-x 3 test1 test1 4096 Mar 17 16:15 test1

      The system is actually cannot write much more data as it also counts on the space occupied by Trash

      [root@trevis-90vm1 lustre]# lfs df -h
      UUID bytes Used Available Use% Mounted on
      lustre-MDT0000_UUID 2.8G 1.9M 2.5G 1% /mnt/lustre[MDT:0]
      lustre-OST0000_UUID 4.6G 4.3G 33.4M 100% /mnt/lustre[OST:0]
      filesystem_summary: 4.6G 4.3G 33.4M 100% /mnt/lustre
      [root@trevis-90vm1 lustre]# dd if=/dev/zero of=f6-2G bs=10M count=200 oflag=direct
      dd: error writing 'f6-2G': No space left on device
      4+0 records in
      3+0 records out
      31457280 bytes (31 MB, 30 MiB) copied, 1.32375 s, 23.8 MB/s

      umount and remount doesn’t help

      [root@trevis-90vm1 ~]# umount /mnt/lustre
      [root@trevis-90vm1 ~]# mount -t lustre -o user_xattr trevis-88vm6@tcp:/lustre /mnt/lustre
      [root@trevis-90vm1 ~]# df -h
      Filesystem Size Used Avail Use% Mounted on
      devtmpfs 4.0M 0 4.0M 0% /dev
      tmpfs 1.4G 0 1.4G 0% /dev/shm
      tmpfs 557M 13M 544M 3% /run
      /dev/vda1 20G 3.3G 16G 18% /
      10.240.32.204:/export/autotest 1.5T 712G 723G 50% /autotest
      10.240.32.204:/export/scratch 5.0T 4.2T 555G 89% /scratch
      tmpfs 279M 0 279M 0% /run/user/0
      trevis-88vm6@tcp:/lustre 4.6G 0 4.6G 0% /mnt/lustre

      Attachments

        Activity

          People

            qian_wc Qian Yingjin
            qian_wc Qian Yingjin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: