ONTAP Discussions

Access to LUN through NFS on ONTAP 9

Sebastien_BLANCHET
246 Views

On ONTAP 9.10,  I would like to backup/restore a LUN through NFS.

 

In 7-mode there was the command lun share to allow accessing a LUN through NFS

https://library.netapp.com/ecmdocs/ECMP1196995/html/GUID-F134DB5A-60F2-47EE-9A92-228351549BF6.html

 

What is the equivalent command for ONTAP 9.10 ?

 

1 ACCEPTED SOLUTION

Sebastien_BLANCHET
109 Views

Apparently there is no way anymore to access LUN over NFS with ONTAP 9,

therefore I will resign myself to backup my LUNs with iSCSI from Linux.

View solution in original post

8 REPLIES 8

Ontapforrum
229 Views

Interesting query, b'cos I don't remember trying this (lun share) feature even when I was dealing with 7-mode filers.  Looks like it did exist in 7-mode.

 

I checked the document for '7-mode cmds to Ontap map', it says -lun share Not supported in cdot/OTNAP.

https://docs.netapp.com/us-en/ontap-7mode-transition/command-map/reference_how_7_mode_commands_map_to_clustered_ontap_commands.html#k-o

 

If you want to backup/restore lun (as whole) without block protocols, then NDMP can do the job.

TMACMD
201 Views

So obviously not a best practice or recommended. But…

You could add nfs to the vserver. You could add a data lif. You could give the volume that has the lun a junction path. I’d probably set a default export policy rule to 100% read only. 
You might be able to backup the “lun file” over nfs

 

 of course you could go a few steps further and clone the volume and the Mount/access/backup from the clone without fear of damaging the active lun

 

NOTE: I have not tried this before but I believe in theory it should work. I think the only difference is the lun serial number may change on the clone

I have already added

  • NFS to the vserver
  • data LIF
  • junction path
  • setup export policy

I can mount the volume with NFS,

I see the underlying LUN files

but when I try to read the file, for example with md5sum, I got Input/Output error.

 

In 7-mode, there was an additional step to allow NFS access to the file

lun share <lun_path> read

 

 

 

 

aladd
164 Views

There was a post on this years ago, I can't think of a use case for this as NFS is a NAS protocol for file access whereas LUNs are accessed over SAN protocols. Is there an end goal you're trying to achieve by mounting a LUN over NFS?

 

Reference post: https://community.netapp.com/t5/Network-and-Storage-Protocols/Sharing-a-CIFS-or-NFS-LUN/m-p/47119

Sebastien_BLANCHET
139 Views

Thank you @aladd for finding this previous post.

 

I use LUN to boot physical computers, and I used NFS access to backup the LUN.

 

To backup the LUN

  • I shutdown the physical computer
  • I mount the volume that hosts the LUN on the backup server with NFS
  • I copy directly the file

If the physical computer does not boot

  • I shutdown the physical computer
  • I mount the volume that hosts the LUN on the backup server with NFS
  • I mount the LUN on the loopback, and I can see inside that is wrong.

 

Of course I can use a iSCSI Linux client do achieve the same goal, but it was more convenient with NFS.

 

That's cool!

 

> Of course I can use a iSCSI Linux client do achieve the same goal, but it was more convenient with NFS.

 

For cold backup, it is more convenient this way. A slightly more complicated way would be to shutdown the block client, snapshot the LUN, and boot the client. Then the snapshot could be cloned for backup and presented to an NFS client for backup.

I wrote a similar script for iSCSI, and it worked well, but once you get to dozens of volumes or LUN configuration change a lot, this becomes a little bit complicated to manage and the risk of mistakes more pronounced (e.g. you could forget to backup a volume, or backup a wrong volume, etc.).

Sebastien_BLANCHET
110 Views

Apparently there is no way anymore to access LUN over NFS with ONTAP 9,

therefore I will resign myself to backup my LUNs with iSCSI from Linux.

That sounds like a "security enhancement". It'd be nice if NFS access was a configurable option.

Public