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

FR: Ability to Use External Disk as Database File Location #43

Open
saya6k opened this issue Feb 10, 2024 · 6 comments
Open

FR: Ability to Use External Disk as Database File Location #43

saya6k opened this issue Feb 10, 2024 · 6 comments
Labels
enhancement Enhancement of the code, not introducing new features. no-stale This issue or PR is exempted from the stable bot.

Comments

@saya6k
Copy link

saya6k commented Feb 10, 2024

Some add-ons, such as Samba NAS, already support the use of an external disk.

If it were possible to specify an external disk for my database file location, I could leverage faster disks, like Intel Optane, to enhance database performance.

@expaso
Copy link
Owner

expaso commented Feb 14, 2024

Hi @saya6k, what a nice suggestion, thank you!

I am in the process of updating the addon, so I'll see what I can do for you.
No promises at this point, but I will definitely investigate how much effort this would be.

@expaso expaso added the enhancement Enhancement of the code, not introducing new features. label Mar 24, 2024
@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Aug 18, 2024
@expaso expaso pinned this issue Aug 18, 2024
@expaso expaso unpinned this issue Aug 18, 2024
@expaso expaso added no-stale This issue or PR is exempted from the stable bot. and removed stale There has not been activity on this issue or PR for quite some time. labels Aug 18, 2024
Repository owner deleted a comment from github-actions bot Aug 18, 2024
@burtonmercer
Copy link

I would love this feature, too!
I set up a database for my music collection from an external program.
My music files are stored and accessible via a Samba NAS, as @saya6k mentioned.
I would love to store the database as well on the NAS, rather than on the SD-card of my raspi.

Nevertheless I would like to thank you for your work, I was very thrilled when I found this plugin. I appreciate it very much.
Thanks a lot for sharing it!

@michalk-k
Copy link

or just another partition of the disk is running on.

It would be really nice to have it.

@expaso
Copy link
Owner

expaso commented Jan 3, 2025

I would love this feature, too! I set up a database for my music collection from an external program. My music files are stored and accessible via a Samba NAS, as @saya6k mentioned. I would love to store the database as well on the NAS, rather than on the SD-card of my raspi.

Nevertheless I would like to thank you for your work, I was very thrilled when I found this plugin. I appreciate it very much. Thanks a lot for sharing it!

Owwh! Thank you for your kind words! 🙏🏻
It's not that easy, as I need to create a mechanism to let the user configure what mountpoint needs to be forwarded into the addon. Basically, if you view it from the host, every mountpoint you create in /share should be already forwarded top the addon's /share, so it you have root-access to the host, you could leverage that right now.

But i just need to stick some time in it, and it's really helpfull knowing all of your usecases.

@expaso
Copy link
Owner

expaso commented Jan 7, 2025

There are solutions to at least automount USB disks onto the /media or /share folders:

https://community.home-assistant.io/t/solved-mount-usb-drive-in-hassio-to-be-used-on-the-media-folder-with-udev-customization/258406/162

For extra local storage (like optane, or any other seocndary disks or partitions) this may not work, but the whole solution is also not very user friendly.

The mentioned Samba NAS addon is running in unprovileged mode to list local partitions and disks, and mount then into the /share or /media folders. I'm am not really happy to follow that path, as it will downgrad the security-rating of the TimesaleDb Addon.
That being said, it's not a real timescaledb problem.

So.. I'm perhaps down the path of creating a separate addon to do just that: Enumerate local (or USB) storage, and mount it in the /share or /media or /backup folder. That addon also provides means to auto-mount (USB) disks for media and other purposes..

This way, those mounts should be visible to the timescaledb addon and can just be used as a backup loaction.

What do you think?

@snemarch
Copy link

This feature would be convenient, but is probably not a good idea.

Databases are pretty picky about storage (especially guarantees about data flushing), putting the database files on a network share is almost guaranteed to get you in trouble sooner or later. I personally wouldn't even trust USB-attached storage, but YMMV :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of the code, not introducing new features. no-stale This issue or PR is exempted from the stable bot.
Projects
None yet
Development

No branches or pull requests

5 participants