homebridge-raspbian-image icon indicating copy to clipboard operation
homebridge-raspbian-image copied to clipboard

Moving Homebridge storage path: /var/lib/homebridge ( to use rpi image with fs overlay )

Open MrutyunjayPatel opened this issue 3 months ago • 4 comments

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

MrutyunjayPatel avatar Apr 02 '24 07:04 MrutyunjayPatel