Showing posts with label Netapp Vfiler. Show all posts
Showing posts with label Netapp Vfiler. Show all posts

Wednesday, June 27, 2012

Netapp Vfiler tutorial


NetApp vFiler Tutorial



What is NetApp Vfiler:

Multi Store enables you to partition the storage and network resources of a single storage
 system so
 that it appears as multiple storage systems on the network.

Multi store is a optional software License its available in NetApp you need to buy this feature.


Benefit of Using Multistore:

1. Virtualization

2. Consolidation

3. Security

4. Disaster recovery and data migration



MultiStore for service providers and enterprises:
Service providers, such as ISPs and SSPs, can partition the resources of a storage 
system to create many vFiler units for client companies. Similarly, the information
 technology (IT) department  of an enterprise can create vFiler units for various departments,
 or customers, within the enterprise.
The administrator for each customer can manage and view files only on the assigned vFiler unit, 
not on other vFiler units that reside on the same storage system.



What is default Vfiler

MultiStore, Data ONTAP automatically creates a default vFiler unit on the hosting storage 
 system.The name of the default vFiler unit is vfiler0.

Initially, vfiler0 owns all the resources on the storage system. After you create additional 
vFiler units,vfiler0 owns the resources that are not owned by the vFiler units you have created.

You cant destroy default vfiler0.


Number of vFiler units allowed

You can have Maximum 65 Vfiler Unit on single storage system.

You can create 64 vfiler,65th is the Default vfiler vfiler0

Supported interfaces and protocols

Ethernet interfaces and the NFS, CIFS, iSCSI, HTTP, RSH, SSH, and FTP protocols are 
supported on vFiler units


To check the vfilers, 

FASSENTHIL> vfiler status

vfiler0 is the default one.




To create a vfiler, first down the network interface.

FASSENTHIL> ifconfig -a

ifconfig ns1 down








What an IPspace is :


An IPspace defines a distinct IP address space in which vFiler units can participate.
IP addresses defined for an IPspace are applicable only within that IPspace. A distinct routing table
 is maintained for each IPspace. No cross-IPspace traffic is routed.


Each IPspace has a unique loopback interface assigned to it. The loopback traffic of each IPspace
 is completely isolated from the other IPspaces.


To create an ipspace,

FASSENTHIL> ipspace create <ipspace name> interface name list


ipspace create vfiler1-ipspace ns1







To create vfiler,

vfiler create <vfilername>  -s <ipspace>  volumename

vfiler create vfiler-senthil -s vfiler1  /vol/vfvol



CIFS setup:


 To check the vfiler status.

FASSENTHIL>vfiler status ............. Now two vfilers are running.





To list ipspaces:

FASSENTHIL>ipspace list


Creating a qtree on a new vfiler.

qtree create /vol/vfvol/test1






Creating CIFS shares.

FASSENTHIL>cifs shares -add myshare /vol/vfvol/test1






To list the cifs shares.

FASSENTHIL> cifs shares






To switch between to vfilers console.

vfiler context <vfiler name>

FASSENTHIL> vfiler context vfiler-senthil

vfiler-senthil@fassenthil>





To access the cifs shares in windows client.

Click run and type \\10.0.0.122




Now you are able to access the two shares. The shares are in vfiler-senthil.




To check the cifs sessions.

FASSENTHIL>cifs sessions









CIFS shares in the vfiler0(Default vfiler0) Base storage system.




Accessing the \\10.0.0.121




Now you are accessing the vfiler0's cifs shares.



To stop the vfiler.

FASSENTHIL> vfiler stop vfiler-senthil


Check the vfiler status. Now the vfiler-senthil is stopped.





To start the vfiler:

FASSENTHIL> vfiler start vfiler-senthil

Check the status of the vfiler. Now it is running.




To remove the vfiler:

FASSENTHIL> vfiler stop vfiler-senthil

FASSENTHIL> ifconfig ns1 down

FASSENTHIL> vfiler destroy vfiler-senthil

Check the status of the vfiler.



The vfiler vfiler-senthil has removed.





Only default vfiler0 alone running.



Source:Remote infra blog

Sunday, June 24, 2012

Netapp CLI command set


# 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



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


Netapp Vfiler

Netapp Vfiler Rename and  re-IP a Filer


                        Re IP a vfiler Through CLI
STEP1 : # add the new first since you can't have a vfiler with no ip
             vfiler add vfilername -i newIP     
Step2 :  # remove the old IP and unbind it
            vfiler remove vfilername -i oldIP   
Step 3 : ifconfig the interface with the new IP.
      You will then need to ifconfig the interface with the IP you added... running ifconfig using the IP will bind that interface (single port, vif, vlan, alias, etc.) to the vFiler since the IP matches.  Add the ifconfig to the /etc/rc file in vfiler0 as well as the "vfiler run vfilername route add default" if needed.

You can also run "vfiler run vfilername setup -e interface:ip:subnet" after the vfiler add, but setup will wack several files (hosts, hosts.equiv, exports, etc.) inside the vFiler, so I recommend to just run the ifconfig to create the binding and edit /etc/rc of vfiler0.

                                Re-name Vfiler

Renaming a vFiler unit
Consider the following before renaming a  vFiler unit:
 Step1
   The new name should not exist on the storage system, or on the partnerstorage system in a cluster.Although Data ONTAP allows the storage system and its partner to havevFiler units with same names, for administration ease, Network Appliance recommends that you do not create vFiler units with the same name.
Step2
The vfiler rename command does not change the CIFS node name of thevFiler unit or affect any client connections that are active.
      The  vfiler rename command changes the name of the vfiler unit onlywithin Data ONTAP; it does not rebroadcast the new name to the CIFSdomain controllers or the NetBIOS nameservers because these protocolsmight be using a different name for the vFiler unit than Data ONTAP uses. If you need to change the name mapping in the CIFS domain controllers, run
CIFS setup for each of these protocols.
Step 3
Do not rename a vFiler unit while it is being migrated. Doing so will causethe migrate command on the remote system to fail.

           Renaming a vFilerunit
To rename a vFiler unit, complete the following step.
StepAction1
Enter the following command:
vfiler rename old_vfiler_name new_vfiler_name
Example:
The following example renames a vFiler unit namedvfiler1 to vfiler2:
vfiler rename vfiler1 vfiler2