[Why] when test fio with write mode, an error is reported: fio: /dev/sda appears mounted, and 'allow_mounted_write' isn't set. [How] add allow_mounted_write when write mode
Signed-off-by: Wei Jihui weijihuiall@163.com --- setup/fio-setup-basic | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/setup/fio-setup-basic b/setup/fio-setup-basic index 58ebeb80..f90963aa 100755 --- a/setup/fio-setup-basic +++ b/setup/fio-setup-basic @@ -116,6 +116,12 @@ $create_task ioscheduler=$ioscheduler" fi
+if [[ "$rw" =~ "write" ]]; then + create_task="\ +$create_task +allow_mounted_write=1" +fi + if parse_bool -q "$time_based"; then create_task=" $create_task
On Wed, Nov 04, 2020 at 12:52:15PM +0800, Wei Jihui wrote:
[Why] when test fio with write mode, an error is reported: fio: /dev/sda appears mounted, and 'allow_mounted_write' isn't set. [How] add allow_mounted_write when write mode
Signed-off-by: Wei Jihui weijihuiall@163.com
setup/fio-setup-basic | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/setup/fio-setup-basic b/setup/fio-setup-basic index 58ebeb80..f90963aa 100755 --- a/setup/fio-setup-basic +++ b/setup/fio-setup-basic @@ -116,6 +116,12 @@ $create_task ioscheduler=$ioscheduler" fi
+if [[ "$rw" =~ "write" ]]; then
It's sh not bash, so cannot use =~ and [[ ]]
Thanks, Fengguang
- create_task="\
+$create_task +allow_mounted_write=1" +fi
if parse_bool -q "$time_based"; then create_task=" $create_task -- 2.23.0