Package: dirvish
Version: 1.2.1-2.2
Severity: normal
Description:
After updating dirvish to version 1.2.1-2.2 on Debian Testing (forky),
the
nightly cron job (/etc/dirvish/dirvish-cronjob) now produces an error
message for every vault processed on my machine. While the backups
themselves appear to complete successfully, the utility generates
significant stderr noise.
Symptom:
For each of my 7 vaults, I receive the following error:
ERROR: Could not get subvolume flags: Inappropriate ioctl for device
Context & Configuration:
My backup Bank (destination) is formatted as ext4. While one of my
source
partitions is Btrfs, the destination where the images are created is
strictly
ext4.
Output of filesystem check:
autofs
ext4
My /etc/dirvish/master.conf is quite standard and does not use any
Btrfs-
specific options:
## Example dirvish master configuration file:
# https://dirvish.org/debian.howto.html
bank:
/mnt/usb_back1
xdev: true
index: gzip
image-default: %Y%m%d-%H:%M
rsync-option:
-h # use 1000 powers, if repeated
-h # use 1024 powers, see rsync manual
exclude:
lost+found/
core
*~
.nfs*
.directory
.directory.lock*
Runall:
etc
boot
root
var
usr
home
archive
Dear Maintainer,
First, please accept my apologies for the formatting and broken line breaks in the initial report. My webmail client (Roundcube on forky) defaults to "format=flowed" handling as per RFC 3676 to satisfy the 78-character line length recommendation in RFC 5322. Unfortunately, it is very easy to forget the "Keep formatting" checkbox during composition as there is currently no configuration option to enable it by default.
Regarding the bug: I have confirmed that the error "Inappropriate ioctl for device" occurs because dirvish attempts to execute btrfs property set even when the destination is not a btrfs filesystem.
Because I'm getting an eMail with "failed" backup every night I have implemented a trivial fix that wraps this call in a conditional check, ensuring it only runs if the 'btrfs' option is explicitly set in the configuration.
Below is the unified diff for the fix:
--- /usr/sbin/dirvish.orig 2026-04-07 20:06:13.000000000 +0200
+++ /usr/sbin/dirvish 2026-04-29 18:00:00.662383738 +0200
@@ -841,7 +841,9 @@
close (HIST);
}
- system("btrfs property set -ts $destree ro true")
+ if ($$Options{btrfs}) {
+ system("btrfs property set -ts $destree ro true")
+ }
} else {
printf STDERR "dirvish error: branch %s:%s image %s failed\n",
$vault, $$Options{branch}, $$Options{Image};
keep rocking, Oli