-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HotFix] Extend EBS volume and configure MongoDB data directory
- Loading branch information
1 parent
d4a5641
commit 09e050c
Showing
3 changed files
with
20 additions
and
8 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
commands: | ||
01_create_directory: | ||
command: "mkdir -p /mnt/ebs" | ||
command: "mkdir -p /mnt/mongodb_data" | ||
|
||
02_check_device: | ||
command: "lsblk | grep nvme0n1" | ||
command: "lsblk | grep nvme0n1p2" | ||
ignoreErrors: false | ||
|
||
03_mount_volume: | ||
command: "sudo mount /dev/nvme0n1p1 /mnt/ebs" | ||
command: "sudo mount /dev/nvme0n1p2 /mnt/mongodb_data" | ||
ignoreErrors: false | ||
|
||
04_change_permissions: | ||
command: "sudo chown -R ec2-user:ec2-user /mnt/ebs" | ||
command: "sudo chown -R ec2-user:ec2-user /mnt/mongodb_data" | ||
|
||
05_add_fstab_entry: | ||
command: "echo '/dev/nvme0n1p2 /mnt/mongodb_data ext4 defaults 0 0' | sudo tee -a /etc/fstab" | ||
ignoreErrors: true |
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