5

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?

Nemo
  • 259
  • 1
  • 13
SinaOwolabi
  • 219
  • 1
  • 7
  • 18

2 Answers2

6

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

A.Newgate
  • 1,476
  • 5
  • 11
2

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%

antrost
  • 473
  • 3
  • 8
  • I don't think so. If he mount an iSCSI disk to second host without cluster file system, he might loss the data. – A.Newgate Apr 02 '18 at 17:25