However, if zed.service is going to exit if there is no pool imported, this udev rule may not help. The udev event is going to fire before the pool is imported.
@stgraber, running zed is less important for loopback devices. So between that and catching it on reboot, we might be "close enough".
@pitti, the ID_FS_TYPE is zfs_member, not zfs. The service is, as you listed, zed.service. Modifying your rule then is:
ACTION!="remove", SUBSYSTEM=="block", ENV{ID_ FS_TYPE} =="zfs_ member" , ENV{SYSTEMD_ WANTS}+ ="zed.service"
However, if zed.service is going to exit if there is no pool imported, this udev rule may not help. The udev event is going to fire before the pool is imported.
@stgraber, running zed is less important for loopback devices. So between that and catching it on reboot, we might be "close enough".