Answer the question
In order to leave comments, you need to log in
Is it correct to create lvm-mirror on SAN volumes?
Colleagues,
Please help me decide on the most appropriate solution:
Given:
2 servers (RHEL 6.6), to which 2 LUNs are simultaneously served - 1 from a hundred in the 1st data center, the second from a hundred in the 2nd data center. On the server side, everything is managed using dm-multipath.
Required:
if necessary (scheduled maintenance or failure on the server, or an optical problem in the FC factory), use LUNs either on one or the other server (but NOT on both at the same time). Plus providing fault tolerance.
Task implementation method:
Built a raid1 type lvm on supplied volumes. The physical devices, volume group, and mirrored logical volume are visible from both servers. An ext4 file system is built on the logical volume. The file system is mounted only on 1 of the servers.
Issues identified:
While testing fault tolerance - shutting down 1 of the submitted volumes with 1 of the hundred, the file system on the logical volume was unexpectedly damaged. e2fsck corrected the situation, but the generated data was lost.
Googling the errors in /var/log/messages has shown that such problems are common in clustered environments when the file system is used by more than 1 server. As a solution, it is proposed to exclude the possibility of mounting the file system for more than 1 server.
Actually the question is:
Does all this mean that in order to complete the task, it is necessary to build a "proper" cluster and use HA-LVM, or any similar tools? If so, which ones, except for paid ones from Red Hat?
Thank you very much in advance
Answer the question
In order to leave comments, you need to log in
Actually, for the sake of the few signatories, I’ll answer my own question:
In this configuration, it’s not good to use LVM and ext4 as a file system, because due to the peculiarities of ext4:
1) when switching to a backup server, data is lost in about 60 seconds (and the loss DB data for such a time can lead to sad consequences)
2) when performing numerous write / read operations at the time of the accident, there is a possibility of damage to the file system, which can lead to even more sad consequences than in paragraph 1
3) the actual speed of performing numerous operations write / read on a mirrored LVM logical volume falls by 2 times, compared with using a linear volume.
What to do?
1) Use cluster solutions: paid, free - it all depends on your OS and financial capabilities.
2) Provide fault tolerance by means of storage. And just replication is not good, because the same write delay occurs. It is necessary to create HA-pairs of volumes on two stacks (this technology is offered, for example, on expensive Hitachi VSP stacks)
3) Use Solaris and its wonderful ZFS (again, not for the poor).
Something like this. If someone has specific questions - do not be shy, write in the comments.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question