Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Mount EBS volume on Linux

## Instance 1

lsblk
sudo file -s /dev/xvdf <confirm nothing is mounted>
sudo mkfs -t xfs /dev/xvdf <create file system>
sudo file -s /dev/xvdf <confirm system is made>
sudo mkdir /ebstest <create folder to mount>
sudo mount /dev/xvdf /ebstest <mount volume to folder>
cd /ebstest
sudo nano amazingtestfile.txt
add a message
save and exit
ls -la

## Reboot Instance 1

sudo reboot

## Instance 1 After Reboot

df -k
sudo blkid <lists volumes and names. copy>
sudo nano /etc/fstab
  ADD LINE 
  UUID="YOURUUIDHEREREPLACEME"  /ebstest  xfs  defaults,nofail
sudo mount -a
cd /ebstest
ls -la
 
PREVIOUS NEXT
Tagged: #Mount #EBS #volume #Linux
ADD COMMENT
Topic
Name
5+8 =