You probably need a file share rather than a volume. A file share allows mounting of a storage space as a file system (such as using OpenStack Manila).

As mentioned in the documentation, you need a specialised cluster filesystem which knows about block storage (https://docs.openstack.org/cinder/latest/admin/volume-multiattach.html). This is rare (e.g. Oracle clusters).

Something like CephFS with Manila would meet your use case.

Tim

On 22 Jan 2024, at 09:36, Shubham Yadav <shubham.yadav@taikun.cloud> wrote:

Hi, i have a question/issue related to multiattach feature in cinder
 
i have an openstack cluster and i have configured multiattach in the openstack cinder now when i create 1 volume (with volume type multiattach) and attach it to 2 instances test1 and test2
on test1
sudo mkfs -t ext4 /dev/sdb
sudo mkdir /mnt/mydisk
sudo mount /dev/sdb /mnt/mydisk
touch /mnt/mydisk/shared_file echo "This is some shared content" | sudo tee /mnt/mydisk/shared_file

on test2
sudo mkdir /mnt/mydisk
sudo mount /dev/sdb /mnt/mydisk
ls /mnt/mydisk/
cat /mnt/mydisk/shared_file


i can see the shared_file now when i add new files on test1 im not able to see it on test2 untill i unmount the volume with directory and mount the directory again to the volume on test2.

what could be the solution for it? how can i make the volume share datas instantly between all the instances connected to the volume

i have tried with ext4 and xfs file system

Hope to hear from you soon
Thank you!