You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scrub and trim do not make sense on virtual hardware, it should be done on the host system.
I have added to /etc/default/btrfsmaintenance
if grep -qi virtual /sys/devices/virtual/dmi/id/product_name; then
HARDWARE="virtual"
else
HARDWARE="real"
fi
(...)
if [ "$HARDWARE" = "virtual" ]; then
BTRFS_SCRUB_PERIOD="none"
else
BTRFS_SCRUB_PERIOD="monthly"
fi
(...)
if [ "$HARDWARE" = "virtual" ]; then
BTRFS_TRIM_PERIOD="none"
elif systemctl is-enabled fstrim 2>/dev/null | grep -q static; then
# /lib/systemd/system/fstrim.timer
BTRFS_TRIM_PERIOD="none"
else
BTRFS_TRIM_PERIOD="weekly"
fi
The text was updated successfully, but these errors were encountered:
Framsfex
changed the title
skip filesystems on virtual hardware
skip scrub and trim on virtual hardware
Sep 16, 2024
I'm not sure it can be said it does not make sense. For a VM that has a dedicated pass-through block device the host will not do it and with this kind of change it would be impossible to do.
scrub and trim do not make sense on virtual hardware, it should be done on the host system.
I have added to /etc/default/btrfsmaintenance
The text was updated successfully, but these errors were encountered: