I ordered a dedicated server from a certain service provider and they rent out iSCSI NAS as well. So I ordered 1TB iSCSI and connected it to proxmox via GUI. Then I read that the provider does not recommend connecting multiple hosts to the iSCSI. My question is when I create two new proxmox virtual machine virtio HDD's (diffrent vm's) and it's saved on the iSCSI, would this make the data in iSCSI corrupt? The data on vm's hdd's that are on iSCSI drive are saved only from proxmox right, not from the vm itself, as the vm does not connect to iSCSI?
I hope you guys can clear this for me.
If you have one iSCSI volume, you can only mount it on VM at the same time with a normal file system. If you mount it on two systems at the same time, corruption of the file system on the iSCSI target is guaranteed as both machines think they have exclusive access to the disk and will make conflicting changes, destroying the file system in short time.
There are two ways around this: First, you can reshare the iSCSI volume to a second machine with e.g. NFS and mount the NFS volume instead of the iSCSI target on the second VM. This is the easiest and most reliable way.
Second, you could setup a cluster infrastructure in your setup and use a cluster file system like GFS or OCFS on the iSCSI target. This is a lot more complicated to get working right and almost certainly overkill in your situation.
Edit
Reading your question again (which is kind of hard to understand), I have to add something:
If you want to use the iSCSI target to store VM disks (image files), you don't need NFS or anything. In that case, only the hypervisor (your dedicated server) has mounted the iSCSI volume and all write operations of the VM to their disks are running through the hypervisor. Note though that this is only true if the VMs are stored as image files on the iSCSI volume.