EC2 attach EBS Volumes

link for reference https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html Attach a volume to an EC2 Instance SSH into the EC2 instance use lsblk to get the device name, full path is now /dev/ check if vol is already init with a file system sudo file -s /dev/<name_of_device> - 1 if output is just data then there is no filesystem on it, make one on it now mkfs -t [ext4| XFS] /dev/<name_of_device> (may need sudo) run 1 again to ensure it is written to the block device...

2 min · Yashodhan Ghadge