EzDevInfo.com

netapp interview questions

Top netapp frequently asked interview questions

Using FileSystemWatcher on DataOntap

I have a project that watches file creation/deletion activity on a network share which is currently hosted by a Windows Server machine, but I'm considering moving the files to a NetApp box running DataOntap. Their API documentation says they support ReadDirectoryChangesW, which is what FileSystemWatcher is using below the covers, but I'm concerned that it might not be a full implementation. Are there any pitfalls I should watch out for?


Source: (StackOverflow)

Detect if a computer is a NetApp filer? (Unmanaged C++)

What is the best way to detect if a computer on a network is a netapp filer? I have tried some general querying of the computers attributes, but nothing has stuck out.


Source: (StackOverflow)

Advertisements

Actual difference between data compression and data deduplication

What is the exact difference between data deduplication and data compression.

As of my knowledge data deduplication means when we have exact same copies of data either same block(block level deduplication) or same file(file level deduplication) then only one copy is preserved in the storage and to that copy the number of ref count is incremented each time the block or file is used by different users.

But how compression works internally.

Please help me out of this. Thanks in advance.


Source: (StackOverflow)

du warning for netapp data ontap backend

I ran the following command du --apparent-size --block-size=1 --summarize /mnt2/nfspools/_root_root_p1 PS: /mnt2/nfspools/_root_root_p1 is mount point for volume in data ontap filer.

I got the following output:

du: WARNING: Circular directory structure. This almost certainly means that you have a corrupted file system. NOTIFY YOUR SYSTEM MANAGER. The following directory is part of the cycle: `/mnt2/nfspools/_root_root_p1/.snapshot/hourly.0'

du: WARNING: Circular directory structure. This almost certainly means that you have a corrupted file system. NOTIFY YOUR SYSTEM MANAGER. The following directory is part of the cycle: `/mnt2/nfspools/_root_root_p1/.snapshot/nightly.0'

du: WARNING: Circular directory structure. This almost certainly means that you have a corrupted file system. NOTIFY YOUR SYSTEM MANAGER. The following directory is part of the cycle: `/mnt2/nfspools/_root_root_p1/.snapshot/hourly.1'

du: WARNING: Circular directory structure. This almost certainly means that you have a corrupted file system. NOTIFY YOUR SYSTEM MANAGER. The following directory is part of the cycle: `/mnt2/nfspools/_root_root_p1/.snapshot/hourly.2'

