Hello everyone!
I haven't even started experimenting as I thought someone may have already done what has come across the table, so here's the dilemma:
We have a mount based install on a HDD. We create
opt=UUID=something as a boot code.
For the longest time, I've created
/opt/.root to be a "persistent" scatter-ish directory where bootsync.sh does its own copy from
/opt/.root/* to
/ which overwrites links from base and tcloop with our persisted files without issue. (Other than there not being
detection for modules, libraries, etc.)
I was just writing up a document taking notes on different pros and cons of
cloud|mount|copy2fs|scatter methodology and this "hybrid" method is being considered as a fifth.
We already have the option to persist
/tce /opt and
/home (and there's some notation of local= in there somewhere but I haven't hunted that down yet) so what I was thinking is a "grouped" effort of /opt and /home along with a skeleton of / so that files which exist in BASE or in a TCZ that are altered (such as passwd or /usr/local/etc/init.d/dropbear just for examples) but at a certain level, copying files from storage into the ram based file system is going to cause unnecessary lag when there's a good number of files OR larger files (such as databases and the likes) SO I'm considering... I dunno what to call it yet.
Scenario:We're going to pretend storage is
/dev/sda1, *active *ext4
We're going to use
hybrid=UUID=123456:7890... as our boot code
We'll call this new location in storage
(/dev/sda1)/hybrid for the time being and in theory, let's say it occupies 10+GB in persisted or altered content which would make copy2fs impossible for lower RAM machines - or be cause for a vacation! Glass half-full!
/opt and
/home are skipped since hybrid can act for both without the extra mounts and extra directories in storage and
hybrid functionality would be updated to create copies of opt, home, local, and so forth as needed. OR, we can keep using opt= and home= and bind-mount empty directories in /hybrid/opt and /hybrid/home, though that spends a little extra RAM in the process.
Originally I was thinking maybe
chroot /mnt/hybrid would be the best way to go and bring everything over from base and tcloop as links. No real fuss that I could imagine at the time; there probably is, though. Any opinions?
Afterward, I thought maybe treating
/hybrid like a squash file could be the answer (link all files into the root file system?) Requires a way to hook monitor directory
creation, though, so that /mnt/hybrid was updated when new directories (or links TO directories) were created elsewhere in the file system so that file managers could do their job when traversing the directory tree.
What I've been doing all this time is creating directories in
/opt to serve as database storage (
/opt/etc/mysql/data) and
.root as a copy2fs-like storage (which could be done through filetool.sh, I know, but I'm senile when I'm in a rush and remembering to MAKE the backup before rebooting to test something... sometimes doesn't end well!
Wait... I'm senile all the time these days.) The problem with .root is everything is manually done. Update a password? Copy /etc/passwd to /opt/.root/etc/. Need to update the content of /usr/local/etc/dnsmasq/*? CAT the contents of each file into /opt/.root/usr/local/etc/dnsmasq which doesn't exist yet. It WORKS... just not as well as it could.
Challenges:- Let's say you wanted to alter a file linked from BASE (cpio) such as /etc/shadow... once done, you then need to update /opt/.filelist and run a backup. That's IF you're using backups. If you're not... <dialtone>
- Or from a TCZ (such as an init file, php.ini, things that often GET updated - which are otherwise read-only) you still need to manually create a copy to somewhere else, do your updates, copy it over the link, update /opt/.filelist and run backup to preserve the changes. Not really end-user friendly and sometimes more effort than it should be.
- In some cases, extensions are modified to utilize /home which in the end only works in a single-user environment with sudoer PASS:ALL:[EMPTY] and with home=somewhere boot code (that I can fathom, at least.)
Brain storming requested! Any ideas, even "way out there" are welcome and entertained!!! (Circus music playing... juggling SATA drives taped to the end of sticks... lit on fire... tape melts, drive crashes through window...!)
Thanks in Advance and Take care!anyone who says "cloud" --- I say "rain" --- can't control either of them if they're not yours in the first place!
"electric cars" --- I say "still burning coal, plutonium, etc. to charge them and explosive batteries? Run, Forest, Run!"