Update 'README.md'

read me!
This commit is contained in:
bronze 2022-02-20 03:15:38 -05:00
parent c952af6393
commit d10c8ef053
1 changed files with 31 additions and 1 deletions

View File

@ -1,3 +1,33 @@
# portage-squashfs
scripts to use squashfs to dramatically reduce the size of /var/db/repos/gentoo (or /usr/portage)
scripts to use squashfs to dramatically reduce the size of `/var/db/repos/gentoo` (or `/usr/portage` if you're old)
## Should I do this?
Probably not. Chances are if you're running Gentoo you've never noticed how much space `/var/db/repos/gentoo` takes up. You would only care if you're running Gentoo on ARM chinky boards with low storage / write speeds. Or if you're me, running it on a chromebook with like 16Gb of storage...
## MASTER / SLAVE structure:
My trick here is to use a MASTER computer (like a server you run 24/7 or a beefy desktop) that also runs Gentoo. The MASTER compresses its copy of the Gentoo repo into a file using squashfs. The SLAVE downloads this copy into a folder and mounts it at `/var/db/repos/gentoo`. The files are still there as far as the SLAVE's portage cares, so you can proceed to install packages as normal. **Also both master and slave need the** `sys-fs/squashfs-tools` **package!!**
In short:
### MASTER
- takes care of gentoo repo updating
- squashes its copy of the gentoo repo into squashfs file
### SLAVE
- NEVER updates normally
- only downloads squashfs from MASTER
- mounts said squashfs
## scripts
- `portage-squashfs.sh` should be at the MASTER computer
- I put this one under `/etc/cron.daily/` as I already have a daily `emerge --sync` script in there.
- `update.sh` should be at the SLAVE computer
- This one was made to be run deliberately instead of automated.
## FURTHER READING
- https://wiki.gentoo.org/wiki/SquashFS
- https://forums.gentoo.org/viewtopic-t-465367-start-67-postdays-0-postorder-asc-highlight-.html
- https://www.brunsware.de/blog/portage-tree-squashfs-overlayfs
### FEEL FREE TO DO WHATEVER YOU WANT WITH THESE SCRIPTS, MODIFY AS YOU WISH