diff --git a/HISTORY b/HISTORY index 88e2cfa3..4e718e0e 100644 --- a/HISTORY +++ b/HISTORY @@ -8,6 +8,11 @@ SnapRAID HISTORY Daemon). This prevents potential execution failures of child processes (such as smartctl) on systems where nested job objects are not supported. + * Skip disks on network or virtual filesystems (such as NFS, CIFS, + FUSE, or tmpfs) in device operations like 'up', 'down', 'smart', + and 'probe' on Linux, instead of failing with an error. If no + physical device remains, the operation completes successfully with + an informational message. 15.1 2026/10 ============ diff --git a/cmdline/device.c b/cmdline/device.c index 759eb649..2d494281 100644 --- a/cmdline/device.c +++ b/cmdline/device.c @@ -1237,13 +1237,16 @@ int state_device_force(struct snapraid_state* state, int operation, tommy_list* } } - /* distinguish skipped devices from unsupported device queries */ if (ret == 0 && tommy_list_empty(&low)) { - ret = -1; if (tommy_list_empty(&high)) { + ret = -1; log_error(ESOFT, "No accessible devices selected for this operation.\n"); goto bail; } + + /* not an error, the selected disks are on network or virtual filesystems without a block device to manage */ + msg_info("No physical devices found for the selected disks, nothing to do.\n"); + goto bail; } if (ret != 0) { diff --git a/cmdline/unixapp.c b/cmdline/unixapp.c index 8609ba03..0e23e0de 100644 --- a/cmdline/unixapp.c +++ b/cmdline/unixapp.c @@ -4375,6 +4375,16 @@ int devquery(tommy_list* high, tommy_list* low) struct dev_struct* dev = j->data; uint64_t access_stat; + /* + * Major 0 is an anonymous superblock (NFS, CIFS, FUSE, tmpfs, overlay, ...) + * not backed by a block device. Btrfs/Bcachefs/ZFS are already dereferenced + * to their member devices, so what remains has no physical disk to manage. + */ + if (major(dev->device) == 0) { + log_tag("device:%s:skip:%u:%u: no block device\n", esc_tag(devinfo->name), major(dev->device), minor(dev->device)); + continue; + } + /* retrieve access stat for the high level device */ if (devstat(dev->device, &access_stat) == 0) { /* cumulate access stat in the first split */ @@ -4420,6 +4430,9 @@ int devquery(tommy_list* high, tommy_list* low) #else (void)high; (void)low; + + /* device operations are unsupported in this platform */ + failed = 1; #endif return failed ? -1 : degraded ? 1 : 0;