Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

Latest commit

 

History

History
60 lines (36 loc) · 2.22 KB

README.md

File metadata and controls

60 lines (36 loc) · 2.22 KB

ec2-mount-volume GoDoc Go Report Card Build Status

ec2-mount-volume prepares EBS volumes, exposed as NVMe block devices, for immediate use. It mounts each volume at the location specified in a resource tag.

Use Case

It provides tag-based mapping to work around unpredictable device names. For example, an instance that mounts at boot a root volume and one data volume may encounter device names "/dev/nvme0n1" and "/dev/nvme1n1" after one boot, but reversed names after the next.

It was made after encountering this issue while migrating from an M4 to M5 instance type.

Usage

To install: go get -v github.com/codeactual/ec2-mount-volume/cmd/ec2-mount-volume

Examples

Usage:

ec2-mount-volume --help

Display the mount plan for 2 expected EBS volumes (dry run):

ec2-mount-volume --device-num 2

Mount 2 expected EBS volumes:

ec2-mount-volume --device-num 2 --force

Same as above but read mount points from EBS volume tags named "mount-point" instead of the default:

ec2-mount-volume --device-num 2 --force --tag mount-point

Same as above but wait 30 seconds instead of the default:

ec2-mount-volume --device-num 2 --force --tag mount-point --timeout 30

Setup

The program requires access to the EC2's metadata service and the EC2 instance role requires ec2:DescribeVolumes access.

Development

License

Mozilla Public License Version 2.0 (About, FAQ)

Contributing

  • Please feel free to submit issues, PRs, questions, and feedback.
  • Although this repository consists of snapshots extracted from a private monorepo using transplant, PRs are welcome. Standard GitHub workflows are still used.