Mounting NetApp Clustered ONTAP NFS exports in RHEV 3.1

Hi folks,

Just thought I’d update you on something you may need to throw in your bag of tricks. This one has to do with getting a NetApp NFS export mounted and initialized properly in RHEV 3.1. I’m putting this out there as it seems to be just a little different than before and without this little tip you might get frustrated enough to put a pen through your monitor…

Of course there are actually 2 big things that are different here and I’m not sure which of the 2 is the cause of the issue, or if it’s the combination of the 2. In any case, here is the situation:

  • I’m using NetApp Clustered Data ONTAP v8.1 as my storage platform
  • I’m using RHEV 3.1 as my virtualization platform

Even before this combination (i.e. RHEV 3 mounting Data ONTAP 7-mode), there was an extra step required in order to get everything playing nicely.. You would manually mount the NFS export to “/mnt” on a separate host, change the ownership of the export to 36:36, unmount, then tell RHEV to work it’s magic.

But something’s different now, and as I said, I’m not sure what changed it. Truth is that I don’t really care, I just want to get my storage attached and share the steps with you so that you don’t have to explain to your manager why you expensed a new monitor or have someone explain to you why a monitor with a pen shoved through it isn’t covered by warranty.

Here are the steps you need to take:

  1. Create your storage on the NetApp Clustered ONTAP Vserver, apply your export policy
  2. Mount the newly created NFS export manually on any RHEL server
  3. Follow these steps:
[root@infra01 ~]# ls -ld /mnt
drwxr-xr-x. 2 root root 4096 Jun 28  2011 /mnt
[root@infra01 ~]# mount infra_NFS:/test_vol /mnt
[root@infra01 ~]# ls -ld /mnt
drwx------. 2 root bin 4096 Feb 11 08:54 /mnt
[root@infra01 ~]# chown -R 36:36 /mnt
chown: changing ownership of `/mnt/.snapshot': Read-only file system
[root@infra01 ~]# chmod -R 755 /mnt
chmod: changing permissions of `/mnt/.snapshot': Read-only file system
[root@infra01 ~]# umount /mnt
[root@infra01 ~]# ls -ld /mnt
drwxr-xr-x. 2 root root 4096 Jun 28  2011 /mnt
[root@infra01 ~]#

It’s all good.. but wait a minute you say.. you get the changing of the ownership thing just fine, but what’s with “/mnt” changing permissions after the mount you ask. Honestly, I have no idea, but that’s why I wrote this post. I didn’t actually put a pen through my monitor, but the thought did cross my mind. I changed the ownership of the export but no matter how hard I pressed on the mouse button, I couldn’t get RHEV 3.1 to mount and initialize the export.

I had verified that it wasn’t IPtables or SElinux blocking access. That left permissions.. So that’s when I discovered that when I was manually mounting the export to “/mnt”, the permissions changed. Once I “chmod’d” them to 755 after changing ownership, RHEV 3.1 was able to do it’s magic without issue.

Again, not sure why it’s different now, and I don’t have time to find this particular answer, but I wanted to spare you folks the frustration. UPDATE – Thanks to Ben Korvemaker, @bengerbil, for informing me that permissions ‘700’ are the default coming from the NetApp Vserver.

Hope this helps,

Captain KVM

Agree? Disagree? Something to add to the conversation?