Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dmertl/8fc3f911d9635d3f5c7e82e0f82c7ee1 to your computer and use it in GitHub Desktop.
Save dmertl/8fc3f911d9635d3f5c7e82e0f82c7ee1 to your computer and use it in GitHub Desktop.
Make AWS EC2 Attached EBS Volume Available on CentOS

Assuming device /dev/xvdd being mounted to /data.

sudo mkfs -t ext4 /dev/xvdd
sudo mkdir /data
sudo mount /dev/xvdd /data

Add line to /etc/fstab to mount every boot:

sudo vi /etc/fstab
/dev/xvdd               /data                   ext4    defaults,nofail 0 2

If you don't know the device name you can find it with:

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