ONTAP Discussions
ONTAP Discussions
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 ?
Solved! See The Solution
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.
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.
If you want to backup/restore lun (as whole) without block protocols, then NDMP can do the job.
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
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
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
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
If the physical computer does not boot
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.).
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.
I just did a quick and dirty test.
Not sure if that will help you or not.
@TMACMD I did not succeed to repeat your setup to read the LUN through NFS.
Even if I read the LUN content through a snapshot, I am still getting Input/output error
I have tried with a LUN which is mapped and and also with a new unmapped LUN
I run ONTAP 9.10.1p7