I have tried to use the datactl feature on hassos but it failed after creating the partition on the SSD I’m using.
It has successfully created a partition named “hassos-data-external”.
However then spat the following error out:
“cat: can’t open ‘/sys/class/block/nvme0n11/size’ : No such file or directory”
Does anyone know why this might be?
If someone can point me in the right direction, I’m quite willing to do a bit of debugging but I definitely need a leg up!
PS my system is as follows:
Pi4 Compute module, on a standard CM4IO dev board with PCIe-M2 adaptor and a PCIe SSD.
PPS I’m a hardware design engineer by trade and drawn up a basic CM4 carrier with M2 slot that I’m just about to send off for manufacture. If I can get the above to work I reckon it would be a nice bit of hardware to run HA on, so if anyone is interested feel free to give us a shout.
# mount -t squashfs /{dev,mnt}/sda3
# mksquashfs /mnt/sda3 sda3.sqsh.bckp
# umount /dev/sda3
# unsquashfs sda3.sqsh.bckp
# vim squashfs-root/usr/bin/datactl # add the "p" as you mentioned and save the file
# mksquashfs squashfs-root sda3.sqsh
# dd if=sda3.sqsh of=/dev/sda3 status=progress
You may now remount the partition and double check the file is fixed. If yes, you can unplug the CM4 (don’t forget to unmount), remove the USB cable and jumper, boot normally and execute datactl move. Voila!
I realize that this might arise from the fact that partitions of devices whose names end with digits have a p between device name and partition number. So this might allow a generic fix. I will see if I can drop a PR or similar.
Let me know if it fixed your problem (in case you were still chasing it)
PS: This site (“Basic steps” for the readout part, and “Example 2” for the writing part) helped my in understanding what squashfs commands I had to use.
We are working on a D-Bus API, which can be used from Supervisor and ultimately from the frontend for the data disk feature. That is what I use to test NVMe on Amber currently:
busctl --verbose call io.hass.os /io/hass/os/DataDisk io.hass.os.DataDisk ChangeDevice s /dev/nvme0n1
That being said, I did merge the PR, still, since datactl is currently still the documented.
There is a set of nightly builds: Index of /7.0.dev20210920
I’ll probably will remove the datactl script at one point when there is UI support for it.