mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-08-18 19:02:33 +01:00
local-disk-mounts
Extend the mount API with a "disk" type for non-networked filesystems, backed by the UDisks2 D-Bus integration already used for the data disk. Local disks are restricted to the same mount locations as network storage and are allowed for all three usages. ext4, vfat, exfat, ntfs, btrfs, ext2 and ext3 are supported. A disk is identified on creation by either its current device path or its filesystem UUID. It is resolved through UDisks2 once, then persisted as UUID plus filesystem, so later mounts need no probing and keep working when the kernel hands out a different /dev path. The unit mounts the /dev/disk/by-uuid symlink, which also gives systemd a device dependency so a slow USB disk is waited for at boot instead of failing outright. A disk that is absent at boot fails through the existing mount failure path and picks up the same issue, fixups and retry handling as an unreachable server. Add GET /mounts/candidates listing block devices that could be mounted. One guard both filters that list and validates a create request, so the two cannot disagree about what is mountable: system devices, Home Assistant OS partitions, the disk holding the current data partition, anything already mounted, unsupported filesystems and disks without a UUID are all excluded. Resolving the device is what runs that guard, and a mount only resolves when it does not already know its filesystem, so where the filesystem comes from decides whether the guard runs. It is therefore never accepted from an API caller, and it is dropped again when a mount is restored from a backup, since a backup is data from outside this host and could otherwise name the UUID of a system disk with a plausible filesystem. Only mounts.json is trusted to supply it directly, which needs host root anyway. A persisted value is still re-checked against the supported list at mount time rather than in the file schema, because an invalid file resets every configured mount rather than just the offending one. The systemd unit type is now supplied by an overridable property rather than derived from the mount type directly. Disk mounts need this because the filesystem signature UDisks2 probes is not always the name of the kernel driver that mounts it: "ntfs" is mounted with ntfs3 and ext2/ext3 with ext4, while the probed value remains what is persisted and reported over the API.
Home Assistant Supervisor
First private cloud solution for home automation
Home Assistant (former Hass.io) is a container-based system for managing your Home Assistant Core installation and related applications. The system is controlled via Home Assistant which communicates with the Supervisor. The Supervisor provides an API to manage the installation. This includes changing network settings or installing and updating software.
Installation
Installation instructions can be found at https://home-assistant.io/getting-started.
Development
For small changes and bugfixes you can just follow this, but for significant changes open a RFC first. Development instructions can be found here.
Release
Releases are done in 3 stages (channels) with this structure:
- Pull requests are merged to the
mainbranch. - A new build is pushed to the
devstage. - Releases are published.
- A new build is pushed to the
betastage. - The
stable.jsonfile is updated. - The build that was pushed to
betawill now be pushed tostable.
Languages
Python
96%
JavaScript
3.9%
