Last active
June 19, 2020 19:11
-
-
Save andrewp-as-is/c5e47f43b2883208e7382e7abe6ab5fa to your computer and use it in GitHub Desktop.
AWS EC2 mount volume
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
#!/usr/bin/env bash | |
filesys="/dev/nvme4n1" | |
label="label" | |
mount_dir="/mnt/$label" | |
sudo mkfs -t ext4 -T small $filesys | |
sudo e2label $filesys "$label" | |
sudo mkdir "$mount_dir" | |
sudo mount /dev/$filesys "$mount_dir" | |
sudo chmod -R 755 "$mount_dir" | |
# sudo umount /dev/$filesys | |
lsblk | |
sudo fdisk -l $filesys |
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
SSH_HOSTNAME:=aws | |
all: | |
ssh $(SSH_HOSTNAME) < ./e2-mount-volume.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment