Skip to content

NFS missing mount path + clip duration hardcode issue #1115

@billbobob584-ui

Description

@billbobob584-ui

System Info:
NAME=Thingino
ID=thingino
VERSION="1 (Ciao)"
VERSION_ID=1
VERSION_CODENAME=ciao
SOC=t31
SOC_ARCH=xburst1
IMAGE_ID=wuuk_y0510_t31x_sc4336p_ssv6158
BUILD_ID="stable+c6041d6, 2026-03-09 09:19:39 +0000"
COMMIT_ID="stable+c6041d6, 2026-03-08 11:18:19 +0000"
BOOTLOADER=isvp_t31_sfcnor_ddr128M
BUILDROOT_VERSION=2025.11.1

Issue 1: motion-triggered storage path was not taken from /etc/prudynt.json**

  • Motion events logged Save to storage and then failed with Mount point not configured

  • NFS share was already mounted and writable

  • Changes to /etc/prudynt.json under recorder.* did not fix it:

    • recorder.mount
    • recorder.enabled
    • recorder.device_path
  • Root cause found:

    • /usr/sbin/motion launches /sbin/send2storage
    • /sbin/send2storage reads storage settings from /etc/send2.json, not recorder.* in /etc/prudynt.json
    • Relevant keys were under storage.*
  • Fix/workaround:

    • Set storage.mount in /etc/send2.json to the mounted NFS path
    • Set storage.device_path to empty
    • Set storage.template as desired
    • After that, motion clips saved successfully

Issue 2: motion-saved clips were truncated because the file was handed to storage too early**

  • Motion-triggered saved clips were shorter than expected

  • Manual direct recordings could continue growing close to the expected full length

  • Root cause found in /usr/sbin/motion:

    • It waits for the MP4 to stop changing size, but only up to 15 seconds
    • Then it declares Motion video is ready
    • Then it immediately runs send2storage &
  • Root cause found in /sbin/send2storage:

    • It does not do any extra waiting
    • It simply copies the file it is given with cp
  • Result:

    • For longer recordings, send2storage can copy the MP4 while it is still being written
    • The saved copy ends up truncated even though the source file in /tmp can continue growing
  • Fix/workaround used:

    • Increased the motion script wait cap from 15 to 120 seconds or some upper bound higher than a "normal" longer clip (my clips are 30 seconds) in both /usr/sbin/motion and /sbin/motion
    • Optionally, a different fix could be that wait cap is +2 or 3 seconds over a variable pointing to the duration length
    • This allowed longer recordings more time to finish before being copied to storage

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions