Other Solved - Mysterious poweroff during zfs receive on a USB external

I'm using a FreeBSD 14.2 installation from a local build for sources from FreeBSD 14.2 release

Code:
$ uname -a
FreeBSD bld10.cloud.thinkum.space 14.2-RELEASE-p3 FreeBSD 14.2-RELEASE-p3 #0 releng/14.2-1eb03b059-dirty: Sun May 25 07:16:21 PDT 2025     gimbal@bld10.cloud.thinkum.space:/usr/obj/bld/src/amd64.amd64/sys/GENERIC amd64

Corresponding with some recent data recovery for a zpool that became corrupted while the SATA disk was accessed via virtualbox on Linux,, this build was patched as to comment out line 8 in sys/modules/zfs/static_ccompile.h, like as follows

Code:
#ifdef INVARIANTS
// #define        ZFS_DEBUG
#endif

Otherwise it's using upstream releng/14.2 sources. (I'm rebuilding world and the kernel without the patch, at this time)

I've been trying to move some data off of a zpool located one of the machine's internal SSDs to a zpool on a USB external device. The USB external device is a Samsung T7 portable SSD external (no trim). The internal disk is a Crucial SSD. The machine is a Minisforum HX90.

Twice today, during a process of zfs send / zfs receive like the following, the machine has silently powered off.

Code:
# zfs send -RLecv internal_pool/dset@snapshot | mbuffer | zfs receive -sdv usb_pool

(I'll try to log the exact commands and output from the send/receive, in case this occurs again. I'm rebuilding the kernel and world without the patched src, presently)

In the first instance, I was able to resume the transfer later, using the ZFS send_recv_token created as per the -s arg in zfs receive, without the machine powering off then. This happened a second time, the mysterious poweroff, and so I think I would like to debug this lol.

This mysterious poweroff has happened twice today, each with different datasets but during the same zfs workflow. I'd like to think that it could be related to something occurring during the zfs receive with the zpool on the external.

Could there be any USB device hints that I should enable for the Samsung T7 SSD?

Maybe there could be anything else going on with the USB bus or other USB devices, at the time of the poweroff. With this particular insallation, some USB external storage devices seem to occassionaly reset or drop off the bus entirely. I haven't debugged it a lot, as yet. I've not seen these exact issues with the same hardware, when booted to an openSUSE LEAP 15.6 installation on the same machine.

There's not any kernel panic showing up to explain the poweroff during the zfs send/zfs receive - no kernel panic, no crash dump. Once powering on the machine again, the /var/log/messages file indicates nothing to explain the poweroff.

Maybe it's not even storage related. Could it be related to something with ACPI or power management controllers?

Could there be any advice available for how to diagnose these mysterious poweroffs?

Should I try using ktrace for the zfs send and zfs receive processes? I think I'll try this after installing the clean build
 
After installing the fresh buildworld and kernel build - and with a sturdier USB cable for the external ZFS storage device - I was able to complete the recursive send without similar errors.

I'm guessing that the mysterious poweroff may have been related to a USB mass storage issue, possibly due to faulty cables as shipped with the removable storage device.

If the poweroff occurs later, I guess I'll try running the zfs send and zfs receive under ktrace to some UFS2 filesystem. Maybe the output from same could help to explain lol
 
Back
Top