-
Notifications
You must be signed in to change notification settings - Fork 195
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
feat: Support multiple volumes on virtual machines #2287
Open
adityahase
wants to merge
36
commits into
master
Choose a base branch
from
feat-server-volumes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These are argument for the `mount` command (and /etc/fstab)
/var/lib/mysql and /etc/mysql for Database Server /home/frappe/benches for Server
…used If MariaDB gets activated, then mounts will be activated as well. If one of the mounts fails to activate, MariaDB will not be started. If one of the mounts is explicitly stopped (or restarted), MariaDB will be stopped (or restarted). If one of the mounts are stopped, MariaDB will be stopped too. The mounts strictly have to be in active state for MariaDB to also be in active state. Reference: https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#BindsTo=
The mount strictly has to be in active state for Docker to also be in active state. Reference: https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#BindsTo=
Converts None to "" instead of "None"
EBS Volume ID will change when we start a new machine from an image. Since the ID is only known after the machine boots. We have to wait for the machine to boot and then run a playbook to reconfigure the mount. But UUID remains the same. so, we don't need to change anything in the new machine at the first boot. Reference: https://aws.amazon.com/blogs/compute/how-to-mount-linux-volume-and-keep-mount-point-consistency/
/home/frappe/benches directory needs to be owned by frappe There are other ways of doing this. But this seems useful.
mysql user isn't created when volumes are mounted
So, create the source mount point with the correct permissions and ownership
TODO: Guess platform from instance_type
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2287 +/- ##
==========================================
- Coverage 39.91% 39.87% -0.05%
==========================================
Files 372 373 +1
Lines 28225 28341 +116
==========================================
+ Hits 11267 11300 +33
- Misses 16958 17041 +83 ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, we place all the data on a single EBS volume (root partition). This feature supports placing some of the data on another volume.
So that, we can
By default, the "movable" data is placed on a separate volume
Instead of directly mounting the filesystem to /var/lib/mysql. We mount it to /opt/volumes/mariadb and then bind mount /opt/volumes/mariadb/var/lib/mysql to /var/lib/mysql. This gets us two things.
To guarantee mount point consistency we use UUID in fstab (instead of device name or volume IDs). Data volumes are unpartitioned and ext4 formatted.
This feature is built to make moving from Intel -> ARM easy.