HSM _not only_ small fixes and to do list goes here (LU-3647)

[LU-3973] cleanup_large_files may use df incorrectly Created: 18/Sep/13  Updated: 03/Jun/14  Resolved: 18/Nov/13

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.6.0, Lustre 2.5.1

Type: Technical task Priority: Minor
Reporter: John Hammond Assignee: Bruno Faccini (Inactive)
Resolution: Fixed Votes: 0
Labels: HSM

Rank (Obsolete): 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:~#


 Comments   
Comment by jacques-charles lafoucriere [ 19/Sep/13 ]

Do we add a new small tool in lustre/tests which will do a statfs and use a known format? We can also extend multiop but it is not really ralated.

Comment by Andreas Dilger [ 20/Sep/13 ]

This is what "df -P" is for. I don't see why we need a different tool?

Comment by Bruno Faccini (Inactive) [ 10/Oct/13 ]

Seems that more and more sanity-hsm auto-tests runs hit this ...
Patch is at http://review.whamcloud.com/7915.

Comment by Bruno Faccini (Inactive) [ 18/Nov/13 ]

patch has land.

Generated at Sat Feb 10 01:38:32 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.