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

lfs df output is treated as binary data on RHEL 8.0 client

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.13.0, Lustre 2.12.3
    • None
    • None
    • Lustre client distro: RHEL 8.0
    • 3
    • 9223372036854775807

    Description

      On RHEL 8.0 client, the output of "lfs df" is treated as binary data:

      # lfs df | grep summary
      Binary file (standard input) matches
      

      The above issue caused many tests failed.

      In Lustre test scripts, we can use "grep -a" to resolve the issue:

      -a, --text
                    Process a binary file as if it were text; this is equivalent to the --binary-files=text option.
      
      # lfs df | grep -a summary
      filesystem_summary:     13528032       76072    12685192   1% /mnt/lustre
      

      Attachments

        Issue Links

          Activity

            [LU-12396] lfs df output is treated as binary data on RHEL 8.0 client
            pjones Peter Jones added a comment -

            The patch containing the fix is still in flight ATM - let's hold off marking the fix version until it has landed to b2_12

            pjones Peter Jones added a comment - The patch containing the fix is still in flight ATM - let's hold off marking the fix version until it has landed to b2_12

            The b2_12 backport of this patch was merged into https://review.whamcloud.com/35226 so that it does not fail testing.

            adilger Andreas Dilger added a comment - The b2_12 backport of this patch was merged into https://review.whamcloud.com/35226 so that it does not fail testing.

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35137/
            Subject: LU-12396 utils: lfs should not output 'nul' char
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: f232d906f755c3ea823c5cf17b7729a6a3bd8fe5

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35137/ Subject: LU-12396 utils: lfs should not output 'nul' char Project: fs/lustre-release Branch: master Current Patch Set: Commit: f232d906f755c3ea823c5cf17b7729a6a3bd8fe5

            Yang Sheng (ys@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35137
            Subject: LU-12396 utils: lfs should not output 'nul' char
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: fdfbeeec670e60282300cd591baa4311fe4b885c

            gerrit Gerrit Updater added a comment - Yang Sheng (ys@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35137 Subject: LU-12396 utils: lfs should not output 'nul' char Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: fdfbeeec670e60282300cd591baa4311fe4b885c

            There appears to be a NUL character in the output:

            000130   t   /   l   u   s   t   r   e   [   O   S   T   :   1   ]  sp
                    74  2f  6c  75  73  74  72  65  5b  4f  53  54  3a  31  5d  20
            000140 nul  nl  nl   f   i   l   e   s   y   s   t   e   m   _   s   u
                    00  0a  0a  66  69  6c  65  73  79  73  74  65  6d  5f  73  75
            
            adilger Andreas Dilger added a comment - There appears to be a NUL character in the output: 000130 t / l u s t r e [ O S T : 1 ] sp 74 2f 6c 75 73 74 72 65 5b 4f 53 54 3a 31 5d 20 000140 nul nl nl f i l e s y s t e m _ s u 00 0a 0a 66 69 6c 65 73 79 73 74 65 6d 5f 73 75
            yujian Jian Yu added a comment -

            Sure, Andreas. Here is the output:

            [root@vm8 tests]# lfs df | od -Ax -a -tx1
            000000   U   U   I   D  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp
                    55  55  49  44  20  20  20  20  20  20  20  20  20  20  20  20
            000010  sp  sp  sp  sp  sp  sp  sp   1   K   -   b   l   o   c   k   s
                    20  20  20  20  20  20  20  31  4b  2d  62  6c  6f  63  6b  73
            000020  sp  sp  sp  sp  sp  sp  sp  sp   U   s   e   d  sp  sp  sp   A
                    20  20  20  20  20  20  20  20  55  73  65  64  20  20  20  41
            000030   v   a   i   l   a   b   l   e  sp   U   s   e   %  sp   M   o
                    76  61  69  6c  61  62  6c  65  20  55  73  65  25  20  4d  6f
            000040   u   n   t   e   d  sp   o   n  nl   l   u   s   t   r   e   -
                    75  6e  74  65  64  20  6f  6e  0a  6c  75  73  74  72  65  2d
            000050   M   D   T   0   0   0   0   _   U   U   I   D  sp  sp  sp  sp
                    4d  44  54  30  30  30  30  5f  55  55  49  44  20  20  20  20
            000060  sp  sp   1   1   6   5   9   0   0  sp  sp  sp  sp  sp  sp  sp
                    20  20  31  31  36  35  39  30  30  20  20  20  20  20  20  20
            000070  sp   7   5   9   6  sp  sp  sp  sp  sp   1   0   5   5   1   0
                    20  37  35  39  36  20  20  20  20  20  31  30  35  35  31  30
            000080   8  sp  sp  sp   1   %  sp   /   m   n   t   /   l   u   s   t
                    38  20  20  20  31  25  20  2f  6d  6e  74  2f  6c  75  73  74
            000090   r   e   [   M   D   T   :   0   ]  sp nul  nl   l   u   s   t
                    72  65  5b  4d  44  54  3a  30  5d  20  00  0a  6c  75  73  74
            0000a0   r   e   -   O   S   T   0   0   0   0   _   U   U   I   D  sp
                    72  65  2d  4f  53  54  30  30  30  30  5f  55  55  49  44  20
            0000b0  sp  sp  sp  sp  sp   6   7   6   4   0   1   6  sp  sp  sp  sp
                    20  20  20  20  20  36  37  36  34  30  31  36  20  20  20  20
            0000c0  sp  sp  sp   3   8   0   3   6  sp  sp  sp  sp  sp   6   3   4
                    20  20  20  33  38  30  33  36  20  20  20  20  20  36  33  34
            0000d0   2   5   9   6  sp  sp  sp   1   %  sp   /   m   n   t   /   l
                    32  35  39  36  20  20  20  31  25  20  2f  6d  6e  74  2f  6c
            0000e0   u   s   t   r   e   [   O   S   T   :   0   ]  sp nul  nl   l
                    75  73  74  72  65  5b  4f  53  54  3a  30  5d  20  00  0a  6c
            0000f0   u   s   t   r   e   -   O   S   T   0   0   0   1   _   U   U
                    75  73  74  72  65  2d  4f  53  54  30  30  30  31  5f  55  55
            000100   I   D  sp  sp  sp  sp  sp  sp   6   7   6   4   0   1   6  sp
                    49  44  20  20  20  20  20  20  36  37  36  34  30  31  36  20
            000110  sp  sp  sp  sp  sp  sp   3   8   0   3   6  sp  sp  sp  sp  sp
                    20  20  20  20  20  20  33  38  30  33  36  20  20  20  20  20
            000120   6   3   4   2   5   9   6  sp  sp  sp   1   %  sp   /   m   n
                    36  33  34  32  35  39  36  20  20  20  31  25  20  2f  6d  6e
            000130   t   /   l   u   s   t   r   e   [   O   S   T   :   1   ]  sp
                    74  2f  6c  75  73  74  72  65  5b  4f  53  54  3a  31  5d  20
            000140 nul  nl  nl   f   i   l   e   s   y   s   t   e   m   _   s   u
                    00  0a  0a  66  69  6c  65  73  79  73  74  65  6d  5f  73  75
            000150   m   m   a   r   y   :  sp  sp  sp  sp  sp   1   3   5   2   8
                    6d  6d  61  72  79  3a  20  20  20  20  20  31  33  35  32  38
            000160   0   3   2  sp  sp  sp  sp  sp  sp  sp   7   6   0   7   2  sp
                    30  33  32  20  20  20  20  20  20  20  37  36  30  37  32  20
            000170  sp  sp  sp   1   2   6   8   5   1   9   2  sp  sp  sp   1   %
                    20  20  20  31  32  36  38  35  31  39  32  20  20  20  31  25
            000180  sp   /   m   n   t   /   l   u   s   t   r   e  nl  nl
                    20  2f  6d  6e  74  2f  6c  75  73  74  72  65  0a  0a
            00018e
            

            There are 7 "0a".

            yujian Jian Yu added a comment - Sure, Andreas. Here is the output: [root@vm8 tests]# lfs df | od -Ax -a -tx1 000000 U U I D sp sp sp sp sp sp sp sp sp sp sp sp 55 55 49 44 20 20 20 20 20 20 20 20 20 20 20 20 000010 sp sp sp sp sp sp sp 1 K - b l o c k s 20 20 20 20 20 20 20 31 4b 2d 62 6c 6f 63 6b 73 000020 sp sp sp sp sp sp sp sp U s e d sp sp sp A 20 20 20 20 20 20 20 20 55 73 65 64 20 20 20 41 000030 v a i l a b l e sp U s e % sp M o 76 61 69 6c 61 62 6c 65 20 55 73 65 25 20 4d 6f 000040 u n t e d sp o n nl l u s t r e - 75 6e 74 65 64 20 6f 6e 0a 6c 75 73 74 72 65 2d 000050 M D T 0 0 0 0 _ U U I D sp sp sp sp 4d 44 54 30 30 30 30 5f 55 55 49 44 20 20 20 20 000060 sp sp 1 1 6 5 9 0 0 sp sp sp sp sp sp sp 20 20 31 31 36 35 39 30 30 20 20 20 20 20 20 20 000070 sp 7 5 9 6 sp sp sp sp sp 1 0 5 5 1 0 20 37 35 39 36 20 20 20 20 20 31 30 35 35 31 30 000080 8 sp sp sp 1 % sp / m n t / l u s t 38 20 20 20 31 25 20 2f 6d 6e 74 2f 6c 75 73 74 000090 r e [ M D T : 0 ] sp nul nl l u s t 72 65 5b 4d 44 54 3a 30 5d 20 00 0a 6c 75 73 74 0000a0 r e - O S T 0 0 0 0 _ U U I D sp 72 65 2d 4f 53 54 30 30 30 30 5f 55 55 49 44 20 0000b0 sp sp sp sp sp 6 7 6 4 0 1 6 sp sp sp sp 20 20 20 20 20 36 37 36 34 30 31 36 20 20 20 20 0000c0 sp sp sp 3 8 0 3 6 sp sp sp sp sp 6 3 4 20 20 20 33 38 30 33 36 20 20 20 20 20 36 33 34 0000d0 2 5 9 6 sp sp sp 1 % sp / m n t / l 32 35 39 36 20 20 20 31 25 20 2f 6d 6e 74 2f 6c 0000e0 u s t r e [ O S T : 0 ] sp nul nl l 75 73 74 72 65 5b 4f 53 54 3a 30 5d 20 00 0a 6c 0000f0 u s t r e - O S T 0 0 0 1 _ U U 75 73 74 72 65 2d 4f 53 54 30 30 30 31 5f 55 55 000100 I D sp sp sp sp sp sp 6 7 6 4 0 1 6 sp 49 44 20 20 20 20 20 20 36 37 36 34 30 31 36 20 000110 sp sp sp sp sp sp 3 8 0 3 6 sp sp sp sp sp 20 20 20 20 20 20 33 38 30 33 36 20 20 20 20 20 000120 6 3 4 2 5 9 6 sp sp sp 1 % sp / m n 36 33 34 32 35 39 36 20 20 20 31 25 20 2f 6d 6e 000130 t / l u s t r e [ O S T : 1 ] sp 74 2f 6c 75 73 74 72 65 5b 4f 53 54 3a 31 5d 20 000140 nul nl nl f i l e s y s t e m _ s u 00 0a 0a 66 69 6c 65 73 79 73 74 65 6d 5f 73 75 000150 m m a r y : sp sp sp sp sp 1 3 5 2 8 6d 6d 61 72 79 3a 20 20 20 20 20 31 33 35 32 38 000160 0 3 2 sp sp sp sp sp sp sp 7 6 0 7 2 sp 30 33 32 20 20 20 20 20 20 20 37 36 30 37 32 20 000170 sp sp sp 1 2 6 8 5 1 9 2 sp sp sp 1 % 20 20 20 31 32 36 38 35 31 39 32 20 20 20 31 25 000180 sp / m n t / l u s t r e nl nl 20 2f 6d 6e 74 2f 6c 75 73 74 72 65 0a 0a 00018e There are 7 "0a".

            Jian, can you please attach the output from "lfs df | od -Ax -a -tx1" so we can see if there are any non-ASCII characters in the output. The only non-printable character should be "0a" ("\n").

            adilger Andreas Dilger added a comment - Jian, can you please attach the output from " lfs df | od -Ax -a -tx1 " so we can see if there are any non-ASCII characters in the output. The only non-printable character should be " 0a " (" \n ").

            People

              ys Yang Sheng
              yujian Jian Yu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: