mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-10 02:23:53 +08:00
feat: Support ecryptfs filesystem
This commit is contained in:
parent
277c0946ac
commit
94930b265b
@ -58,8 +58,15 @@ if [ ! -d "$STORAGE" ]; then
|
|||||||
error "Storage folder ($STORAGE) not found!" && exit 13
|
error "Storage folder ($STORAGE) not found!" && exit 13
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Print system info
|
# Check filesystem
|
||||||
FS=$(stat -f -c %T "$STORAGE")
|
FS=$(stat -f -c %T "$STORAGE")
|
||||||
|
|
||||||
|
if [[ "${FS,,}" == "ecryptfs" ]] || [[ "${FS,,}" == "tmpfs" ]]; then
|
||||||
|
DISK_IO="threads"
|
||||||
|
DISK_CACHE="writeback"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Print system info
|
||||||
FS="${FS/ext2\/ext3/ext4}";
|
FS="${FS/ext2\/ext3/ext4}";
|
||||||
SPACE=$(df --output=avail -B 1 "$STORAGE" | tail -n 1)
|
SPACE=$(df --output=avail -B 1 "$STORAGE" | tail -n 1)
|
||||||
SPACE_GB=$(( (SPACE + 1073741823)/1073741824 ))
|
SPACE_GB=$(( (SPACE + 1073741823)/1073741824 ))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user