netapp general commands

Upload: srivatsanece

Post on 04-Apr-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Netapp General Commands

    1/9

    General Commandssetup (Re-Run initial setup)

    halt (Reboots controller into bootrom)reboot (Reboots controller back to Data Ontap)

    sysconfig -a (System configuration and information)java netapp.cmds.jsh (limited freebsd cli)storage show disk (show physical information about disks)

    passwd (Change password for logged in user)sasadmin shelf (shows a graphical layout of your shelves with occupied disk

    slots)options trusted.hosts x.x.x.x or x.x.x.x/nn (hosts that are allowed telnet, http,

    https and ssh admin access. x.x.x.x = ip address, /nn is network bits)options trusted.hosts * (Allows all hosts to the above command)

    sysstat -s 5 (Displays operating statistics every 5 seconds i.e. CPU, NFS, CIFS,NET, DISK, etc)

    DiagnosticsPress DEL at boot up during memory test followed by boot_diags and select all

    (Diagnostic tests for a new install)priv set diags (Enter diagnostics CLI mode from the Ontap CLI)

    priv set (Return to normal CLI mode from diagnostics mode)

    Softwaresoftware list (Lists software in the /etc/software directory)

    software get http://x.x.x.x/8.0_e_image.zip 8.0_e_image.zip (Copy software fromhttp to software directory)

    software delete (Deletes software in the /etc/software directory)software update 8.0_e_image.zip -r (Install software. The -r prevents it rebootingafterwards)

    ACP (Alternate Control Path)options acp.enabled on (Turns on ACP)storage show acp -a (show ACP status)

    Root VolumeThe Root Volume can only be on a 32 bit aggregate if you want to create a 64 bit

    aggregate you must create a seperate aggregate.

    Aggregatesaggr create aggregate_name (Creates an Aggregate)

    aggr destroy aggregate_name (removes an Aggregate)aggr offline aggregate_name (takes an Aggregate offline)aggr online aggregate_name (bring an Aggregate online)

    aggr options aggregate_name root (makes an Aggregate root|Only use if yourRoot Aggregate is damanged)

  • 7/29/2019 Netapp General Commands

    2/9

    aggr status (shows status of all aggregates)aggr status aggregate_name (show status of a specific Aggregate)

    aggr show_space aggregate_name (shows specific aggregate spaceinformation)

    aggr options aggregate_name nosnap=on (Disable snapshot autocreation)

    aggr options aggregate_name raidsize=x (x being the number of drives in theRAID)snap reserve -A aggregate_name 0 (Set Aggregate snap reserve to 0% or any

    number you enter)snap list -A aggregate_name (Lists snapshots on specified aggregate)

    snap delete -A aggregate_name (Deletes a snapshot on a specified aggregate)snap sched -A aggregate_name x x x@x,x,x (Creates a snapshot shedule in

    weeks days hours@time ie 0 2 1@9 means no weekly snaps, 2 daily, 1 hourly @9am)

    Volumes

    vol create volume_name (Creates a volume)vol autosize volume_name (Shows autosize settings for a given volume)vol autosize volume_name on|off (Turns Volume autosize on or off)

    vol options volume_name (Lists volume options)vol size volume_name + size k|m|g|t(increase volume size by KB, MB, GB or

    TB)vol status -f (lists broken or failed disks)

    Qtreesqtree create/vol/volume_name/qtree_name (Create a qtree within a volume)

    qtree security /vol/volume_name/qtree_name unix|ntfs|mixed (Change security

    settings of a qtree)qtree stats qtree_name (Shows CIFS or NFS ops/sec for a given qtree)qtree status (Displays all your Qtrees)

    Snapshotssnap create volume_namesnapshot_name (create a snapshot)

    snap list volume_name (List snapshots for a volume)snap delete volume_name snapshot_name (delete a snapshot on a volume)

    snap delete -a volume_name (Deletes all snapshots for a volume)snap autodelete volume_name show (Shows snapshot autodelete settings for a

    volume)snap restore -s snapshot_name volume_name (Restores a snapshot on the

    specified volume name)snap sched volume_name weeks days hours@time (Creates a snapshot

    schedule on a volume i.e. snap sched volume 4 5 1@07 Weekly Snapshots arecreated at midnight on each Sunday, Daily snapshots are created each day

    except Sunday at midnight)snap delta volume_name (Shows delta changes between snapshots for a given

    volume)

  • 7/29/2019 Netapp General Commands

    3/9

    snap reserve volume_name (Shows the snap reserve for a given volume)snap reclaimable volume_name snapshot_name (Shows the amount of space

    reclaimable if you remove this snapshot from the volume)options cifs.show_snapshot on (Allows snapshot directory to be browse-able via

    CIFS)

    options nfs.hide_snapshot off (Allows snapshot directory to be visible via NFS)

    SnapMirroroptions snapmirror.enable on (turns on SnapMirror. Replace on with off to toggle)rdfile /etc/snapmirror.allow (Performed on the Source Filer. You should see you

    destination filers in this file.)wrfile /etc/snapmirror.allow (Performed on the Source Filer. Overwrites the file

    with the specified destination filer name and ip address)vol restrict volume_name (Performed on the Destination. Makes the destination

    volume read only which must be done for volume based replication. Dont use forQtree based replication)

    snapmirror initialize -S srcfiler:source_volume dstfiler:destination_volume(Performed on the destination. This is for full volume mirror. For examplesnapmirror initialize -S filer1:vol1 filer2:vol2)

    snapmirror initialize -S srcfiler:/vol/vol1/qtree dstfiler:/vol/vol1/qtree (Performedon the destination. Performs the same as the command above but for Qtrees

    only)snapmirror initialize -S srcfiler/vol/vol1/- dstfiler:/vol/vol1/qtree (Performed on thedestination. Performs volume to qtree replication. Includes all luns, exports on

    the source volume)snapmirror status (Shows the status of snapmirror and replicated volumes or

    qtrees)

    snapmirror status -l (Shows much more detail that the command above, i.e.snapshot name, bytes transferred, progress, etc)snapmirror quiesce volume_name (Performed on Destination. Pauses the

    SnapMirror Replication. If you are removing the snapmirror relationship this is thefirst step.)

    snapmirror break volume_name (Performed on Destination. Breaks ordisengages the SnapMirror Replication. If you are removing the snapmirror

    relationship this is the second step followed by deleting the snapshot)snapmirror resync volume_name (Performed on Destination. When data is out ofdate, for example working off DR site and wanting to resync back to primary, only

    performed when SnapMirror relationship is broken)snapmirror update -S srcfiler:volume_name dstfiler:volume_name (Performed on

    Destination. Forces a new snapshot on the source and performs a replication,only if an initial replication baseline has been already done)

    snapmirror release volume_name dstfiler:volume_name (Performed onDestination. Removes a snapmirror destination)

    /etc/snapmirror.conf (edit or wrfile this file on the destination filer or vfiler to enterin a snapmirror schedule. i.e. srcfiler:vol1 dstfiler:vol1 15 * * * This will replicateevery 15 minutes. Each * represents a value. Starting from right to left you have

  • 7/29/2019 Netapp General Commands

    4/9

    day of week, month, day of month, hour minute. Minute 0-59, hours 0-23, day-of-month 1-31, day-of-week 0 for Sunday 6 Saturday) Each value can only be a

    number.)/vol/vfiler_vol/etc/snapmirror.conf (read or write this file for snapmirror

    configurations on a vfiler. vfiler_vol being the first volume with the /etc in the

    vfiler)priv set diag followed by snapmirror break -h followed by priv set. (If forsome reason you snapmirror relationship has been orphaned, meaning it doesnt

    exist in snapmirror status on the source but does exist on the destination, youcan use these three commands to force the destination to become read/write.You can then do snap list and find the baseline snapshot for the destination.

    Followed by snap delete of the baseline snapshot. This will remove thesnapmirror relationship if all else fails. Lastly dont forget to remove the entry

    from snapmirror.conf)

    Cluster

    cf enable (enable cluster)cf disable (disable cluster)cf takeover (take over resources from other controller)

    cf giveback (give back controller resources after a take over)

    vFiler Multistorevfiler limit (Performed on the host to see what the limit of vfilers is)

    vfiler limit 16 (Performed on the host to change the limit of vfilers to 16 or anynumber you specify. Check the documentation for Memory Requirements before

    doing this)vfiler status (Displays the status of the vfiler i.e. running or stopped)

    vfiler status -r (On the host system. Shows which volumes are running on eachvfiler)vfiler rename old_vfiler_name new_vfiler_name (Renames a vfiler)

    vfiler run vfiler_name setup (Runs the vfiler setup wizard)vfiler run vfiler_name cifs setup (Runs the cifs setup wizard for a vfiler)

    ipspace create ipspacename (Creates an ipspace needed when 2 or morevfilers use the same network subnets)

    ipspace list (Lists the available ipspaces)ipspace assign ipspacename interface_name (Assigns the interface to an

    ipspace.)ipspace destroy ipspace_name (Removes/Deletes an ipspace)

    vfiler create vfiler_name -s ipspace_name -i x.x.x.x /vol/volume_name orqtree_name (Creates a vfiler name with ip address x.x.x.x and assigns the

    volume or qtree to the vfiler. The -s is optional)NOTE: Creating a qtree as thebase vfiler does not allow you to enable snapmirror. You must create the base as

    a volume!vfiler add vfiler_name -i x.x.x.x /vol/volume_name (Adds an ip address and

    additional volume (can be qtree) to an existing vfiler name)vfiler remove vfiler_name -i x.x.x.x /vol/volume_name (Removes an IP address

  • 7/29/2019 Netapp General Commands

    5/9

    and volume from an existing vfiler)vfiler destroy vfiler_name (Deletes/removes a vfiler)

    vfiler rename vfiler_name_oldvfiler_name_new(Renames a vfiler from old nameto new name)

    vfiler context vfiler_name (Changes CLI into the context of the vfiler name)

    vfiler allow vfiler_name proto=cifs proto=nfs proto=iscsi (Allows the followingprotocols cifs, nfs and iscsi. Disallows rsh, ssh, ftp and http)vfiler stop vfiler_name (Stops a vfiler instance)vfiler start vfiler_name (Starts a vfiler instance)

    vfiler run vfiler_name route add default x.x.x.x 1 (Adds a default route to a vfiler.Performed from vfiler0)

    route add x.x.x.x/x x.x.x.x 1 (Adds a route in a vfiler)

    To add extra vlans to a vfiler you must do the following:Check the ip space that the vfiler is using by typing ipspace listCreate the vlan interface on the host i.e. vif0-360 for vlan 360

    Assign the interface to the ip space of the vfiler i.e. ipspace assignipspace_name vif0-360Add the ip address you wish to use on the vlan interface to the vfiler i.e. vfiler add

    vfiler_name -i 192.168.1.1Once the vfiler has this ip address in its config we can add it onto the interface

    i.e. ifconfig vif0-360 192.168.1.1 netmask 255.255.255.0

    Autosupportoptions autosupport.support.enable on (Turns Autosupport on)options autosupport.support.enable off (Turns Autosupport off)

    autosupport.doit description (creates an autosupport alert with a user defined

    description)

    Hot SparesAny functioning disk that is not assigned to an aggregate but is assigned to a

    controller functions as a hot spare diskdisk show

    vol status -r (displays which disks are allocated as spare)

    Disksdisk show (Show disk information)

    disk show -n (Show unowned disks)disk assign 0d.02.0-s unowned (Changes ownership from owned to unowned or

    to other cluster member)disk assign 0d.02.0(assigns the disk to the controller you perform the command

    on)options disk.auto_assign off (turns auto assign of unowned disks to controllers to

    off)options disk.auto_assign on (turns auto assign of unowned disks to controllers to

    on)

  • 7/29/2019 Netapp General Commands

    6/9

    storage show disk -p (displays primary, secondary port, shelf and bay in a metrocluster)

    Lunslun setup (runs the cli lun setup wizard)

    lun create -s 10g -t windows_2008 -o noreserve /vol/vol1/lun1 (creates a lun of10GB with type Windows 2008, sets no reservation and places it in the followingvolume or qtree)

    lun offline lun_path (takes a lun offline)lun online lun_path (brings a lun online)

    lun show -v (Verbose listing of luns)lun move/lun_path_source /lun_path_destination (Move lun from source to

    destination)lun resize -flun_path +|- new_size k|m|g|t(Resizes a lun by adding space (+) or

    subtracting space (-) Note: a lun can only ever grow 10x its original size)lun map /vol/vol1/lun1 igroup_name (Maps lun1 to the igroup_name)

    Fiber FCPfcadmin config -t taget 0a (Changes adapter from initiator to target)

    fcadmin config (lists adapter state)fcadmin start (Start the FCP service)fcadmin stop (Stop the FCP service)

    fcp show adapters (Displays adapter type, status, FC Nodename, FC Portnameand slot number)

    fcp nodename (Displays fiber channel nodename)fcp show initiators (Show fiber channel initiators)

    fcp wwpn-alias set alias_name (Set a fiber channel alias name for the controller)

    fcp wwpn-alias remove -a alias_name (Remove a fiber channel alias name forthe controller)igroup show (Displays initiator groups with WWNs)

    iSCSIiscsi start (Start the iscsi service)iscsi stop (Stop the iscsi server)

    iscsi status (Show whether iscsi server is running or not running)iscsi interface show (Show which interfaces are enabled or disabled for iscsi)

    iscsi interface enable interface_name (Enable an interface for iscsi)iscsi interface disableinterface_name (Disable an interface for iscsi)

    iscsi nodename (Display the controllers iscsi nodename)igroup show (Displays iSCSI initiators)

    igroup create -i -t vmware sqlcluster_igroup (Creates an Initiator Group calledsqlcluster_igroup with OS type vmware)

    igroup add sqlcluster_igroup iqn.1991-05.com.microsoft:sqlcluster1.vmlab.local(Assigns the following iscsi initiator to the sqlcluster_igroup. This can also be

    FCP addresses)

  • 7/29/2019 Netapp General Commands

    7/9

    Cifscifs setup (cifs setup wizard)

    cifs terminate (terminate the cifs service)cifs restart (restarts cifs)

    cifs shares (displays cifs shares)

    cifs status (show status of cifs)cifs lookup SID|name (Either displays the SID if you type in the name or name ifyou type in the SID)

    cifs sessions (Show you current cifs sessions)cifs sessions -s username (Shows the current session for a user)

    cifs broadbast -v volume_name message (Broadcast a message to all usersconnected to volume_name)

    cifs shares -add share_name /vol/volume_name/qtree_name (Create a cifs shareon a specific volume or qtree)

    cifs shares -delete share_name (Deletes a share name)cifs shares share_name (Displays full path and permissions of the share)

    cifs access share_name -g user_rights (Grants specific user rights to the share)cifs access share_nameuser_name permission (Grants a specific permission toa user for a share. Permissions = Full Control, Change, Read, No Access)

    cifs domain info (Lists information about the filers connected Windows Domain)cifs testdc ip_address (Test a specific Windows Domain Controller for

    connectivity)cifs prefdc (Displays configured preferred Windows Domain Controllers)

    cifs prefdc add domain address_list(Adds a preferred dc for a specific domaini.e. cifs prefdc add netapplab.local 10.10.10.1)

    cifs prefdc delete domain (Delete a preferred Windows Domain Controllers)cifs gpresult (Displays which Windows Group Policies apply to this filer)

    cifs gpupdate (Forces an update of Windows Group Policy)cifs top (Performance data for cifs. cifs.per_client_stats.enable option must be onto use this feature)

    vscan on (Turns virus scanning on)vscan off (Turns virus scanning off)vscan reset (Resets virus scanning)

    NFSnfs setup (Runs the NFS setup wizard)

    /etc/export (Enter in your export information here and save the file. Then proceedwith exportfs -a to update memory buffer)

    exportfs (Displays current exports)exportfs -ppath (Adds exports to the /etc/exports file)

    exportfs -uav (Unexports all current exports)exportfs -upath (Unexports a specific export from memory)

    exportfs -zpath (Unexports a specific export and also removes it from/etc/exports)

    exportfs -a (Updates memory buffer with contents in /etc/exports)nfsstat -d (Displays NFS statistics)

  • 7/29/2019 Netapp General Commands

    8/9

    HTTP Adminoptions httpd.admin.enable on (Turns on http web admin, na_admin)

    options httpd.admin.access host=x.x.x.x,x.x.x.x (Allows admin access for specifichosts separated by a comma)

    SIS (Deduplication)sis status (Show SIS status)sis config (Show SIS config)

    sis on/vol/vol1 (Turn on deduplication on vol1)sis config -s mon-fri@23/vol/vol1 (Configure deduplication to run every monday

    Friday at 11pm on vol1)sis start -s/vol/vol1 (Run deduplication manually on vol1)

    sis status -l/vol/vol1 (Display deduplication status on vol1)df -s vol1 (View space savings with deduplication)

    sis stop/vol/vol1 (Stop deduplication on vol1)sis off/vol/vol1 (Disables deduplication on vol1)

    User Accountsuseradmin user add user_name -g group_name (Adds a user to a group)

    useradmin user list (Lists current users)useradmin user list user_name (List specific user information)

    useradmin group list (Lists current groups)useradmin group delete group_name (Deletes a specific group name)

    useradmin group modify group_name -g new_group_name (Modify group name)useradmin user delete user_name (Delete a specific user)

    useradmin user modify user_name -g group_name (Adds a user to a group)useradmin domain user add user_name -g group_name (Adds a Windows

    Domain user to a local group)useradmin domain user list -g group_name (List Windows Domain users in aspecific group)

    DNSdns flush (Flushes the DNS cache)

    /etc/resolv.conf (edit this file to change your dns servers)

    NDMPDndmpd status (check status)

    ndmpd on|off (turns ndmpd on or off)ndmpd version (displays version information)

    ndmpd version 4 (set ndmpd version to 4)options ndmpd (Display ndmpd options)

    Reading and Writing Files (Deduplication)rdfilepath/file (Reads a file)

    wrfilepath/file (Writes to a file. Warning this method overwrites the file. Makesure you copy out original contents if you wish to keep it. If you havent used this

  • 7/29/2019 Netapp General Commands

    9/9

    before try on the simulator.)wrfile -apath/file (Writes to a file by appending the changes)

    Logging/etc/messages (All logging is for the system is stored here)

    VIFvif status (Displays the status of VIF interfaces)

    vif create lacp vif0 -b ip e0a e0b e0c e0d (Create a vif interface named VIF0using lacp and a load balancing method of IP, bundled with interface e0a, e0b,

    e0c, e0d)vif add vif0 e0a (Adds a down interface into an existing VIF)

    Networkifconfig vif0-10 x.x.x.x netmask x.x.x.x partner vif0-10 (Sets IP information on the

    interface named vif0-10 with a partner interface of vif0-10)

    Disclaimer:All the tutorials included on this site are performed in a lab environment to

    simulate a real world production scenario. As everything is done to provide themost accurate steps to date, we take no responsibility if you implement any of

    these steps in a production environment.