How to easily share local partitions between multiple computers

I am looking for advice. I have a few CentOS 7 virtual machines with ISCSI disks mounted as LVM partitions for application log storage. These virtual machines are already highly loaded (CPU and RAM), and I am a little worried about introducing an application such as logstash to read these logs. How can I easily remotely share the log partitions with a new VM running logstash?


Solution 1:

Check filebeat instead of sharing partitions.

It reads log files and sends them to logstash. Filebeat is lightweight, you should not experience performance issues because of adding it. We use it for transferring tens of GBs logs per day, current memory usage is 80mb and CPU usage is less than 1%

Solution 2:

In order to share local partitions across multiple host, you need to make its file system shared. Having a single iSCSI LUN formatted to NTFS/ext4/whatever file system will lead to data corruption in case you mount the iSCSI LUN to second host at that time.

You should use cluster shared file system to be able to read and write the data from multiple hosts to the same iSCSI LUN.

Some useful reads for the case.

https://community.spiceworks.com/topic/200714-two-servers-accessing-same-iscsi-target-seeing-different-data

https://forums.starwindsoftware.com/viewtopic.php?f=5&t=1392

https://support.microsoft.com/en-us/help/2908783/data-corruption-occurs-on-iscsi-luns-in-windows