EBS Volume Updates – How to See When Attached to Multiple Instances

amazon ec2amazon-ebsamazon-web-services

I have two ec2 instance running Ubuntu 18.04. I have created a Provisioned IOPS SSD (io1) volume and enabled multi-attach. I have successfully mounted the volume on both instances and can read and write to it without any issues. The problem now is if I modify a file on the shared volume from instance A, I cannot see the change on instance B without remounting the volume. Is there a way to make those updates immediately visible on both instances?

Best Answer

You'll need a filesystem / app that's multi-attach aware. For example Oracle RAC can use such volumes, while normal filesystems like ext4 or xfs can't. They are designed to be mounted on a single host only.

Let's step back - what are you trying to achieve? Share files between the instances I suppose? Your best bet is EFS (Elastic File System) - an AWS cloud-native NFS service. Unless you've got a very specific need for multi-attach EBS and running some very special app that can make use of that I suggest you explore the EFS way instead. The need for multi-attach disks is rare, both in the cloud and outside.

Hope that helps :)