Enhancement: Directory Structure #233
-
I would like to suggest that the default directories be modified for the CasaOS app/server. /DATA ---- to---> /srv/media Drives that are root mounted and not removed/removable are suppose to be mounted in /srv when they have site-specific data served by the server. Server configuration files are suppose to be stored in /etc. https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard What I have done on my server is make an OS partition that just has the OS itself so upgrades won't ever run out of space for the OS itself. I then put docker configs in the /home directory under /home/docker so if I have to completely reload the OS I don't lose that data. What I did was parition my NVME 1TB drive to 200gigs to my OS, 800 gigs to home on the NVME. I then use MergerFS and SnapRAID to be a giant pool of space in the /srv directory. All my mechanical drives are mounted in /srv/drive* and use MergerFS to mount them all in the pool as /srv/media What this does is keep the OS on one partition so it can't accidently fill up and not allow upgrades. I keep the home dirs and docker configs/data on another partition so media doesn't fill up this partition. Then I keep all media on mechanical slower hard drives, and if they hit 100% full just means no more downloads and the server won't crash. (edited) I end up with basically 3 partitions/groups of space in the end: OS, home/docker, media. In my use case it is not likely that home users will generate more than a few hundred gigs of user created files, like word docs, spreadsheets, etc. Photos which take more room are stored in the pool drives, same for music. The reason I recommend MergerFS is because it is the only drive pooling system for Linux that allows you to add one drive at a time over a long period of time. Most drive pooling setups will not allow you to add a single drive to the pool after the pool is already created. MergerFS allows you to add one drive at a time as you run out of space on your server. The pool means you don't have to figure out where things are stored or how to organize things across multiple drives. https://github.com/trapexit/mergerfs For redundancy I am using SnapRAID because again normal RAID does not allow you to add one drive at a time. http://www.snapraid.it/ These are all open source programs and most distributions have them in their repositories. If you want to look at a web interface for MergerFS and SnapRAID, then you can look at what Open Media Vault has done. OMV is open source so their code is available for review. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I will also say that SnapRAID isn't a perfect for every setup for redundancy but for a home media server were files don't change a ton every hour, it isn't a problem that the strip/sync isn't live but has to be triggered by a cron job. For other uses/applications especially in the enterprise that would be a problem but for a home server that doesn't change often this isn't an issue. Basically SnapRAID isn't live RAID but for this solution/use case that is acceptable. |
Beta Was this translation helpful? Give feedback.
-
/casaOS also includes the DB which would belong to /var/lib/casaos (so split the directory into different folders) |
Beta Was this translation helpful? Give feedback.
-
This requirement has been implemented in CasaOS v0.3.3 |
Beta Was this translation helpful? Give feedback.
This requirement has been implemented in CasaOS v0.3.3