Skip to content

Instantly share code, notes, and snippets.

@fornarat
Last active October 9, 2015 21:41
Show Gist options
  • Save fornarat/ff77e029f2ac32bcd384 to your computer and use it in GitHub Desktop.
Save fornarat/ff77e029f2ac32bcd384 to your computer and use it in GitHub Desktop.
Manual steps to mount a new EBS volume to an existing EC2
Note: Newer Linux kernels may rename your devices to /dev/xvdf through /dev/xvdp internally, even when the device name entered here (and shown in the details) is /dev/sdf through /dev/sdp.
cd /mnt
lsblk
sudo file -s /dev/xvdf # if outputs 'data', it has to be formatted
sudo mkfs -t ext4 /dev/xvdf
sudo file -s /dev/xvdf
sudo cp /etc/fstab /etc/fstab.orig
sudo vi /etc/fstab
add this line:
/dev/xvdf /data ext4 defaults,nofail 0 2
sudo mount -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment