ONTAP Discussions

Data ONTAP Basic Command Please?

MAXSVEN2001
196,538 Views

Hi,

I'm fairly new to Data ONTAP OS and I have been playing around with the sims for a couple of months.

I had a look at the "Manual Page Reference, Volume 1 and 2" but there are basic linux style commands that I still can't find...

baisically, I'm looking for commands to :

1- "cd" change directory

2- "ls" ls files/directories

3- "cp" copy files from one directory to another

4- "mkdir" make new directory.

5- "ps" list running processes

6- "kill" kill a process.

7- piping and "grep" for a string. ex: ps | grep -i "string"

8- pwd "print workjing directory".

if someone can just include the Data ONTAP command for 1 to 8 I'd much appreciate it.

Thanks.

Max.

1 ACCEPTED SOLUTION

SNETAPPUSER
196,405 Views

Those commands are available in advance mode & in diag mode. However, you should not use those mode unless it is necessary. Those modes ususally use by NetApp technical support team or NetApp PSE.

Antway, if you wanna try out (in sim may be), type 'priv set advanced' to go to advanved mode. There u can do ls, mv etc. Type 'useradmin diaguser unlock' to unlock diag user then type 'useradmin diaguser password' to set a password to diag user. Then type 'systemshell'. Username 'diag' password is your diag password.

DONT GO TO DIAG MODE IF YOU DONT KNOW WHAT YOU ARE DOING

View solution in original post

14 REPLIES 14

vladimirzhigulin
196,227 Views

Hi,

Please have a look at the file I've attached, it helped me a lot when started with OnTAP.

Vladimir

MAXSVEN2001
196,227 Views

very helpful thanks a heap!

however, it does not contain any commands for what i'm after...

AGUMADAVALLI
196,226 Views

Few commands you specified will work using the following commands:

priv set advanced

java netapp.cmds.jsh - Which take you a prompt where you can run the linux commands.

thank you,

AK G

MAXSVEN2001
196,228 Views

this is exactly what I needed in terms of the commands however, it looks like I won't be able to use this prompt and still run normal ONTAP commands (ex: sysconfig)...

would you know what commands are equivalent to the ones I'm after in the normal or priv set ONTAP prompts?

vperumal
196,230 Views

  This post contains the list of commands that will be most used
and will come handy when managing or monitoring or troubleshooting a Netapp
filer.

  • sysconfig -a : shows hardware
    configuration with more verbose information
  • sysconfig -d :
    shows information of the disk attached to the filer
  • version : shows the
    netapp Ontap OS version.
  • uptime : shows the
    filer uptime
  • dns info : this
    shows the dns resolvers, the no of hits and misses and other info
  • nis info : this
    shows the nis domain name, yp servers etc.
  • rdfile : Like
    "cat" in Linux, used to read contents of text files/
  • wrfile :
    Creates/Overwrites a file. Similar to "cat > filename" in Linux
  • aggr status : Shows
    the aggregate status
  • aggr status -r :
    Shows the raid configuration, reconstruction information of the disks in filer
  • aggr show_space :
    Shows the disk usage of the aggreate, WAFL reserve, overheads etc.
  • vol status : Shows
    the volume information
  • vol status -s :
    Displays the spare disks on the filer
  • vol status -f :
    Displays the failed disks on the filer
  • vol status -r :
    Shows the raid configuration, reconstruction information of the disks
  • df -h : Displays
    volume disk usage
  • df -i : Shows the inode
    counts of all the volumes
  • df -Ah : Shows
    "df" information of the aggregate
  • license :
    Displays/add/removes license on a netapp filer
  • maxfiles : Displays
    and adds more inodes to a volume
  • aggr create :
    Creates aggregate
  • vol create
    <volname> <aggrname> <size> : Creates volume in an aggregate
  • vol offline
    <volname> : Offlines a volume
  • vol online
    <volname> : Onlines a volume
  • vol destroy
    <volname> : Destroys and removes an volume
  • vol size
    <volname> [+|-]<size> : Resize a volume in netapp filer
  • vol options : Displays/Changes
    volume options in a netapp filer
  • qtree create
    <qtree-path> : Creates qtree
  • qtree status :
    Displays the status of qtrees
  • quota on : Enables
    quota on a netapp filer
  • quota off :
    Disables quota
  • quota resize :
    Resizes quota
  • quota report :
    Reports the quota and usage
  • snap list :
    Displays all snapshots on a volume
  • snap create
    <volname> <snapname> : Create snapshot
  • snap sched
    <volname> <schedule> : Schedule snapshot creation
  • snap reserve
    <volname> <percentage> : Display/set snapshot reserve space in volume
  • /etc/exports : File
    that manages the NFS exports
  • rdfile /etc/exports
    : Read the NFS exports file
  • wrfile /etc/exports
    : Write to NFS exports file
  • exportfs -a :
    Exports all the filesystems listed in /etc/exports
  • cifs setup : Setup
    cifs
  • cifs shares : Create/displays
    cifs shares
  • cifs access :
    Changes access of cifs shares
  • lun create :
    Creates iscsi or fcp luns on a netapp filer
  • lun map : Maps lun
    to an igroup
  • lun show : Show all
    the luns on a filer
  • igroup create :
    Creates netapp igroup
  • lun stats : Show lun
    I/O statistics
  • disk show : Shows
    all the disk on the filer
  • disk zero spares :
    Zeros the spare disks
  • disk_fw_update :
    Upgrades the disk firmware on all disks
  • options :
    Display/Set options on netapp filer
  • options nfs :
    Display/Set NFS options
  • options timed :
    Display/Set NTP options on netapp.
  • options autosupport
    : Display/Set autosupport options
  • options cifs :
    Display/Set cifs options
  • options tcp :
    Display/Set TCP options
  • options net :
    Display/Set network options
  • ndmpcopy
    <src-path> <dst-path> : Initiates ndmpcopy
  • ndmpd status :
    Displays status of ndmpd
  • ndmpd killall :
    Terminates all the ndmpd processes.
  • ifconfig :
    Displays/Sets IP address on a network/vif interface
  • vif create :
    Creates a VIF (bonding/trunking/teaming)
  • vif status :
    Displays status of a vif
  • netstat : Displays
    network statistics
  • sysstat -us 1 : begins a 1
    second sample of the filer's current utilization (crtl - c to end)
  • nfsstat : Shows nfs
    statistics
  • nfsstat -l :
    Displays nfs stats per client
  • nfs_hist : Displays
    nfs historgram
  • statit : beings/ends a
    performance workload sampling [-b starts / -e ends]
  • stats : Displays
    stats for every counter on netapp. Read stats man page for more info
  • ifstat : Displays
    Network interface stats
  • qtree stats :
    displays I/O stats of qtree
  • environment : display
    environment status on shelves and chassis of the filer
  • storage show
    <disk|shelf|adapter> : Shows storage component details
  • snapmirror
    intialize : Initialize a snapmirror relation
  • snapmirror update :
    Manually Update snapmirror relation
  • snapmirror resync :
    Resyns a broken snapmirror
  • snapmirror quiesce
    : Quiesces a snapmirror bond
  • snapmirror break :
    Breakes a snapmirror relation
  • snapmirror abort :
    Abort a running snapmirror
  • snapmirror status :
    Shows snapmirror status
  • lock status -h :
    Displays locks held by filer
  • sm_mon : Manage the
    locks
  • storage download
    shelf : Installs the shelf firmware
  • software get :
    Download the Netapp OS software
  • software install :
    Installs OS
  • download : Updates
    the installed OS
  • cf status :
    Displays cluster status
  • cf takeover : Takes
    over the cluster partner
  • cf giveback : Gives
    back control to the cluster partner
  • reboot : Reboots a
    filer

Pocket guide for netapp commands

This post contains the list of commands that will be most used
and will come handy when managing or monitoring or troubleshooting a Netapp
filer.

  • sysconfig -a : shows hardware
    configuration with more verbose information
  • sysconfig -d :
    shows information of the disk attached to the filer
  • version : shows the
    netapp Ontap OS version.
  • uptime : shows the
    filer uptime
  • dns info : this
    shows the dns resolvers, the no of hits and misses and other info
  • nis info : this
    shows the nis domain name, yp servers etc.
  • rdfile : Like
    "cat" in Linux, used to read contents of text files/
  • wrfile :
    Creates/Overwrites a file. Similar to "cat > filename" in Linux
  • aggr status : Shows
    the aggregate status
  • aggr status -r :
    Shows the raid configuration, reconstruction information of the disks in filer
  • aggr show_space :
    Shows the disk usage of the aggreate, WAFL reserve, overheads etc.
  • vol status : Shows
    the volume information
  • vol status -s :
    Displays the spare disks on the filer
  • vol status -f :
    Displays the failed disks on the filer
  • vol status -r :
    Shows the raid configuration, reconstruction information of the disks
  • df -h : Displays
    volume disk usage
  • df -i : Shows the inode
    counts of all the volumes
  • df -Ah : Shows
    "df" information of the aggregate
  • license :
    Displays/add/removes license on a netapp filer
  • maxfiles : Displays
    and adds more inodes to a volume
  • aggr create :
    Creates aggregate
  • vol create
    <volname> <aggrname> <size> : Creates volume in an aggregate
  • vol offline
    <volname> : Offlines a volume
  • vol online
    <volname> : Onlines a volume
  • vol destroy
    <volname> : Destroys and removes an volume
  • vol size
    <volname> [+|-]<size> : Resize a volume in netapp filer
  • vol options : Displays/Changes
    volume options in a netapp filer
  • qtree create
    <qtree-path> : Creates qtree
  • qtree status :
    Displays the status of qtrees
  • quota on : Enables
    quota on a netapp filer
  • quota off :
    Disables quota
  • quota resize :
    Resizes quota
  • quota report :
    Reports the quota and usage
  • snap list :
    Displays all snapshots on a volume
  • snap create
    <volname> <snapname> : Create snapshot
  • snap sched
    <volname> <schedule> : Schedule snapshot creation
  • snap reserve
    <volname> <percentage> : Display/set snapshot reserve space in volume
  • /etc/exports : File
    that manages the NFS exports
  • rdfile /etc/exports
    : Read the NFS exports file
  • wrfile /etc/exports
    : Write to NFS exports file
  • exportfs -a :
    Exports all the filesystems listed in /etc/exports
  • cifs setup : Setup
    cifs
  • cifs shares : Create/displays
    cifs shares
  • cifs access :
    Changes access of cifs shares
  • lun create :
    Creates iscsi or fcp luns on a netapp filer
  • lun map : Maps lun
    to an igroup
  • lun show : Show all
    the luns on a filer
  • igroup create :
    Creates netapp igroup
  • lun stats : Show lun
    I/O statistics
  • disk show : Shows
    all the disk on the filer
  • disk zero spares :
    Zeros the spare disks
  • disk_fw_update :
    Upgrades the disk firmware on all disks
  • options :
    Display/Set options on netapp filer
  • options nfs :
    Display/Set NFS options
  • options timed :
    Display/Set NTP options on netapp.
  • options autosupport
    : Display/Set autosupport options
  • options cifs :
    Display/Set cifs options
  • options tcp :
    Display/Set TCP options
  • options net :
    Display/Set network options
  • ndmpcopy
    <src-path> <dst-path> : Initiates ndmpcopy
  • ndmpd status :
    Displays status of ndmpd
  • ndmpd killall :
    Terminates all the ndmpd processes.
  • ifconfig :
    Displays/Sets IP address on a network/vif interface
  • vif create :
    Creates a VIF (bonding/trunking/teaming)
  • vif status :
    Displays status of a vif
  • netstat : Displays
    network statistics
  • sysstat -us 1 : begins a 1
    second sample of the filer's current utilization (crtl - c to end)
  • nfsstat : Shows nfs
    statistics
  • nfsstat -l :
    Displays nfs stats per client
  • nfs_hist : Displays
    nfs historgram
  • statit : beings/ends a
    performance workload sampling [-b starts / -e ends]
  • stats : Displays
    stats for every counter on netapp. Read stats man page for more info
  • ifstat : Displays
    Network interface stats
  • qtree stats :
    displays I/O stats of qtree
  • environment : display
    environment status on shelves and chassis of the filer
  • storage show
    <disk|shelf|adapter> : Shows storage component details
  • snapmirror
    intialize : Initialize a snapmirror relation
  • snapmirror update :
    Manually Update snapmirror relation
  • snapmirror resync :
    Resyns a broken snapmirror
  • snapmirror quiesce
    : Quiesces a snapmirror bond
  • snapmirror break :
    Breakes a snapmirror relation
  • snapmirror abort :
    Abort a running snapmirror
  • snapmirror status :
    Shows snapmirror status
  • lock status -h :
    Displays locks held by filer
  • sm_mon : Manage the
    locks
  • storage download
    shelf : Installs the shelf firmware
  • software get :
    Download the Netapp OS software
  • software install :
    Installs OS
  • download : Updates
    the installed OS
  • cf status :
    Displays cluster status
  • cf takeover : Takes
    over the cluster partner
  • cf giveback : Gives
    back control to the cluster partner
  • reboot : Reboots a
    filer

