Details

    • 10591

    Description

      The test in sanity-hsm.sh's cleanup_large_files is often failing with the following:

      /share/lustre-release/lustre/tests/sanity-hsm.sh: line 393: [: /mnt/lustre: integer expression expected
      

      which is because df is using an unexpected output format:

      t2:~# cat /etc/centos-release
      CentOS release 6.4 (Final)
      t2:~# df --version
      df (GNU coreutils) 8.4
      Copyright (C) 2010 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
      
      Written by Torbjörn Granlund, David MacKenzie, and Paul Eggert.
      t2:~#
      t2:~# MOUNT=/mnt/lustre
      t2:~# df /
      Filesystem           1K-blocks      Used Available Use% Mounted on
      /dev/vda1              8255928   3829976   4006576  49% /
      t2:~# df / |awk '{print $5}' |sed 's/%//g' |grep -v Use
      49
      t2:~# df $MOUNT
      Filesystem           1K-blocks      Used Available Use% Mounted on
      192.168.122.200@tcp:/lustre
                             7873984    465136   7008772   7% /mnt/lustre
      t2:~# df $MOUNT |awk '{print $5}' |sed 's/%//g' |grep -v Use
      
      /mnt/lustre
      t2:~# df --portability /mnt/lustre
      Filesystem         1024-blocks      Used Available Capacity Mounted on
      192.168.122.200@tcp:/lustre   7873984    465136   7008772       7% /mnt/lustre
      t2:~# df /mnt/lustre |awk '{print $5}' |sed 's/%//g' |grep -v Use^C
      t2:~# ^C
      t2:~# df --portability /mnt/lustre | awk '{ print $5 }'
      Capacity
      7%
      
      t2:~# df --portability $MOUNT | awk -v MOUNT=$MOUNT '$1 == MOUNT { print $5 }'
      t2:~# df --portability $MOUNT
      Filesystem         1024-blocks      Used Available Capacity Mounted on
      192.168.122.200@tcp:/lustre   7873984    305344   7165504       5% /mnt/lustre
      t2:~# df --portability $MOUNT | awk -v MOUNT=$MOUNT '$6 == MOUNT { print $5 }'
      5%
      t2:~#
      

      Attachments

        Activity

          People

            bfaccini Bruno Faccini (Inactive)
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: