0

I have two Centos 7 servers with a shared disk mounted via fstab with:

/dev/sdb /mnt/shared   xfs  rw,suid,dev,noexec,auto,user,sync      0  0

I can see the disk and its content on both servers, but when I create a new file it is not automatically seen on the opposite server. If I umount and mount the disk, then the files will appear.

Executing sync after file creation also won't create the file.

I have installed lsyncd as suggested here but nothing changed.

Zumo de Vidrio
  • 1,703
  • 1
  • 13
  • 28

1 Answers1

1

If you are using a shared block device you must ensure you are using a clustered filesystem if you intend for both servers to be able to write to the filesystem. Otherwise you will undoubtedly corrupt the file system.

Examples of clustered file systems:

GFS
Lustre
OCF
LizardFS

If it's an option, it may be simpler to mount an NFS share on both servers, as this will handle file locking etc.

rusty shackleford
  • 2,365
  • 9
  • 21