I am trying to share a single disk across multiple VM's (Ubuntu 18). The VM's are hosted in Azure and the disk is an Azure Managed Disk. I've attached the disk to both VM's and have mounted them. I can see the partition on each, as well as the test file I've created, test.txt. However, updates to the contents of the txt file while SSH'ed into VM1 are not reflected in VM22. Instead, the VM2 shows the prior value until I unmount and remount the drive.
I'm new to Ubuntu/Linux, and am trying to figure out where to look. My initial thoughts...
- Perhaps the filesystem I'm using (gpt) cannot support multiple, concurrent access in this manner and I must use something else? If so, what is more suitable?
- The VM seems to take a copy of the file when it's mounted and writes are not shared.
- Perhaps this is the problem and this can be turned off?
- Perhaps this is a problem with Azure, although I no longer believe it to be.
- Perhaps there is a permissions issue because the user accounts differ between machines. I know Linux includes permissions on a file + directory basis as a first-class concern.
Any other thoughts?