Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API to trigger data disk move only #129

Merged
merged 3 commits into from
Mar 15, 2023

Conversation

agners
Copy link
Member

@agners agners commented Mar 15, 2023

Add a new D-Bus API which allows to trigger the data disk move only. This allows to handle the selection and partitioning from Supervisor directly (via UDisks2 D-Bus API). Handling partitioning directly in Supervisor should improve device detection/selection and allows for better error handling.

Before calling this API, make sure to prepare a data disk using the GPT partition layout and with the partition label (not file system label) of hassos-data-external. Then call the API without argument and reboot the system.

# busctl --verbose call io.hass.os /io/hass/os/DataDisk io.hass.os.DataDisk MarkDataMove

Add a new D-Bus API which allows to trigger the data disk move only.
This allows to handle the selection and partitioning from Supervisor
directly (via UDisks2 D-Bus API). Handling partitioning directly in
Supervisor should improve device detection/selection and allows for
better error handling.
Copy link
Member

@pvizeli pvizeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should consider to only return *dbus.Error or nil - there is no need for return bool

@agners
Copy link
Member Author

agners commented Mar 15, 2023

Right, I was somehow under the impression that D-Bus (or the Go library we use for D-Bus) requires a return value, but just tested, that seems not to be the case.

I'll adjust the new API.

@pvizeli pvizeli merged commit a470aa2 into home-assistant:main Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants