ONTAP Discussions

Converting LUN to NVMe Namespace

jaikumar
805 Views

ONTAP Supports Converting LUN to Namespace and Namespace to LUN. And this conversion can be done w/o any data loss. So for a use where someone wanted to migrate Data from SCSI (Fibre Channel and iSCSI) to NVMe (NVMe-FC and NVMe-TCP) then it is possible and these are the steps,

  1. Pause the IO to the LUN or Namespace which needs to be converted.
  2. Unmap the LUN or Namespace from the iGroup or Subsystem respectively.
  3. Create the necessary LIFs (SCSI-FC , iSCSI , NVMe-FC or NVMe-TCP)
  4. Ensure the connectivity from the Hosts and Check if the initiators is logged in.
  5. Create iGroup or Subsystem.
  6. Convert Namespace to LUN or LUN to Namespace , can use the below commands for the conversion.

=========== Converting LUN to NS ===========

ONTAPCluster::*> lun show -volume NS2LUN2NSVolume
Vserver Path State Mapped Type Size
-------- ------------------------------- ------- -------- -------- --------
VServerNS2LUN2NS /vol/NS2LUN2NSVolume/Lun2NS online unmapped linux 40MB

ONTAPCluster::*> vserver nvme namespace convert-from-lun -lun-path /vol/NS2LUN2NSVolume/Lun2NS -vserver VServerNS2LUN2NS
ONTAPCluster::*> vsenv

Error: "vsenv" is not a recognized command
ONTAPCluster::*> vserver nvme namespace show -volume NS2LUN2NSVolume
There are no entries matching your query.

ONTAPCluster::*> vserver nvme namespace convert-from-lun -lun-path /vol/NS2LUN2NSVolume/Lun2NS -vserver VServerNS2LUN2NS

ONTAPCluster::*> lun show -volume NS2LUN2NSVolume
There are no entries matching your query.

ONTAPCluster::*> vserver nvme namespace show -volume NS2LUN2NSVolume
Vserver Path State Size Subsystem NSID
------- -------------------------------- ------- ------- ---------- ---------
VServerNS2LUN2NS  /vol/NS2LUN2NSVolume/Lun2NS online 40MB - - <<<  LUN Converted to NS

ONTAPCluster::*>

=========== Converting Namespace to LUN ===========

C2_sti85-vsim-ucs210c_cluster::*> lun show -volume NS2LUN2NSVolume
There are no entries matching your query.

C2_sti85-vsim-ucs210c_cluster::*> vserver nvme namespace show -volume NS2LUN2NSVolume
Vserver Path State Size Subsystem NSID
------- -------------------------------- ------- ------- ---------- ---------
VServerNS2LUN2NS
/vol/NS2LUN2NSVolume/Lun2NS online 40MB - -

C2_sti85-vsim-ucs210c_cluster::*> lun convert-from-namespace -
-vserver -namespace-path

C2_sti85-vsim-ucs210c_cluster::*> lun convert-from-namespace -namespace-path
<path> Path of the NVMe namespace

C2_sti85-vsim-ucs210c_cluster::*> lun convert-from-namespace -namespace-path /vol/NS2LUN2NSVolume/Lun2NS -vserver VServerNS2LUN2NS

C2_sti85-vsim-ucs210c_cluster::*> vserver nvme namespace show -volume NS2LUN2NSVolume
There are no entries matching your query.

C2_sti85-vsim-ucs210c_cluster::*> lun show -volume NS2LUN2NSVolume
Vserver Path State Mapped Type Size
--------- ------------------------------- ------- -------- -------- --------
VServerNS2LUN2NS /vol/NS2LUN2NSVolume/Lun2NS online unmapped linux 40MB <<< NS Converted to LUN

C2_sti85-vsim-ucs210c_cluster::*>

------------------------------------------------------------------------------------------------------------------------

7. Post Conversion , Map the LUN or NS to the respective iGroup or Subsystem appropriately.

8. Proceed with the Discovery of the LUN/Namespace at the Host. 

9. File System Check at the Host and then can proceed with restarting IO on the LUN or NS.

0 REPLIES 0
Public