We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 86011b7 + 93a94f5 commit e812d28Copy full SHA for e812d28
1 file changed
lib/lvm
@@ -99,8 +99,15 @@ function _create_lvm_volume_group {
99
if ! sudo vgs $vg; then
100
# Only create if the file doesn't already exists
101
[[ -f $backing_file ]] || truncate -s $size $backing_file
102
+
103
+ local directio=""
104
+ # Check to see if we can do direct-io
105
+ if losetup -h | grep -q direct-io; then
106
+ directio="--direct-io=on"
107
+ fi
108
109
local vg_dev
- vg_dev=`sudo losetup -f --show $backing_file`
110
+ vg_dev=$(sudo losetup -f --show $directio $backing_file)
111
112
# Only create volume group if it doesn't already exist
113
0 commit comments