mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
feat: Detect COW on BTRFS
This commit is contained in:
parent
6599861dbb
commit
631568681e
@ -55,6 +55,13 @@ FS=$(stat -f -c %T "$STORAGE")
|
|||||||
if [[ "$FS" == "overlay"* ]]; then
|
if [[ "$FS" == "overlay"* ]]; then
|
||||||
info "Warning: the filesystem of $STORAGE is OverlayFS, this usually means it was binded to an invalid path!"
|
info "Warning: the filesystem of $STORAGE is OverlayFS, this usually means it was binded to an invalid path!"
|
||||||
fi
|
fi
|
||||||
|
if [[ "$FS" == "btrfs"* ]]; then
|
||||||
|
FA=$(lsattr -d "$STORAGE")
|
||||||
|
if [[ "$FA" != *"C"* ]]; then
|
||||||
|
info "Warning: the filesystem of $STORAGE is BTRFS, and COW (copy on write) is not disabled for that folder!"
|
||||||
|
info "This will negatively affect write performance, please empty the folder and disable COW (chattr +C <path>)."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$FS" != "fat"* && "$FS" != "vfat"* && "$FS" != "exfat"* && \
|
if [[ "$FS" != "fat"* && "$FS" != "vfat"* && "$FS" != "exfat"* && \
|
||||||
"$FS" != "ntfs"* && "$FS" != "fuse"* && "$FS" != "msdos"* ]]; then
|
"$FS" != "ntfs"* && "$FS" != "fuse"* && "$FS" != "msdos"* ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user