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
What is the equivalent command for ONTAP 9.10 ?
Solved! See The Solution
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?
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.
> 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.).