ec2-mount-volume

module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2020 License: MPL-2.0

README

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.

Directories

Path Synopsis
cmd
ec2-mount-volume
Command ec2-mount-volume prepares EBS volumes, exposed as NVMe block devices, for immediate use.
Command ec2-mount-volume prepares EBS volumes, exposed as NVMe block devices, for immediate use.
internal
cage/cmd/testecho
Package testecho assists execution of the CLI from test cases and assertion of its result.
Package testecho assists execution of the CLI from test cases and assertion of its result.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL