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

sanity.sh test_129: max dir size limit work incorrectly.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.6.0, Lustre 2.5.2
    • Lustre 2.2.0, Lustre 2.1.1, Lustre 2.1.2, Lustre 2.1.3, Lustre 1.8.x (1.8.0 - 1.8.5)
    • 3
    • 5820

    Description

      easy replicate by hand.
      [root@rhel6-64 test1]# for i in `seq 10000000`; do touch $i; done
      ...
      [root@rhel6-64 test1]# echo 16384 >/sys/fs/ldiskfs/loop0/max_dir_size
      root@rhel6-64 lustre]# ls -ls
      total 256
      256 drwxr-xr-x 2 root root 258048 Dec 12 12:28 test1
      [root@rhel6-64 lustre]# mkdir test1/proba
      mkdir: cannot create directory `test1/proba': File too large
      [root@rhel6-64 test1]# echo 0 >/sys/fs/ldiskfs/loop0/max_dir_size
      [root@rhel6-64 lustre]# cd test1
      [root@rhel6-64 test1]# rm -rf *
      [root@rhel6-64 test1]# ls -l
      total 0
      [root@rhel6-64 test1]# echo 16384 >/sys/fs/ldiskfs/loop0/max_dir_size
      [root@rhel6-64 test1]# cd ..
      [root@rhel6-64 lustre]# ls -ls
      total 264
      264 drwxr-xr-x 2 root root 266240 Dec 12 12:28 test1
      [root@rhel6-64 lustre]# mkdir test1/proba
      mkdir: cannot create directory `test1/proba': File too large
      [root@rhel6-64 lustre]#

      mkdir failed due wrong assumption - if we allocate an inode that is always allocate a space in directory, but ext4 isn't truncate a directory after removing an objects from it.

      that is caused random fails in sanity 129.
      + do_node mft51.xyua 'echo 16384 >/sys/fs/ldiskfs/loop0/max_dir_size'
      + local verbose=false
      + '[' xmft51.xyua = x--verbose ']'
      + local HOST=mft51.xyua
      + shift
      + local 'myPDSH=/usr/bin/pdsh -R ssh -S -w '
      + '[' mft51.xyua = mft51.xyua ']'
      + myPDSH=no_dsh
      + false
      + '[' no_dsh = rsh ']'
      + false
      + sed 's/^mft51.xyua: //'
      + no_dsh mft51.xyua '(PATH=$PATH:/usr/lib64/lustre/utils:/usr/lib64/lustre/tests:/sbin:/usr/sbin; cd /root; LUSTRE="/usr/lib64/lustre" sh -c "echo 16384 >/sys/fs/ldiskfs/loop0/max_dir_size")'
      + shift
      + eval '(PATH=$PATH:/usr/lib64/lustre/utils:/usr/lib64/lustre/tests:/sbin:/usr/sbin;' cd '/root;' 'LUSTRE="/usr/lib64/lustre"' sh -c '"echo' 16384 '>/sys/fs/ldiskfs/loop0/max_dir_size")'
      ++ PATH=/usr/lib64/lustre/tests/mpi:/usr/lib64/lustre/tests/racer:/usr/lib64/lustre/../lustre-iokit/sgpdd-survey:/usr/lib64/lustre/tests:/usr/lib64/lustre/utils/gss:/usr/lib64/lustre/utils:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/sbin::/usr/lib64/lustre/utils:/usr/lib64/lustre/tests:/sbin:/usr/sbin
      ++ cd /root
      ++ LUSTRE=/usr/lib64/lustre
      ++ sh -c 'echo 16384 >/sys/fs/ldiskfs/loop0/max_dir_size'
      + return 0
      + mkdir -p /mnt/lustre/d0.sanity/d129
      mkdir: cannot create directory `/mnt/lustre/d0.sanity': File too large
      + ls -l /mnt/lustre
      total 0

      Attachments

        Issue Links

          Activity

            People

              wc-triage WC Triage
              shadow Alexey Lyashkov
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: