homebridge-raspbian-image
homebridge-raspbian-image copied to clipboard
Moving Homebridge storage path: /var/lib/homebridge ( to use rpi image with fs overlay )
Raspberry Pi Model
Raspberry Pi 4 B
Current Situation
hi , How to move homebridge storage to different mount point.
from "/var/lib/homebridge" to "/data/my-data/hb"
I want to lock the OS filesystem with FILESSYSTEM-OVERLAY option , But keep one r/w mount point on the usb/sdcard for homebridge plugin and accessories.
If homebridge storage is on OS partition , then my pairing and accessories will be cleared on reboot
I have made my master disk with "homebridge-raspbian-image" added a partition with 4gb writeable area.
after overlay files system is enable by raspi-config /data path will be will available for persistence storage ( writable ).
$ cat /etc/fstab
proc /proc proc defaults 0 0
PARTUUID=1369d763-01 /boot/firmware vfat defaults 0 2
PARTUUID=1369d763-02 / ext4 defaults,noatime 0 1
PARTUUID=1369d763-03 /data ext4 defaults,noatime 0 3
My folder struct on /data will be similar
/data/
└── my-data
├── hb
│ ├── accessories
│ ├── auth.json
│ ├── backups
│ ├── config.json
│ ├── homebridge.log
│ ├── node_modules
│ ├── package.json
│ └── persist
├── myhubcfg.json
├── hb-plugins
│ └── logical-homebridge-plugin
└── scripts
├── bank
├── every_10minute
├── every_15minutes
├── every_30minutes
├── every_5minute
├── every_day
├── every_hour
├── every_minute
├── every_week
├── load_cron_jobs.sh
└── logs
Logs
No response
Interesting idea
A couple of comments
1 - homebridge uses two directories, with the second being in /opt/homebridge so that needs to be taken into account as well
2 - to keep things simple it is possible to just put the overlay in the original location? I quickly read the docs on FILESYSTEM-OVERLAY and the impression it was feasible
3 - how would file system updates be handled?
hi, The os file system will be in locked to state when you enable FS-OVERLAY every power/reboot will be as per the state when you enabled the FS-OVERLAY
where as the /data partition will be updated by homebridge activity ( adding new plugin/accessories ).
if any critical OS update is needed , I disable the FS-OVERLAY and do the os update , and then re-enable FS-OVERLAY This is only required if the os nodejs modules needs any updates,
Homebridge node modules are in its own directory which is not locked.
I have a cron task to reboot the device periodically, once every week.
Thanks and Regards [image: ] Mrutyunjay B Patel
On Tue, 2 Apr 2024 at 17:58, Northern Man @.***> wrote:
Interesting idea
A couple of comments
1 - homebridge uses two directories, with the second being in /opt/homebridge so that needs to be taken into account as well
2 - to keep things simple it is possible to just put the overlay in the original location? I quickly read the docs on FILESYSTEM-OVERLAY and the impression it was feasible
3 - how would file system updates be handled?
— Reply to this email directly, view it on GitHub https://github.com/homebridge/homebridge-raspbian-image/issues/141#issuecomment-2031912514, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQG5HVAAAKN6NSB66B6V7LDY3KP7BAVCNFSM6AAAAABFS2A2WGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZRHEYTENJRGQ . You are receiving this because you authored the thread.Message ID: @.***>
hi, BOOKWORM 64 bit image did not work with overerlay-fs enabled.
Going back to my last made version with "Raspbian GNU/Linux Buster (10)"
updated all packages to resent version, but kept nodejs version to 18.xx
apt update/upgrade nodejs to 18.20.1 homebridge to 1.7.0 zerotier to 1.12
My path on /data/ is read-write .
All working ok
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed as no further activity has occurred.