ONTAP Discussions

Different Inode number across snapshots

nexus_enigma
4,245 Views

Hi,

We are working with NAS Snapshots on FAS2552, OnTap 8.3.2 .

Once the Volume snapshots are taken the Snapshots are NFS mounted on a host from where the contents are copied to a secondary storage. At this point we are observing that the inode number of files are changing in different snapshots. For e.g., a file F1 under snapshot 1 is different than the one under snapshot 2. Interestingly this file is not touched at all between the snapshots.

More so, this behavior is observed only when the snapshot is mounted on NFS v3.

 

See the below outputs -

----- NFS Version 3  --------

10.xx.xx.147:/demo_nas_vol1 on /ver3_mnt type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,....addr=10.xx.xx.147)

[root@nfshost ~]# stat -c %i /ver3_mnt/.snapshot/snap1_for_inodeTest/fileone.txt
858188230
[root@nfshost ~]# stat -c %i /ver3_mnt/.snapshot/snap2_for_inodeTest/fileone.txt
858188486

 

----  NFS Version 4  -----
10.xx.xx.147:/demo_nas_vol1 on /ver4_mnt type nfs4 (rw,relatime,vers=4.0,rsize=65536,wsize=65536,....addr=10.xx.xx.147)

[root@nfshost ~]# stat -c %i /ver4_mnt/.snapshot/snap1_for_inodeTest/fileone.txt
13510
[root@nfshost ~]# stat -c %i /ver4_mnt/.snapshot/snap2_for_inodeTest/fileone.txt
13510

 

So my question is - 

1. Is this expected behavior

2. What can be done to have consistent behavior

1 ACCEPTED SOLUTION

GidonMarcus
4,234 Views

Hi,

 

See what they say about FSID in snapshots on page 71.

https://www.netapp.com/us/media/tr-4067.pdf

 

Just reiterate in case you don't read the whole document - For the FSID disable/enable please note:

Note:NetApp does not recommend changing this option unless directed by support. If this option is changed with clients mounted to the NFS server, data corruption can take place

Gidi Marcus (Linkedin) - Storage and Microsoft technologies consultant - Hydro IT LTD - UK

View solution in original post

3 REPLIES 3

GidonMarcus
4,235 Views

Hi,

 

See what they say about FSID in snapshots on page 71.

https://www.netapp.com/us/media/tr-4067.pdf

 

Just reiterate in case you don't read the whole document - For the FSID disable/enable please note:

Note:NetApp does not recommend changing this option unless directed by support. If this option is changed with clients mounted to the NFS server, data corruption can take place

Gidi Marcus (Linkedin) - Storage and Microsoft technologies consultant - Hydro IT LTD - UK

nexus_enigma
4,205 Views

Thanks Marcus,

This will still not resolve the Inode issue I am observing while calling stat at the client end, because essentially, for NFSv3, FSID of a file is returned and this FSID is a combination of inode, volume identifier and Snapshot IDs.

However for NFSv4 if v4-fsid-change is enabled, the inode number is returned as FSID instead of FSID.

 

Ontapforrum
4,188 Views

Hi,

 

Your observation is correct!

 

So my question is - 

1. Is this expected behavior : Yes

2. What can be done to have consistent behavior : NFSv4

 

This is a known bug:
https://mysupport.netapp.com/NOW/cgi-bin/bol?Type=Detail&Display=933937

 

Bug is closed, will not be fixed:
At this time, this issue is not scheduled to be implemented or corrected in an upcoming release of the affected NetApp product.

 

Workaround:
To have identical FileIDs for a file across versions, use an NFSv4 mount instead of an NFSv3 mount.

 

Note: The NFS protocol does not require FileIDs for a file to be identical across versions of that file. Therefore, this is not a violation of the NFS protocol.

 

Thanks!

Public