[PVE-User] shared LVM on host-based mirrored iSCSI LUNs

Stefan Sänger stsaenger at googlemail.com
Mon Apr 23 13:05:32 CEST 2012

Hi everybody,

after coping with the cluster problems I am back for another question.
Let me first describe the setup:

I have two small NAS boxes running openfiler each providing an iSCSI 
LUN. These LUNs are exactly the same size.
I connected both LUNs to all three of my proxmox-servers (pve1, pve2 and 

In order to implement host-based mirroring I installed mdadm on each 
proxmox server and created a RAID1 on pve1 using both LUNs. (/dev/md0)
Then I created a physical volume on that RAID and a new volume group

After restarting mdadm and excuting pvscan the volume group was visible 
on all 3 servers.

I added that volume group as a proxmox storage and set the "shared" flag 
on the first server and then I installed / restored several virtual 
machines to it using that volume group as storage.

And now I'm amazed because I did several tests with live migration, 
adding VMs to HA, testing node failures etc.

Since I did not configure any locking for mdadm I figured that mdadm 
would lead to corrupting the contents of the logical volumes used as 
virtual hard disks.

But to my surprise fsck did not reveal any errors.

So my question is: Is there some locking already in place and I just 
missed it? clvm is installed but obviously not used, /etc/lvm.conf is 
set to file based locking and the locking_dir is local to every server,

Neither /etc/default/mdadm nor /etc/mdadm/mdadm.conf contain any hin 
about locking, so I wonder if I only have been lucky not to encounter 
any errors or if I missed something?

TIA, Stefan

More information about the pve-user mailing list