Whamcloud - gitweb
LU-18728 tests: use urandom to really consume ZFS space 15/58115/8
authorBruno Faccini <bfaccini@nvidia.com>
Tue, 18 Feb 2025 17:36:12 +0000 (18:36 +0100)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Mar 2025 23:33:55 +0000 (23:33 +0000)
It appears newer ZFS is using data compression by default, so reading
from /dev/zero results in files not consuming the expected amount of
space.  Instead, read from /dev/urandom for ZFS to write files in
sanity and conf-sanity to ensure they fill the OSTs, or the image
to be used for target creation, as expected.

Test-Parameters: testgroup=review-zfs env=ZFS_MKFS_OPTS="compression=on"
Signed-off-by: Bruno Faccini <bfaccini@nvidia.com>
Change-Id: I7b4e95032608d8db82c75e4b6dd1ec5beb6f8d99
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58115
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/conf-sanity.sh
lustre/tests/sanity.sh

index a90eaa4..769dce7 100755 (executable)
@@ -30,7 +30,6 @@ fi
 [ "$SLOW" = "no" ] && EXCEPT_SLOW="45 69 106 111 114"
 
 if [[ "$mds1_FSTYPE" == "zfs" ]]; then
-       always_except LU-18652 32b 32c 32e 32h
        always_except LU-18652 108a 112a 112b 113 117 119 121 122a
        always_except LU-18652 123aa 123ab 123ac 123ad 123ae 123af 123ag 123ah 123ahi
        always_except LU-18652 123F 123G 123H 126 129 132 133 135 136 137 150 152 153a 153b 153c 155 802a
@@ -2113,8 +2112,8 @@ t32_verify_quota() {
                "$fsname.quota.ost" ug
 
        chmod 0777 $mnt
-       runas -u $T32_QID -g $T32_QID dd if=/dev/zero of=$mnt/t32_qf_new \
-               bs=1M count=$((img_blimit / 1024)) oflag=sync && {
+       runas -u $T32_QID -g $T32_QID $DD of=$mnt/t32_qf_new \
+               count=$((img_blimit / 1024)) oflag=sync && {
                echo "Write succeed, but expect -EDQUOT"
                return 1
        }
@@ -2165,9 +2164,8 @@ t32_verify_quota() {
                        return 1
                }
 
-               runas -u $T32_QID -g $T32_QID \
-                       dd if=/dev/zero of=$pool_file_new \
-                       bs=1M count=$((img_blimit_pool / 1024)) oflag=sync && {
+               runas -u $T32_QID -g $T32_QID $DD of=$pool_file_new \
+                       count=$((img_blimit_pool / 1024)) oflag=sync && {
                        echo "Write $pool_file_new succeed, but expect -EDQUOT"
                        return 1
                }
index 133985e..77ed27b 100755 (executable)
@@ -30569,7 +30569,7 @@ generate_uneven_mdts() {
        if check_fallocate_supported mds$((min_index + 1)); then
                cmd="fallocate -l 128K "
        else
-               cmd="dd if=/dev/zero bs=128K count=1 of="
+               cmd="$DD bs=128K count=1 of="
        fi
 
        echo "using cmd $cmd"