error "import of $1 to $2 failed"
}
-make_archive() {
- local file=$HSM_ARCHIVE/$1
- do_facet $SINGLEAGT mkdir -p $(dirname $file)
- do_facet $SINGLEAGT dd if=/dev/urandom of=$file count=32 bs=1000000 ||
- file_creation_failure dd $file $?
+file_creation_failure() {
+ local cmd=$1
+ local file=$2
+ local err=$3
+
+ case $err in
+ 28)
+ df $MOUNT $MOUNT2 >&2
+ error "Not enough space to create $file with $cmd"
+ ;;
+ *)
+ error "cannot create $file with $cmd, status=$err"
+ ;;
+ esac
+}
+
+# Creates a file using dd
+create_file() {
+ local file=$1
+ local bs=$2
+ local count=$3
+ local conv=$4
+ local if=${5:-/dev/zero}
+ local facet=$SINGLEAGT
+
+ local cmd
+ printf -v cmd 'do_facet "%s" dd if="%s" of="%s" count=%s bs=%s' \
+ "$facet" "$if" "$file" "$count" "$bs"
+ [ -n "$conv" ] && cmd+=" conv=$conv"
+
+ # Create the directory in case it does not exist
+ do_facet "$facet" mkdir -p "$(dirname "$file")"
+ # Delete the file in case it already exist
+ do_facet "$facet" rm -f "$file"
+
+ if eval "$cmd"; then
+ # print the FID if the file is not an archive
+ [[ "$file" =~ ^$HSM_ARCHIVE ]] || path2fid "$file" ||
+ error "cannot get fid on '$file'"
+ else
+ local err=$?
+ printf "$cmd failed with $err\n" >&2;
+ # Let the caller decide what to do on error
+ return $err;
+ fi
+}
+
+create_empty_file() {
+ create_file "${1/$DIR/$DIR2}" 1M 0 ||
+ file_creation_failure dd "${1/$DIR/$DIR2}" $?
+}
+
+create_small_file() {
+ local source_file=/dev/urandom
+ local count=1
+ local bs=1M
+ local conv=${2:-fsync}
+
+ create_file "${1/$DIR/$DIR2}" $bs $count $conv $source_file ||
+ file_creation_failure dd "${1/$DIR/$DIR2}" $?
+}
+
+create_small_sync_file() {
+ create_small_file "$1" sync
+}
+
+create_archive_file() {
+ local if=/dev/urandom
+ local count=${2:-39}
+ local bs=1M
+ local facet=$SINGLEAGT
+
+ # Create the counterpart directory of the archive
+ do_facet "$facet" mkdir -p "$DIR2/$(dirname "$1")"
+ create_file "${HSM_ARCHIVE}/$1" $bs $count "" $if ||
+ file_creation_failure dd "${HSM_ARCHIVE}/$1" $?
}
copy2archive() {
st=$($LFS hsm_state $f)
[[ $? == 0 ]] || error "$LFS hsm_state $f failed"
- local ar=$(echo $st | grep "archive_id" | cut -f5 -d" " |
- cut -f2 -d:)
+ local ar=$(echo $st | grep -oP '(?<=archive_id:).*')
echo $ar
}
[[ $st == $fl ]] || error "hsm flags on $f are $st != $fl"
}
-file_creation_failure() {
- local cmd=$1
- local f=$2
- local err=$3
-
- df $MOUNT $MOUNT2 >&2
- error "cannot create $f with $cmd, status=$err"
-}
-
copy_file() {
local f=
path2fid $f || error "cannot get fid on $f"
}
-make_small() {
- local file2=${1/$DIR/$DIR2}
- dd if=/dev/urandom of=$file2 count=2 bs=1M conv=fsync ||
- file_creation_failure dd $file2 $?
-
- path2fid $1 || error "cannot get fid on $1"
-}
-
-make_small_sync() {
- dd if=/dev/urandom of=$1 count=1 bs=1M conv=sync ||
- file_creation_failure dd $1 $?
- path2fid $1 || error "cannot get fid on $1"
-}
-
-cleanup_large_files() {
- local ratio=$(df -P $MOUNT | tail -1 | awk '{print $5}' |
- sed 's/%//g')
- [ $ratio -gt 50 ] && find $MOUNT -size +10M -exec rm -f {} \;
-}
-
-check_enough_free_space() {
- local nb=$1
- local unit=$2
- local need=$((nb * unit /1024))
- local free=$(df -kP $MOUNT | tail -1 | awk '{print $4}')
- (( $need >= $free )) && return 1
- return 0
+# Delete any file bigger than 10M under $MOUNT and wait for deletes to complete
+#
+# Note that this might lead to surprising behaviours such as deleting an
+# important file for the currently running test
+delete_large_files() {
+ printf "Deleting large files...\n" >&2
+ find $MOUNT -size +10M -delete
+ wait_delete_completed
}
make_custom_file_for_progress() {
- local file2=${1/$DIR/$DIR2}
- local fsize=${2:-"39"}
- local blksz=$($LCTL get_param -n lov.*-clilov-*.stripesize | head -n1)
- blksz=${3:-$blksz}
-
- [[ $fsize -gt 0 ]] || error "Invalid file size"
- [[ $blksz -gt 0 ]] || error "Invalid stripe size"
-
- cleanup_large_files
- check_enough_free_space $fsize $blksz || return $?
- dd if=/dev/zero of=$file2 count=$fsize bs=$blksz conv=fsync ||
- file_creation_failure dd $file2 $?
- path2fid $1 || error "cannot get fid on $1"
+ local count=${2:-"39"}
+ local bs=$($LCTL get_param -n lov.*-clilov-*.stripesize | head -n1)
+ bs=${3:-$bs}
+
+ [[ $count -gt 0 ]] || error "Invalid file size"
+ [[ $bs -gt 0 ]] || error "Invalid stripe size"
+
+ if ! create_file "${1/$DIR/$DIR2}" $bs $count fsync; then
+ echo "The creation of '${1/$DIR/$DIR2}' failed" >&2
+ echo "It might be due to a lack of space in the filesystem" >&2
+ delete_large_files >&2
+ create_file "${1/$DIR/$DIR2}" $bs $count fsync ||
+ file_creation_failure dd "${1/$DIR/$DIR2}" $?
+ fi
}
wait_result() {
run_test 1 "lfs hsm flags root/non-root access"
test_1a() {
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
- local fid=$(make_small $f)
+ local fid=$(create_small_file $f)
copytool_setup
}
run_test 1b "Archive, Release & Restore composite file"
-test_2() {
+test_1c() {
mkdir -p $DIR/$tdir
+ chmod 777 $DIR/$tdir
+
+ local f=$DIR/$tdir/$tfile
+ $RUNAS touch $f
+
+ # Test whether we can set the maximum archive number.
+ local LOCAL_HSM_ARCHIVE_NUMBER=32
+ $LFS hsm_set --exists --archive-id $LOCAL_HSM_ARCHIVE_NUMBER $f ||
+ error "root could not change hsm flags"
+ check_hsm_flags_user $f "0x00000001"
+ echo "verifying archive number is $LOCAL_HSM_ARCHIVE_NUMBER"
+ local st=$(get_hsm_archive_id $f)
+ [[ $st == $LOCAL_HSM_ARCHIVE_NUMBER ]] ||
+ error "wrong archive number, $st != $LOCAL_HSM_ARCHIVE_NUMBER"
+
+ # Test whether setting archive number 0 results in no change.
+ $LFS hsm_set --exists --archive-id 0 $f ||
+ error "root could not change hsm flags"
+ check_hsm_flags_user $f "0x00000001"
+ echo "verifying archive number is still $LOCAL_HSM_ARCHIVE_NUMBER"
+ st=$(get_hsm_archive_id $f)
+ [[ $st == $LOCAL_HSM_ARCHIVE_NUMBER ]] ||
+ error "wrong archive number, $st != $LOCAL_HSM_ARCHIVE_NUMBER"
+
+ # Test whether setting archive number > 32 results in error.
+ $LFS hsm_set --exists --archive-id 33 $f &&
+ error "archive number is larger than 32"
+ check_hsm_flags_user $f "0x00000001"
+
+ # Test whether setting archive number 16 and archived flag.
+ LOCAL_HSM_ARCHIVE_NUMBER=16
+ $LFS hsm_set --exists --archived \
+ --archive-id $LOCAL_HSM_ARCHIVE_NUMBER $f ||
+ error "root could not change hsm flags"
+ check_hsm_flags_user $f "0x00000009"
+ echo "verifying archive number is $LOCAL_HSM_ARCHIVE_NUMBER"
+ st=$(get_hsm_archive_id $f)
+ [[ $st == $LOCAL_HSM_ARCHIVE_NUMBER ]] ||
+ error "wrong archive number, $st != $LOCAL_HSM_ARCHIVE_NUMBER"
+}
+run_test 1c "Check setting archive-id in lfs hsm_set"
+
+test_2() {
local f=$DIR/$tdir/$tfile
- touch $f
+
+ create_empty_file "$f"
# New files are not dirty
check_hsm_flags $f "0x00000000"
run_test 3 "Check file dirtyness when opening for write"
test_4() {
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
- local fid=$(make_small $f)
+ local fid=$(create_small_file $f)
$LFS hsm_cancel $f
local st=$(get_request_state $fid CANCEL)
trap "copytool_cleanup $(comma_list $(agts_nodes))" EXIT
# archive files
- mkdir -p $DIR/$tdir
for n in $(seq $AGTCOUNT); do
file=$DIR/$tdir/$tfile.$n
- fid=$(make_small $file)
+ fid=$(create_small_file $file)
$LFS hsm_archive $file || error "could not archive file $file"
wait_request_state $fid ARCHIVE SUCCEED
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
- $LFS setstripe -c 2 $f
+ mkdir -p $DIR/$tdir
+ $LFS setstripe -c 2 "$f"
local fid
fid=$(make_custom_file_for_progress $f 5)
[ $? != 0 ] && skip "not enough free space" && return
# test needs a running copytool
copytool_setup $SINGLEAGT $MOUNT3
- mkdir $DIR/$tdir
local f=$DIR/$tdir/$tfile
local f2=$DIR2/$tdir/$tfile
- local fid=$(make_small $f)
+ local fid=$(create_small_file $f)
local orig_size=$(stat -c "%s" $f)
$LFS hsm_archive --archive $HSM_ARCHIVE_NUMBER $f
copytool_setup
# archive a file
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
- local fid=$(make_small $f)
+ local fid=$(create_small_file $f)
local sum=$(md5sum $f | awk '{print $1}')
$LFS hsm_archive $f || error "could not archive file"
wait_request_state $fid ARCHIVE SUCCEED
- # delete the file
- rm -f $f
# create released file (simulate llapi_hsm_import call)
- touch $f
- local fid2=$(path2fid $f)
+ local fid2=$(create_empty_file "$f")
$LFS hsm_set --archived --exists $f || error "could not force hsm flags"
$LFS hsm_release $f || error "could not release file"
copytool_setup
# archive files
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local count=5
local tmpfile=$SHARED_DIRECTORY/tmp.$$
local fids=()
local sums=()
for i in $(seq 1 $count); do
- fids[$i]=$(make_small $f.$i)
+ fids[$i]=$(create_small_file $f.$i)
sums[$i]=$(md5sum $f.$i | awk '{print $1}')
$LFS hsm_archive $f.$i || error "could not archive file"
done
:>$tmpfile
# delete the files
for i in $(seq 1 $count); do
- rm -f $f.$i
- touch $f.$i
- local fid2=$(path2fid $f.$i)
+ local fid2=$(create_empty_file "${f}.${i}")
# add the rebind operation to the list
echo ${fids[$i]} $fid2 >> $tmpfile
run_test 16 "Test CT bandwith control option"
test_20() {
- mkdir -p $DIR/$tdir
-
local f=$DIR/$tdir/$tfile
- touch $f || error "touch $f failed"
+ create_empty_file "$f"
# Could not release a non-archived file
$LFS hsm_release $f && error "release should not succeed"
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/test_release
# Create a file and check its states
- local fid=$(make_small $f)
+ local fid=$(create_small_file $f)
check_hsm_flags $f "0x00000000"
# LU-4388/LU-4389 - ZFS does not report full number of blocks
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
-
local f=$DIR/$tdir/test_release
local swap=$DIR/$tdir/test_swap
# Create a file and check its states
- local fid=$(make_small $f)
+ local fid=$(create_small_file $f)
check_hsm_flags $f "0x00000000"
$LFS hsm_archive $f || error "could not archive file"
$LFS hsm_release $f || error "could not release file"
check_hsm_flags $f "0x0000000d"
- make_small $swap
+ create_small_file $swap
$LFS swap_layouts $swap $f && error "swap_layouts should failed"
true
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
-
local f=$DIR/$tdir/test_mtime
# Create a file and check its states
- local fid=$(make_small $f)
+ local fid=$(create_small_file $f)
check_hsm_flags $f "0x00000000"
$LFS hsm_archive $f || error "could not archive file"
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
- rm -f $file
- fid=$(make_small $file)
+ fid=$(create_small_file $file)
# Create a file and check its states
check_hsm_flags $file "0x00000000"
# Test needs a running copytool.
copytool_setup
- mkdir -p $DIR/$tdir
# Check that root can do HSM actions on a regular user's file.
- rm -f $file
- fid=$(make_small $file)
+ fid=$(create_small_file $file)
sum0=$(md5sum $file)
chown $RUNAS_ID:$RUNAS_GID $file ||
trap cleanup_test_24c EXIT
# User.
- rm -f $file
- make_small $file
+ create_small_file $file
chown $RUNAS_ID:nobody $file ||
error "cannot chown '$file' to '$RUNAS_ID:nobody'"
error "$action by user should succeed"
# Group.
- rm -f $file
- make_small $file
+ create_small_file $file
chown nobody:$RUNAS_GID $file ||
error "cannot chown '$file' to 'nobody:$RUNAS_GID'"
error "$action by group should succeed"
# Other.
- rm -f $file
- make_small $file
+ create_small_file $file
chown nobody:nobody $file ||
error "cannot chown '$file' to 'nobody:nobody'"
local fid1
local fid2
- mkdir -p $DIR/$tdir
- rm -f $file1
- fid1=$(make_small $file1)
+ fid1=$(create_small_file $file1)
echo $fid1
$LFS getstripe $file1
test_24e() {
copytool_setup
- mkdir -p $DIR/$tdir
-
local f=$DIR/$tdir/$tfile
local fid
- fid=$(make_small $f) || error "cannot create $f"
+ fid=$(create_small_file $f) || error "cannot create $f"
$LFS hsm_archive $f || error "cannot archive $f"
wait_request_state $fid ARCHIVE SUCCEED
$LFS hsm_release $f || error "cannot release $f"
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 39 1000000)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
- make_archive $tdir/$tfile
+ create_archive_file $tdir/$tfile
local f=$DIR/$tdir/$tfile
import_file $tdir/$tfile $f
local fid=$(path2fid $f)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 39 1000000)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 39 1000000)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
- local fid=$(make_small $f)
+ local fid=$(create_small_file $f)
$LFS hsm_archive --archive $HSM_ARCHIVE_NUMBER $f
wait_request_state $fid ARCHIVE SUCCEED
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
- local fid1=$(make_small $DIR/$tdir/$tfile-1)
- local fid2=$(make_small $DIR/$tdir/$tfile-2)
- local fid3=$(make_small $DIR/$tdir/$tfile-3)
+ local fid1=$(create_small_file $DIR/$tdir/$tfile-1)
+ local fid2=$(create_small_file $DIR/$tdir/$tfile-2)
+ local fid3=$(create_small_file $DIR/$tdir/$tfile-3)
$LFS hsm_archive --archive $HSM_ARCHIVE_NUMBER $DIR/$tdir/$tfile-[1-3]
wait_request_state $fid1 ARCHIVE SUCCEED
trap "copytool_cleanup $(comma_list $(agts_nodes))" EXIT
# archive files
- mkdir -p $DIR/$tdir
file=$DIR/$tdir/$tfile
- fid=$(make_small $file)
+ fid=$(create_small_file $file)
$LFS hsm_archive $file
wait_request_state $fid ARCHIVE SUCCEED
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
-
- make_archive $tdir/$tfile
+ create_archive_file $tdir/$tfile
local f=$DIR/$tdir/$tfile
import_file $tdir/$tfile $f
local fid=$($LFS path2fid $f)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
-
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 39 1000000)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
-
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 33 1048576)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
-
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 39 1000000)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
-
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 39 1000000)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
-
local f=$DIR/$tdir/$tfile
local f1=$DIR/$tdir/$tfile-1
local fid
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
-
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 39 1000000)
copytool_cleanup
copytool_setup $SINGLEAGT $MOUNT2
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local fid
- fid=$(make_small $f) || error "cannot create small file"
+ fid=$(create_small_file $f) || error "cannot create small file"
$LFS hsm_archive --archive $HSM_ARCHIVE_NUMBER $f
wait_request_state $fid ARCHIVE SUCCEED
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local fid=$(make_custom_file_for_progress $f 39 1000000)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local fid=$(make_custom_file_for_progress $f 39 1000000)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 39 1000000)
copytool_cleanup
HSMTOOL_UPDATE_INTERVAL=$interval copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 10)
HSMTOOL_UPDATE_INTERVAL=$interval \
HSMTOOL_EVENT_FIFO=$HSMTOOL_MONITOR_DIR/fifo copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 39 1000000)
DATAHEX='[434541]'
test_104() {
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 39 1000000)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 103 1048576)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
- make_archive $tdir/$tfile
+ create_archive_file $tdir/$tfile
import_file $tdir/$tfile $f
local fid=$(path2fid $f)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 39 1000000)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
-
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 103 1048576)
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
-
local f=$DIR/$tdir/$tfile
- make_archive $tdir/$tfile
+ create_archive_file $tdir/$tfile
changelog_setup
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
-
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 39 1000000)
copytool_cleanup
return 0
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 39 1000000)
# test needs a running copytool
copytool_setup
- local fid=$(make_small_sync $DIR/$tfile)
+ local fid=$(create_small_sync_file $DIR/$tfile)
$LFS hsm_archive --archive $HSM_ARCHIVE_NUMBER $DIR/$tfile
wait_request_state $fid ARCHIVE SUCCEED
# test needs a running copytool
copytool_setup
- mkdir -p $DIR/$tdir
local f=$DIR/$tdir/$tfile
local fid
fid=$(make_custom_file_for_progress $f 103 1048576)
}
run_test 252 "Timeout'ed running archive of a removed file should be canceled"
+test_253() {
+ local rc
+ # test needs a running copytool
+ copytool_setup
+
+ mkdir -p $DIR/$tdir
+ local f=$DIR/$tdir/$tfile
+
+ dd if=/dev/zero of=$f bs=1MB count=10
+ local fid=$(path2fid $f)
+
+ $LFS hsm_archive $f || error "could not archive file"
+ wait_request_state $fid ARCHIVE SUCCEED
+
+ # clear locks to discard inode data
+ cancel_lru_locks osc
+
+ #define OBD_FAIL_MDC_MERGE 0x807
+ $LCTL set_param fail_loc=0x807
+
+ #expect error here, instead of release with wrong size
+ $LFS hsm_release $f
+ rc=$?
+ if ((rc == 0)); then
+ file_size=$(stat -c '%s' $f)
+ if ((file_size != 10485760)); then
+ error "Wrong file size after hsm_release"
+ fi
+ else
+ echo "could not release file"
+ fi
+ copytool_cleanup
+}
+run_test 253 "Check for wrong file size after release"
+
test_300() {
# the only way to test ondisk conf is to restart MDS ...
echo "Stop coordinator and remove coordinator state at mount"
$LFS mkdir -i 1 $dir_mdt1 || error "lfs mkdir"
# create 1 file in each MDT
- local fid1=$(make_small $dir_mdt0/$tfile)
- local fid2=$(make_small $dir_mdt1/$tfile)
+ local fid1=$(create_small_file $dir_mdt0/$tfile)
+ local fid2=$(create_small_file $dir_mdt1/$tfile)
# check that hsm request on mdt0 is sent to the right MDS
$LFS hsm_archive $dir_mdt0/$tfile || error "lfs hsm_archive"
$LFS mkdir -i 1 $dir_mdt1 || error "lfs mkdir"
# create 1 file in each MDT
- local fid1=$(make_small $dir_mdt0/$tfile)
- local fid2=$(make_small $dir_mdt1/$tfile)
+ local fid1=$(create_small_file $dir_mdt0/$tfile)
+ local fid2=$(create_small_file $dir_mdt1/$tfile)
# check that compound requests are shunt to the rights MDTs
$LFS hsm_archive $dir_mdt0/$tfile $dir_mdt1/$tfile ||
$LFS mkdir -i 0 $dir_mdt0 || error "lfs mkdir"
# create 1 file on mdt0
- local fid1=$(make_small $dir_mdt0/$tfile)
+ local fid1=$(create_small_file $dir_mdt0/$tfile)
# deactivate all mdc for MDT0001
mdc_change_state $SINGLEAGT "$FSNAME-MDT0001" "deactivate"
# create striped dir on all of MDTs
$LFS mkdir -i 0 -c $MDSCOUNT $striped_dir || error "lfs mkdir"
- local fid1=$(make_small_sync $striped_dir/${tfile}_0)
- local fid2=$(make_small_sync $striped_dir/${tfile}_1)
- local fid3=$(make_small_sync $striped_dir/${tfile}_2)
- local fid4=$(make_small_sync $striped_dir/${tfile}_3)
+ local fid1=$(create_small_sync_file $striped_dir/${tfile}_0)
+ local fid2=$(create_small_sync_file $striped_dir/${tfile}_1)
+ local fid3=$(create_small_sync_file $striped_dir/${tfile}_2)
+ local fid4=$(create_small_sync_file $striped_dir/${tfile}_3)
local idx1=$($LFS getstripe -M $striped_dir/${tfile}_0)
local idx2=$($LFS getstripe -M $striped_dir/${tfile}_1)
local mdt_index
copytool_setup
- mkdir -p $DIR/$tdir
- fid=$(make_small $DIR/$tdir/$tfile)
+ fid=$(create_small_file $DIR/$tdir/$tfile)
echo "old fid $fid"
$LFS hsm_archive $DIR/$tdir/$tfile