Skip to content

Instantly share code, notes, and snippets.

@aminusia
Created February 4, 2023 06:52
Show Gist options
  • Save aminusia/42a7ca7c70bd40ec16cdf22ea7e512f2 to your computer and use it in GitHub Desktop.
Save aminusia/42a7ca7c70bd40ec16cdf22ea7e512f2 to your computer and use it in GitHub Desktop.
Mount NVME on AWS with local drive

first get the location nvme drive is located at:

lsblk

mine was always mounted at nvme1n1. Then check if it is an empty volume and doens't has any file system, (it mostly doesn't, unless you are remounting). the output should be /dev/nvme1n1: data for empty drives:

sudo file -s /dev/nvme1n1

Then do this to format(if from last step you learned that your drive had file system and isn't an empty drive. skip this and go to next step):

sudo mkfs -t xfs /dev/nvme1n1

Then create a folder in current directory and mount the nvme drive:

sudo mkdir /data
sudo mount /dev/nvme1n1 /data

you can now even check it's existence by running:

df -h

source [https://stackoverflow.com/a/64709212]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment