shared storage for proxmox ve using an external sas controller HP 2012MSA

RodinM

Renowned Member
Aug 1, 2011
81
0
71
I set up a shared storage for proxmox ve using an external sas controller HP 2012MSA and I think I do something wrong because my kvm's disks on the shared storage get corrupted when used by the secont server in the cluster.
Here is what I did to make a shared volume:
pvecreate /dev/cciss/c0d8
vgcreate VGONVD3 /dev/cciss/c0d8
lvcreate -L 1T -n MAIN VGONVD3
mkfs.ext4 /dev/VGONVD3/MAIN
mkdir /mnt/MAIN
mount /dev/VGONVD3/MAIN /mnt/MAIN
I edited /etc/fstab to make changes permanent on both servers:
/dev/VGONVD3/MAIN /mnt/MAIN ext4 defaults 0 1
pointed in the web interface to the storage as a folder /mnt/MAIN and marked it as a shared storage.
I created some kvm's on it using one of the servers in the cluster and moved two of them in online mode to the second server where I resumed working with them. Everything seemed good till I rebooted one machine on the second server. The kvm (win2003) showed multiple errors on the disk during startup and tried fixing them automatically, but there was many of them and I understood that something went wrong. I powered down both machines on the second server and rebooted it. After startup it showed errors while doing fsck on the shared volume and was not able to mount it properly. During this the first server was working fine and kvm's on it were able to shutdown and reboot without any problems. I rebooted the first server and it started up without any problems (while the second server was offline).
The two machines on the second server got corrupted and they were unrecoverable so I had to create and set up new kvm's using the first server. Now all kvm's are running properly on one server but I can't use the cluster feature using the shared storage that way.
The question is: what have I done wrong setting up the shared volume? It somehow differs with the official manual of proxmox ve, where storage model lvm2 is described, but I thought it would be easier to manage virtual disks of kvm's using folders where logical volumes were mounted so as I could copy and move them between kvm's.
The second question is: As I'm using the external fault tolerant SAS storage with two controllers and each of them appears twice in the boot menu (active and passive mode). So I see every physical volume 4 times e. g. while using the fdisk -l command. And when I installed proxmox ve on a dedicated 10GB volume I had to choose one of four. Is there any way to use them as LUN's?
 
if you mount a ext4 file-system on two server your data will get corrupted, we recommend LVM - fast, easy to manage, reliable.

(If you want a filesystem which you can mount on several boxes it must be a cluster file system, e.g. ocfs2. but we do not recommend/test this here but some users reported that its working fine)
 
Ok, thank you. I will try it. But is there a way to move them between machines or move them to another storage like simple disk files in backup purposes?
And one more question remains: can i use physical storage as LUN's, so as I can see a single physical disk and not four related to four fault tolerant connections inside the external sas controller?