du: WARNING: Circular directory structure. This almost certainly means that you have a corrupted file system. NOTIFY YOUR SYSTEM MANAGER. The following directory is part of the cycle: `/mnt2/nfspools/_root_root_p1/.snapshot/hourly.3'

16384 /mnt2/nfspools/_root_root_p1

is there any setting I can do netapp data ontap to avoid this warning when I run du command?


Source: (StackOverflow)

Unable to Return output from function

function Get-NaLUNbyMap {
<#
.DESCRIPTION
Gets Lun Information for a particular initiatorgroup name & lunid
.EXAMPLE
Get-Inventory -computername server-r2
.EXAMPLE
Import-Module NaLUNbyMap
Get-NaLUNbyMap -igroup "IA" -lunid 1
#>
[CmdletBinding()]
param(
[Parameter(Mandatory=$True,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)]
[string[]]$igroup,
[Parameter(Mandatory=$True,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)]
[string[]]$lunid
)
Process 
{ 

$info = (Get-NaLun |Select @{Name="LUN";Expression={$_.path}},@{Name="Size";Expression={[math]::Round([decimal]$_.size/1gb,0)}},@{Name="OnlineStatus";Expression={$_.online}},@{Name="Group";Expression={([string]::Join(",",(Get-NaLun $_.path | get-nalunmap | select -ExpandProperty initiatorgroupname)))}},@{Name="LunID";Expression={Get-NaLun $_.path | get-nalunmap | select -ExpandProperty lunid}} | ?{$_.group -eq $igroup -and $_.lunid -eq $lunid})
return $info
}
}

Hi Im unable to return output from this function, can some one please help me out!


Source: (StackOverflow)

How can I use fsecurity apply on a NetApp filer to reset NTFS permissions? (ONTAP 7-MODE)

I have a NetApp filer, with a CIFS export. The permissions have been locked down on it, to a point where it's no longer accessible. I need to reset the permissions on this - I've figured out I can probably do this by changing the qtree to Unix security mode and back again (provided I'm prepared to unexport the share temporarily).

However, I think I should be able to use the fsecurity command to do this. There's just one problem - the manpage example refers to 'applying ACLs from a config file': https://library.netapp.com/ecmdocs/ECMP1196890/html/man1/na_fsecurity_apply.1.html

But what it doesn't do, is give me an example of what a 'security definition file' actually looks like.

Is anyone able to give me an example? Resetting a directory structure to Everyone/Full Control is sufficient for my needs, as re-applying permissions isn't a problem.


Source: (StackOverflow)

Certificate based authentication to file share

I am trying to connect an isolated, non-domain-connected system to a file share contained in an Active Directory domain. Ultimately, I need to be able to backup files from the isolated system to the domain-connected file share using a scheduled task. I have the additional requirement that I cannot store passwords, and the file share cannot accept anonymous connections.

To get around these problems, I created an X509 certificate from our CA for the purpose of client authentication. I have installed the certificate in the Personal certificate store for the user account I am using to run my program. I have also linked this certificate to a user account in Active Directory.

Simply running the tool with the certificate installed fails, and everything I have come across either:

  1. only provides a username/password authentication scheme
  2. requires implementing a middle-man service
    • Connecting using WCF
    • An HTTPS connection via WebRequest.Create() to a correctly configured IIS server

Is there any way to make the system authenticate using the stored certificate (or any non password-based method) in order to access the file share directly? Due to the nature of the system, closed-source external libraries are also not an option. Open source libraries are OK though.

As a side note, we have multiple systems where this needs to be set up on, and in a couple of those setups, NetApp 8.2.1 is being used for the file share server. Preferably a solution would not depend on this fact, since not all of our systems use NetApp, but a partial fix is better than no fix. For those unfamiliar with NetApp, it means that in addition to being a standard SMB Windows share, it is also accessible as a NFS share, among other things.


Source: (StackOverflow)

NetApp 7-Mode simulator CIFS share creation

What are the different ways to create CIFS share on NetApp 7-mode simulator? I created share using command line argument and NetApp onCommand System Manager. I want to know is there any other way to do the same things?


Source: (StackOverflow)

How to write files to NetApps filer with Snaplock Compliance Volume

We have a NetApps FAS2040 device with a Snaplock compliance volume configure. Image files are written to the volume using IBM FileNet for compliant storage of scanned post.

We want to replace the FileNet element with a in-house solution where we write the images ourselves to the volume. What I would like to know is what is involved in doing this.

Is it just a case of writing a file to the volume then setting the read only attribute to true?. How would I configure expiration for the file. Can I change the time between it being read only and then permanently committed?

Thanks

Stuart


Source: (StackOverflow)

bash - parsing file and getting variables

I've searched and searched on here for an answer, and I think the combination of being a noob at bash, not knowing the right way to do this, and not searching for the right keywords has meant I can't quite get over the last hurdle.

I am looking to write a script doing some checks on our Netapp System. And I have some difficulties to fulfill the 2 first variables (VAR1 & VAR2)... I tried with cut and awk command but all my tries were unsuccessfully.

I have a text file (LUNS) and it looks like :

     #SAN1; SAN2
    abc1:abc1N
    abc2:abc2N 
    a3:a3N 
    abcde4:abcde4N

all the lines are text and numeric stuff.

for each line of the tom file, I would like to do:

  • get the value of the 1st column in VAR1
  • get the value of the 2nd column un VAR2
  • run and get a new value VAR3 for a command with VAR1 (it will be the size of the LUN so it will be a numeric value)
  • run and get a new value VAR4 for a command with VAR2 (same as bellow)
  • compare the numeric values of VAR3 & VAR4

What I did :

    cat tom |grep -v "#" |while read ligne ; do 
    VAR1=awk -F ";" '{print $1}'
    VAR2=awk -F ";" '{print $1}'
    specific command to get the numeric VAR3 & VAR4 values.
    #and run the comparaison  like : 
    if [ "$VAR3" -ne "$VAR4" ] 
    then
    echo "PROBLEM"
            if [ "$VAR4" -lt "$VAR3" ] ; then echo $VAR4; rm $VAR4; else echo "call support"; fi
    else 
    echo "Everything is OK"
    fi  

my awk is not working. i am open to any modification in the config file, or in my way to get the VAR1 & VAR2 variables

Can I have your input on, please?


Source: (StackOverflow)

python hex to ascii using sprintf

I'm running the following python program to read the content of a file, but the outcome is presented in HEX as follow:

Python Script:

import sys
sys.path.append("<path_to_nmsdk_root>/lib/python/NetApp")
from NaServer import *

s = NaServer("<server name or IP address>", 1 , 17)
s.set_server_type("FILER")
s.set_transport_type("HTTPS")
s.set_port(443)
s.set_style("LOGIN")
s.set_admin_user("<user name>", "<password>")

api = NaElement("file-read-file")
api.child_add_string("length","<length>")
api.child_add_string("offset","<offset>")
api.child_add_string("path","<path>")
xo = s.invoke_elem(api)
if (xo.results_status() == "failed") :
    print ("Error:\n")
    print (xo.sprintf())
    sys.exit (1)
print ("Received:\n")
print (xo.sprintf())

The output is:

< results status="passed">
< length>3419< /length>
**< data>2f 75 70 6c 6f 61 64 2f 63 6f 6d 6d 6f 6e 2f 75 73 65 72 73 3a 20 4e 65 77 20 53 70 61 63 65 20 41 76 61 69 6c 61 62 6c 65</data>**


I'd like to get the result in ASCII, which should be:

< data>/upload/common/users: New Space Available< /data>


Source: (StackOverflow)

Regarding permissions of CIFS shares.

We recently changed the domain of our filer due to this few users have lost permissions to their CIFS shares. Is there a way to get the fsecurity show output from some config file, so that i can proactively check for the changes before and after domain change.


Source: (StackOverflow)

jcifs share enumartion timesout

I've been using jcifs 1.3.17 for quite some time, and recently had some troubles enumerating shares from one specific NetApp machine.

  • the NetApp is in cluster mode
  • using smbclient from same source to same target finishes successfully

I can post the network captures (pcap file) if necessary.

exception is:

jcifs.util.transport.TransportException: Transport2 timedout waiting for response to SmbComReadAndX[command=SMB_COM_READ_ANDX,received=false,errorCode=0,flags=0x0018,flags2=0xC803,signSeq=0,tid=1,pid=17493,uid=1,mid=16,wordCount=12,byteCount=0,andxCommand=0xFF,andxOffset=0,fid=1,offset=7352,maxCount=1024,minCount=1024,openTimeout=-1,remaining=1024,offset=7352]
    at jcifs.util.transport.Transport.sendrecv(Transport.java:73)
    at jcifs.smb.SmbTransport.send(SmbTransport.java:655)
    at jcifs.smb.SmbSession.send(SmbSession.java:255)
    at jcifs.smb.SmbTree.send(SmbTree.java:113)
    at jcifs.smb.SmbFile.send(SmbFile.java:792)
    at jcifs.smb.SmbFileInputStream.readDirect(SmbFileInputStream.java:181)
    at jcifs.dcerpc.DcerpcPipeHandle.doReceiveFragment(DcerpcPipeHandle.java:99)
    at jcifs.dcerpc.DcerpcHandle.sendrecv(DcerpcHandle.java:220)
    at jcifs.smb.SmbFile.doMsrpcShareEnum(SmbFile.java:1938)
    at jcifs.smb.SmbFile.doShareEnum(SmbFile.java:1851)
    at jcifs.smb.SmbFile.doEnum(SmbFile.java:1797)
    at jcifs.smb.SmbFile.listFiles(SmbFile.java:1773)
    at jcifs.smb.SmbFile.listFiles(SmbFile.java:1762)
    at com.mprv.filecrawler.cifs.SmbRootCrawler.listDirectories(SmbRootCrawler.java:32)
    at com.mprv.filecrawler.cifs.SmbDirCrawler.crawl(SmbDirCrawler.java:62)
    at com.mprv.filecrawler.cifs.SmbDirCrawler.init(SmbDirCrawler.java:38)
    at com.mprv.filecrawler.DirTask.run(DirTask.java:41)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
netShareEnum response status=50
netShareEnum response=NetShareEnumResponse[command=SMB_COM_TRANSACTION,received=false,errorCode=0,flags=0x0098,flags2=0xC801,signSeq=0,tid=1,pid=17493,uid=1,mid=5,wordCount=10,byteCount=5,totalParameterCount=4,totalDataCount=0,parameterCount=4,parameterOffset=56,parameterDisplacement=0,dataCount=0,dataOffset=60,dataDisplacement=0,setupCount=0,pad=1,pad1=0,status=50,converter=0,entriesReturned=16,totalAvailableEntries=0]
jcifs.smb.SmbException: 50
    at jcifs.smb.SmbFile.doNetShareEnum(SmbFile.java:1961)
    at jcifs.smb.SmbFile.doShareEnum(SmbFile.java:1855)
    at jcifs.smb.SmbFile.doEnum(SmbFile.java:1797)
    at jcifs.smb.SmbFile.listFiles(SmbFile.java:1773)
    at jcifs.smb.SmbFile.listFiles(SmbFile.java:1762)
    at com.mprv.filecrawler.cifs.SmbRootCrawler.listDirectories(SmbRootCrawler.java:32)
    at com.mprv.filecrawler.cifs.SmbDirCrawler.crawl(SmbDirCrawler.java:62)
    at com.mprv.filecrawler.cifs.SmbDirCrawler.init(SmbDirCrawler.java:38)
    at com.mprv.filecrawler.DirTask.run(DirTask.java:41)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

UPDATE: according to pcap files, it seems that in some point, when receiving a big amount of shares, the JCIFS stops asking for more packets (SmbComReadAndX) after a Dcerpc fragment.


Source: (StackOverflow)

How to collect CIFS audit logs from NETAPP

I'm trying to include Netapp CIFS audit log in any central log collector as Graylog or similars. I've being able to get the syslog but none of the Open Source collectors I've checked is able to parse the CIFS audit from NETAPP.

Anyone have something similar working? The aim is to gather all creation and deletion of files, currently within the Netapp appliance i can keep less than a week in evt format, relying on manual search :S.

Thanks!


Source: (StackOverflow)

Windows NFS user mapping issue when working with NetApp clustered ONTAP

I have an issue with user mapping while using NFS export from NetApp and trying to mount it on a windows using the NFS client feature.

I have a qtree exported from the NetApp using NFS and I installed the NFS client on Windows (via server manager - roles - file server). I am able to mount, read and write as anonymous user - the problem is in the user mapping.

I tried to add to the registry at HKLM\Software\Microsoft\ClientForNFS\CurrentVersion\Default the two DWOD values AnonymousUid and AnonymousGid and gave them the desired UID and GID in decimal form and restarted the service.

While this trick worked fine on an NFS export which I exported on my RHEL 6.3 and also on a 7 mode NetApp but it seems the thing doesn't work the same here.

Somehow when I used shownount -e on the RHEL or 7 mode it showed the exports and when I tried on the clustered ONTAP vserver it only shows the / (and even though the mount command completes successfully when writing the path)

Any suggestions?

Details: Client is windows server 2008 R2 x64 bit program (services for NFS) Server is NetApp clustered ONTAP 8.2.3p4

Edit: I also tried user-mapping at server side using both vserver name-mapping win-unix to index 1. And added a rule to the export-policy: 10.0.0.1 (I changed the IP for security reasons) User is to which anonymous users are mapped to: 1000

Any thoughts?


Source: (StackOverflow)