MAXSVEN2001
196,230 Views

Thanks for this very handy answer...

still however no mention of any command that would achieve what i'm looking for...

46,323 Views

Dear Sir,

 

This is Vinit, Very good list of net app commands.

Sir, want to know how do we use net app simulator, can you provide any guide for a fresher.

 

Thanks & Regards,

Vinit pandey

 

chidam
39,367 Views

Its very good sir !!

SNETAPPUSER
196,406 Views

Those commands are available in advance mode & in diag mode. However, you should not use those mode unless it is necessary. Those modes ususally use by NetApp technical support team or NetApp PSE.

Antway, if you wanna try out (in sim may be), type 'priv set advanced' to go to advanved mode. There u can do ls, mv etc. Type 'useradmin diaguser unlock' to unlock diag user then type 'useradmin diaguser password' to set a password to diag user. Then type 'systemshell'. Username 'diag' password is your diag password.

DONT GO TO DIAG MODE IF YOU DONT KNOW WHAT YOU ARE DOING

MAXSVEN2001
196,229 Views

this answers my question... thanks a heap!

it looks like in this mode after i login with the diag user, the normal ONTAP management commands do not work... such as "vol", "sysconfig"... etc..

i wish i could find a document that would tell me the set of commands that you can run in each different mode..

would you know how I can pipe an output of a comman to a txt file in "normal mode"?

for example, i need to run "sysconfig -r" and save the output to a txt file that I can then CIFS to and read...

SNETAPPUSER
196,229 Views

Your best bet will be non-interactive SSH / RSH session from *nix (linux, unix etc.) machine. For an example,

helios@athena ~

$ ssh root@10.1.1.60 vol status

root@10.1.1.60's password:

         Volume State           Status            Options

           vol0 online          raid0, flex       root, no_atime_update=on,

                                                  create_ucode=on,

                                                  convert_ucode=on,

                                                  maxdirsize=2621

helios@athena ~

Above is prompting for password because I am not using public key authentication. However, if you do so then, it won't ask for the password; quite helpful in scripts.

Just wanna add another example which uses RSH instead of SSH (again quite handy in scripts)

helios@athena ~

$ rsh -l root:your-password-here 10.1.1.70 aggr status

           Aggr State           Status            Options

          aggr0 online          raid0, aggr       root

helios@athena ~

Hope this helps..

Message was edited by: Sajith Rangama

sat
40,553 Views

in diag systemshell mkdir is not working

mkdir: /etc/software: Read-only file system

DRUMDUDESAN
46,322 Views

Hi,

It would be great to have the ability in Normal Mode or at least in Advanced Mode to have tail, grep and pipe to file for troubleshooting and checking the logs.

I think rdfile should have the ability to perform these actions.

filer01>rdfile tail -f /etc/messages

filer01>rdfile /etc/messages |grep error

Unless I am missing pages in the ONTAP manual it is not a feature.

Cheers

Jeff

peter_lehmann
46,322 Views

piping, greping ... I always do this from the system I am administering the NetApp from (unix or windows)...

Like   already mentioned in his answer, there is a secure option (SSH) or insecure (RSH). With windows, just use plink.exe and then | findstr to get what you are looking for.

Hope this helps.

Peter

PS I would NEVER use the diaguser/diagmode to do this stuff...

Public