We help IT Professionals succeed at work.

How to migrate a file server that has a LUN directly attached to the VM through iSCSI?

rivkamak
rivkamak asked
on
Hi,

I have a VM in vmware that is being used as a file server. The files are residing in a LUN that is shared directly with the VM through iSCSI. (It appears as a second drive in windows.)

I want to upgrade the file server and I figure the easiest way to get this done is put up a new VM on the same Host and make another direct iSCSI connection from the VM to the ISCSI target (the same LUN). This way I will have all company files instantly without having to use any backup/restore software and save on SAN space.  

Does this make sense? If it does,then what will happen to all my ntfs/sharing permissions that were configured on the old file server. Will they be transfered also since the LUN was moved?

Thank you.
Comment
Watch Question

VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
Commented:
So this is what we call a RDM (or RAW Mapped LUN).

The LUN is presented directly to the VM using iSCSI or otherwise.

What you MUST not do is connect BOTH Windows servers to the LUN at the same time.

Otherwise your plan is fine, turn off the VM, create a new VM and attach to LUN.

Does this make sense? If it does,then what will happen to all my ntfs/sharing permissions that were configured on the old file server. Will they be transfered also since the LUN was moved?

All fine.

NTFS permissions are stored on the DISK (in the LUN). Part of NTFS.

Shares are configured at the OS.

You can Export the Registrty and Import into new OS, to get your shares back.

Author

Commented:

Thank you very much.


Just wondering why cant two VM's both server up the same LUN via ISCSI?



Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
Commented:
not support in Microsoft Windows unless you use Microsoft Failover Clustering, and then only a single node has access to the LUN (file system). at one time.

Only Cluster Shared Volumes in Hyper-V can shared a LUN.

Limitation of the OS, and IF YOU DO IT, you will corrupt your NTFS volume, you have been warned.

You can see another question here about file share migration

https://www.experts-exchange.com/questions/29171275/Migrating-shares-to-new-server.html#a43021909

Author

Commented:

Thank you.


Its as simple as turning off the old file server or should I disconnet the RDM first and  only then present the LUN to the new file server?

Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
As the old server is NOT going to be turned on again, and retired, I would just power off, and leave as is. (just in case you need to turn back on again!) = rollback!

Just build a new VM, then power off the old.....connect LUN...

Author

Commented:

Thank you. 


One last question. When I check the disk I see that it says iSCSI network. If its an RDM isnt it supposed to say Raw Mapped LUN?  Is that the same thing?


Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
two network interfaces??

no I suspect you use the Microsoft iSCSI int in the VM to connect to the LUN which is a RAW LUN but not a VMware RDM
kevinhsiehNetwork Engineer
Commented:
To be safe, I would remove access to the LUN for the old VM before allowing the new VM to connect. This helps prevent both VMs from ever connecting.

I would also strongly look at migrating the data to VMDK. Having raw LUNs may have made some sense in 2010, but make about zero sense in 2020.
Distinguished Expert 2017
Commented:
The reason an iscsi or FC connected LUN can not be shared is that each node maintains the reference data in the LUN as the host sends Command for the SAN, Is is device to perform.
If you have two modes connected at the same time, each only sees what existed at the time they connected and only have information of changes it made, it is oblivious to any changes any other host .
The possibility is the two nodes write different data to the same destination.
If one node deletes a file the second mode attempts to access.....
Unlike Windows share, unix/Linux NFS share
A LUN is a raw device the host connected to it is managing it.


There are powershell scripts that deal with migrating shares. The ntfs, file level permissions are retained by the LUN, the issue you Dave deals with the shares.
Some use registry to export the defined shares, others as noted use vbscripts, powershell scripts that one runs on the current server to generate the share list and share permissions which then can be generated on the new server when the LUN is connected to the new VM

Often, to connect a LUN via FC or iscsi, you need to authorize the host.

While agree with Andrew on powering off the old VM, the risk is there that a missed step like not marking the old VM not to start with the host can be overlooked that could lead to the data corruption.

Eother use Kevin's, to disconnect and change the device from auto-connecting or on the LUN side, un-authorize the old VM
Top Expert 2014

Commented:
The simplest explanation of why you cannot share a LUN without some form of clustering software is that the File Allocation Table is cached in RAM so one server does not check the disk to see what space is really free because it can use the cached copy for speed.