Score:0

How to share files via a shared drive across multiple VM's running Ubuntu 18.04?

mp flag
B P

I am trying to share a single disk across multiple VM's. 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...

  1. 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?
  2. 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?
  3. Perhaps this is a problem with Azure, although I no longer believe it to be.
  4. 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?

Esther avatar
es flag
This is very much an Azure issue, please read https://learn.microsoft.com/en-us/azure/virtual-machines/disks-shared#linux Multiple machines can not have write access to the drive at once unless you set extra things up.
B P avatar
mp flag
B P
@Esther thank you, let me read up on that link. for my use case, i actually only need one machine to be able to write. all others just need to be able to read, but that seems to be a problem too.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.