mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
Use fallocate instead of truncate
This commit is contained in:
parent
5bd90dc285
commit
c88072c97e
2
disk.sh
2
disk.sh
@ -14,7 +14,7 @@ DATA="$IMG/data$DISK_SIZE.img"
|
|||||||
|
|
||||||
if [ ! -f "$DATA" ]; then
|
if [ ! -f "$DATA" ]; then
|
||||||
# Create an empty file
|
# Create an empty file
|
||||||
truncate -s "${NEW_SIZE}" "${DATA}"
|
fallocate -l "${NEW_SIZE}" "${DATA}"
|
||||||
# Format as BTRFS filesystem
|
# Format as BTRFS filesystem
|
||||||
mkfs.btrfs -q -L data -d single -m dup "${DATA}" > /dev/null
|
mkfs.btrfs -q -L data -d single -m dup "${DATA}" > /dev/null
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user