wings
wings copied to clipboard
Add support for virtual disks in Wings
This PR adds support for virtual disks from the OS in Wings. This allows the OS to better control the file limits on the disk by using a normal mount point for a disk image. Most everything within Wings continues to operate as normal, but now when a process creates files the size limit is better enforced at a native level in the OS.
The fundamental changes here are handling creation and mounting of these disks for the server when created or when Wings is started, and also migrating existing resources to this new format.
This will be completely opt-in, and it'll probably have some issues on different OSes so it'll be a good candidate for a feature flagged beta for users who want to experiment with it.
Tasks
- [x] Create the underlying driver logic for virtual disks in Wings.
- [x] Add underlying command logic to migrate a server's currently on-disk resources over to virtual disks if enabled for Wings.
- [x] Add logic to create a disk when the server is created, or if the disk is missing from the system when Wings is booted.
- [x] Add logic to ensure that a disk can be mounted when Wings is started. This should also have fallback code that checks the mount status when a server is started and re-mounts the drive if it is missing at that time.
- [ ] Add logic to remove the disk when a server is deleted.
- [ ] Handle resizing the disk when a server's base disk space is changed.
Hi Dane! How would this be useful? Would it allow for like control of partitions on nodes?
@FoksVHox this moves space management to the OS level rather than making Wings handle it. It also solves underlying design issues that allow users to exceed their space available in some scenarios. This is not needed for most people running their own instances for themselves or friends, this is targeted specifically at larger hosts who need better space management tools in Wings.
Hi Dane! Do you intend to develop something with ZFS? for file compress, backups and optimization?
Just gonna close this because it hasn't been touched in over a year. However, the branch will be kept in-case this is ever revisited.