AWS Classroomnotes 05/Nov/2022

AWS Elastic Block Storage contd…

  • File Systems on Linux:
    • xfs
    • ext4
  • Finding the block devices (hard disks) sudo lsblk Refer Here
  • To create a file system sudo mkfs -t xfs <path of block device>
  • Create a new folder sudo mkdir /additional
  • Mount the disk to folder sudo mount <block device path> /additonal
  • Lets create some files
  • Create an ec2 instance with ubuntu os. While creating add a volume of size 1GiB. Find the block device name. Create a filesystem and mount to /additonal and execute sudo df -h
  • After this is done. Attach a new voluem of size 1 GiB and mount it to folder /tools and execute sudo df -h
  • Restart the ec2 instance and execute sudo df -h
  • After restart linux doesn’t remember the mounts
  • To make this work we need to add entries in a file /etc/fstab
  • Lets add entries to /etc/fstab
sudo blkid

* Add the following entries to /etc/fstab

UUID=<uuid-from-blk-id>   /additional   xfs   defaults,nofail   1   2

* Figure out how to bring in the expanded disk size into linux mounts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner