Request for block-devices interface for s1panel snap


  • name: s1panel
  • description: Manage the front-facing LCD display on the S1 Mini PC.
  • snapcraft: link to snapcraft.yaml
  • upstream: link to the upstream repository
  • upstream-relation: The snap is published by the upstream developer (me).
  • interfaces:
    • <block-devices>:
      • request-type: installation, connection
      • reasoning: To retrieve disk usage for any mounted filesystem (including the root fs) from outside the Snap environment…

The s1panel snap provides a real-time system dashboard and displays it on the S1 Mini PC’s built-in LCD screen. It can report onboard storage device statistics and visualize them on the front display. We use the <block-devices> interface to call statfs() and retrieve read-only details such as capacity and usage. No write operations are performed

So far, this is the only way I’ve been able to retrieve root filesystem info. With <block-devices>, the following command returns the expected data:

lsblk --fs --paths --list --exclude=7
 
/dev/mapper/ubuntu--vg-ubuntu--lv ext4        1.0            f01a8607-dcfb-4a5a-9743-c509943c5106    826.3G     4% /tmp
                                                                                                                   /root
                                                                                                                   /home
                                                                                                                   /etc

This allows statfs(“/root”) to return the correct usage information. Also, I currently have a “Manual review requested” status pending in the Builds section.

Many thanks in advance!

This request has been added to the queue for review by the @reviewers team.

This makes sense for this snap. +1 (#voteFor) manual connection of the block-devices interface

Hi @tjaworski !

+1 #voteFor manual connection of the block-devices interface, from me as well.