Recent Posts

Tuesday, 10 May 2016

Netapp Filer Tutorial


     The NetApp Filer also known as NetApp Fabric-Attached Storage (FAS), is a data storage device, it can act as a SAN or as a NAS, it serves storage over a network using either file-based or block-based protocols. It uses an operating systems called Data ONTAP (based on FreeBSD).
File-Based Protocol     : NFS, CIFS, FTP, TFTP, HTTP 
Block-Based Protocol  : Fibre Channel (FC), Fibre channel over Ethernet (FCoE), Internet SCSI (iSCSI) 
1. NFS (Network File System) 
    NFS is the Network File System for UNIX and Linux operating systems. It allows files to be shared transparently between servers, desktops, laptops etc.
  NFS allows network systems (clients) to access shared files and directories that are stored and administered centrally from a storage system.
     It is a client/server application that allows a user to view, store and update files on a remote computer as though they were on their own computer.

2. CIFS (Common Internet File System)
CIFS is the Common Internet File System used by Windows operating systems for file sharing. CIFS uses the client/server programming model.
A client program makes a request of a server program (usually in another computer) for access to a file or to pass a message to a program that runs in the server computer. The server takes the requested action and returns a response. CIFS uses the TCP/IP protocol.

3. FTP (File Transfer Protocol)
     The File Transfer Protocol (FTP) is a standard network protocol used to transfer computer files from one host to another host over a TCP- based network, such as the Internet. FTP uses the Internets TCP/IP protocols to enable data transfer.
     FTP is most commonly used to download file from a server using the Internet or to upload a file to a server (e.g., uploading a Web page file to a server).

4. TFTP (Trivial File Transfer Protocol)
     Trivial File Transfer Protocol (TFTP) is a simple, lock-step, File Transfer Protocol which allows Client to get from or put a file onto a remote Host (network). TFTP uses the User Datagram Protocol (UDP) and provides no security features.
Differences between FTP and TFTP
1. FTP is a user-based password network protocol used to transfer data across a network; TFTP is a network protocol that does not have any authentication processes.
2. FTP may be accessed anonymously, but the amount of information transferred is limited; TFTP has no encryption process in place, and can only successfully transfer files that are not larger than one terabyte.

5. HTTP (Hyper Text Transfer Protocol)
     HTTP is the underlying protocol used by the World Wide Web. HTTP defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands.
  For example, when you enter a URL in your browser, this actually sends an HTTP command to the Web server directing it to fetch and transmit the requested Web page.

6. FC (Fibre Channel)
     Fibre Channel, or FC, is a high-speed network technology (commonly running at 2-, 4-, 8- and 16-gigabit per second rates) primarily used to connect computer data storage.
  Fibre Channel is a widely used protocol for high-speed communication to the storage device. The Fibre Channel interface provides gigabit network speed. It provides a serial data transmission that operates over copper wire and optical fiber. The latest version of the FC interface (16FC) allows transmission of data up to 16Gb/s.

7. FcoE (Fibre Channel over Ethernet)
     Fibre Channel over Ethernet (FCoE) is a computer network technology that encapsulates Fibre Channel frames over Ethernet networks. This allows Fibre Channel to use 10 Gigabit Ethernet networks (or higher speeds) while preserving the Fibre Channel protocol.

8. iSCSI (Internet Small Computer System Interface)
     Pronounced eye skuzzy. Short for Internet SCSI, an IP-based standard for linking data storage devices over a network and transferring data by carrying SCSI commands over IP networks. iSCSI supports a Gigabit Ethernet interface at the physical layer, which allows systems supporting iSCSI interfaces to connect directly to standard Gigabit Ethernet switches and/or IP routers.
     When an operating system receives a request it generates the SCSI command and then sends an IP packet over an Ethernet connection. At the receiving end, the SCSI commands are separated from the request, and the SCSI commands and data are sent to the SCSI controller and then to the SCSI storage device. iSCSI will also return a response to the request using the same protocol. iSCSI is important to SAN technology because it enables a SAN to be deployed in a LAN, WAN or MAN.

NetApp Filers can offer the following
  • Supports SAN, NAS, FC, SATA, iSCSI, FCoE and Ethernet all on the same platform
  • Supports either SATA, FC and SAS disk drives
  • Supports block protocols such as iSCSI, Fibre Channel and AoE
  • Supports file protocols such as NFS, CIFS , FTP, TFTP and HTTP
  • High availability
  • Easy Management
  • Scalable
     The most common NetApp configuration consists of a filer (also known as a controller or head node) and disk enclosures (also known as shelves), the disk enclosures are connected by Fibre Channel or parallel/serial ATA, the filer is then accessed by other Linux, Unix or Window servers via a network (Ethernet or FC). First we need to describe the Data ontap storage model architecture.
Total Dataontap 7-Mode architecture is divided into two Blades.
  1. Network Blade (N-Blade)
  2. Data Blade (D-Blade).
Network Blade (N-Blade)
     End User’s read and write request is passed to the storage operation through the Network blade. As Netapp FAS is a unified storage so client can either access data from storage system either by NAS protocols or SAN access or block based protocol. So following protocols works on Network Blade.
* CIFS, NFS.
* FC, ISCSI, FCOE.
     So network blade provides the access to data via NAS or SAN protocols
Data Blade (D-Blade)
     Data Blade consist 3 Layers.
* WAFL.
* RAID.
* STORAGE (Disk Array).
     Data Blade is responsible for the data read and write operations and some mechanism that built Netapp Dataontap as a very efficient, fast, and robust.
Architecture for data read and writes operation.
     WAFL is the patient File system (Not really a file system) used by Netapp ontap OS that makes Netapp FAS system’s more powerful solution than its competition. Definition wise we can describe WAFL is below.
     The Write Anywhere File Layout (WAFL) is a file layout that supports large, high-performance RAID arrays, quick restarts without lengthy consistency checks in the event of a crash or power failure, and growing the file systems size quickly. It was designed by NetApp for use in its storage appliances.
     WAFL, as a robust versioning filesystem, provides snapshots, which allow end-users to see earlier versions of files in the file system. Snapshots appear in a hidden directory: ~snapshot for Windows (CIFS) or .snapshot for Unix (NFS). Up to 255 snapshots can be made of any traditional or flexible volume. Snapshots are read-only, although Data ONTAP 7 provides additional ability to make writable "virtual clones", based at "WAFL snapshots" technique, as "FlexClones".
NetApp Write request Data Flow
     
     As per the above diagram for a write operation whenever some write request appears on NetApp D-Blade via N-Blade (Either Via NAS or San Protocols) is cached into Memory buffer cache (Cache Memory)  and Simultaneously a copy into the NVRAM that is divided into NVLOG’s, and one thing that is need to be remembered that NVRAM in NetApp.
NVRAM
     NetApp storage systems use several types of memory for data caching. Non-volatile battery-backed memory (NVRAM) is used for write caching (whereas main memory and flash memory in forms of either extension PCIe card or SSD drives is used for read caching). Before going to hard drives all writes are cached in NVRAM. NVRAM memory is split in half and each time 50% of NVRAM gets full, writes are being cached to the second half, while the first half is being written to disks. If during 10 seconds interval NVRAM doesn’t get full, it is forced to flush by a system timer.
     To be more precise, when data block comes into NetApp it’s actually written to main memory and then journaled in NVRAM. NVRAM here serves as a backup, in case filer fails. The active file system pointers on the disk are not updated to point to the new locations until a write is completed. Upon completion of a write to disk, the contents of NVRAM are cleared and made ready for the next batch of incoming write data. This act of writing data to disk and updating active file system pointers is called a Consistency Point (CP). In FAS32xx series NVRAM has been integrated into main memory and is now called NVMEM.
RAID
    RAID (originally redundant array of inexpensive disks, now commonly redundant array of independent disks) is a data storage virtualization technology that combines multiple physical disk drive components into a single logical unit for the purposes of data redundancy, performance improvement, or both. Using RAID increases performance or provides fault tolerance or both. Fault tolerance is the property that enables a system to continue operating properly in the event of the failure of some of its components.
Note : 
     RAID Uses two or more physical disk drives and a RAID controller. Here RAID controller Acts as an interface between the host and disks.
RAID 0:
     A popular disk subsystem that increases performance by interleaving data across two or more drives. Data are broken into blocks, called "stripes," and alternately written to two or more drives simultaneously to increase speed. For example, stripe 1 is written to drive 1 at the same time stripe 2 is written to drive 2. Then stripes 3 and 4 are written to drives 3 and 4 simultaneously and so on. When reading, stripes 1 and 2 are read simultaneously; then stripes 3 and 4 and so on.
RAID 1:
     A popular disk subsystem that increases safety by writing the same data on two drives. Called "mirroring," RAID 1 does not increase performance. However, if one drive fails, the second drive is used, and the failed drive is manually replaced. After replacement, the RAID controller duplicates the contents of the working drive onto the new one.
RAID 10 and RAID 01:
     A RAID subsystem that increases safety by writing the same data on two drives (mirroring), while increasing speed by interleaving data across two or more mirrored "virtual" drives (striping). RAID 10 provides the most security and speed but uses more drives than the more common RAID 5 method.

RAID Parity:
     Parity computations are used in RAID drive arrays for fault tolerance by calculating the data in two drives and storing the results on a third. The parity is computed by XOR 'ing a bit from drive 1 with a bit from drive 2 and storing the result on drive 3. After a failed drive is replaced, the RAID controller rebuilds the lost data from the other two drives. RAID systems often have a "hot" spare drive ready and waiting to replace a drive that fails.
RAID 2:
     RAID 2, which is rarely used in practice, stripes data at the bit (rather than block) level, and uses a Hamming code for error correction. Hamming-code parity is calculated across corresponding bits and stored on at least one parity drive. 
RAID 3:
     RAID 3 consists of byte-level striping with dedicated parity. RAID 3 stripes data for performance and uses parity for fault tolerance. Parity information is stored on a dedicated drive so that the data can be reconstructed if a drive fails in a RAID set. For example, in a set of five disks, four are used for data and one for parity. Although implementations exist,[20] RAID 3 is not commonly used in practice. RAID 3 provides good performance for applications that involve large sequential data access, such as data backup or video streaming.
RAID 4:
     RAID 4 is very similar to RAID 3. The main difference is the way of sharing data. They are divided in to blocks (16, 32, 64 lub 128 kB) and written on disk s – similar to RAID 0. For each row of written data, any recorded block is written on a parity disk. This uses block level striping.
RAID 5:
    RAID 5 is a versatile RAID implementation. It is similar to RAID 4 because it uses striping. The drives (strips) are also independently accessible. The difference between RAID 4 and RAID 5 is the parity location. In RAID 4, parity is written to a dedicated drive, creating a write bottleneck for the parity disk. In RAID 5, parity is distributed across all disks to overcome the write bottleneck of a dedicated parity disk.
RAID 6:
     RAID 6 works the same way as RAID 5, except that RAID 6 includes a second parity element to enable survival if two disk failures occur in a RAID set. Therefore, a RAID 6 implementation requires at least four disks. RAID 6 distributes the parity across all the disks. The write penalty in RAID 6 is more than that in RAID 5; therefore, RAID 5 writes perform better than RAID 6. The rebuild operation in RAID 6 may take longer than that in RAID 5 due to the presence of two parity sets.
RAID DP:
     RAID DP used as RAID 4 first a horizontal parity (P). As an extension of RAID 4, RAID-DP adds a diagonal parity (DP). The double parity up to two drives fail without resulting in the RAID group to data loss. RAID-DP fulfills the requirements for a RAID 6 according SNIA definition. NetApp RAID-DP uses two parity disks per RAID group. One parity disk stores parity calculated for horizontal stripes, as described earlier. The second parity disk stores parity calculated from diagonal stripes.
     The diagonal parity stripe includes a block from the horizontal parity disk as part of its calculation. RAID-DP treats all disks in the original RAID 4 construct—including both data and parity disks—the same. Note that one disk is omitted from the diagonal parity stripe.

Data ONTAP Storage Architecture Overview
     Storage architecture refers to how Data ONTAP provides data storage resources to host or client systems and applications. Data ONTAP distinguishes between the physical layer of data storage resources and the logical layer. The physical layer includes drives, array LUNs, virtual disks, RAID groups, plexes, and aggregates.
Note: A drive (or disk) is the basic unit of storage for storage systems that use Data ONTAP to access native disk shelves. An array LUN is the basic unit of storage that a storage array provides to a storage system that runs Data ONTAP. A virtual disk is the basic unit of storage for a storage system that runs Data ONTAP-v. Disk is the physical disk itself, normally the disk will reside in a disk enclosure, the disk will have a pathname like 2a.17
2a = SCSI adapter
17 = disk SCSI ID
Any disks that are classed as spare will be used in any group to replace failed disks.
Aggregates
     Aggregates are the raw space in your storage system. You take a bunch of individual disks and aggregate them together into aggregates. But, an aggregate can’t actually hold data, its just raw space. An aggregate is the physical storage. It is made up of one or more raid groups of disks. Aggregates are collections of raid groups. They consist of one or more Raid Groups.
     I like to think of aggregates as a big hard drive. There are a lot of similarities in this. When you buy a hard drive you need partition it and format it before it can be used. Until then its basically raw space. Well, that's an aggregate. its just raw space. One point to remember is that a aggregate can grow but cannot shrink. When I created aggr1 I used the command:
aggr create aggr1 5
     This caused Data ONTAP to create an aggregate named aggr1 with five disks in it. Let’s take a look at this with the following command:
sysconfig –r 
     If you notice aggr1, you can see that it contains 5 disks. Three disks are data disks and there are two parity disks, “parity” and “dparity”. The RAID group was created automatically to support the aggregate. If I need more space, I can add disks to the aggregate and they will be inserted into the existing RAID group within the aggregate. I can add 3 disks with the following command:
aggr add aggr1 3
Look at the following output:
     Before the disks can be added, they must be zeroed. If they are not already zeroed, then Data ONTAP will zero them first. This may take a significant amount of time.
Raid groups
     Before all the physical hard disk drives (HDDs) are pooled into a logical construct called an aggregate (which is what ONTAP’s FlexVol is about), the HDDs are grouped into a RAID group. A RAID group is also a logical construct, in which it combines all HDDs into data or parity disks. The RAID group is the building block of the Aggregate.
     Raid groups are protected sets of disks. consisting of 1 or 2 parity, and 1 or more data disks. We don’t build raid groups, they are built automatically behind the scene when you build an aggregate. For example:
     In a default configuration you are configured for RAID-DP and a 16 disk raid group (assuming FC/SAS disks). So, if i create a 16 disk aggregate i get 1 raid group. If I create a 32 disk aggregate, i get 2 raid groups. Raid groups can be adjusted in size. For FC/SAS they can be anywhere from 3 to 28 disks, with 16 being the default. An aggregate is made of Raid Groups. Lets do a few examples using the command to make an aggregate:
aggr create aggr1 16
     If the default raid group size is 16, then the aggregate will have one raid group. But, if i use the command:
aggr create aggr1 32
     Now I have two full raid groups, but still only one aggregate. So, the aggregate gets the performance benefit of 2 RGs worth of disks. Notice we did not build a raid group. Data ONTAP built the RG based on the default RG size.
     If I had created an aggregate with 24 disks, then Data ONTAP would have created two RAID groups. The first RAID group would be fully populated with 16 disks (14 data disks and two parity disks) and the second RAID group would have contained 8 disks (6 data disks and two parity disks). This is a perfectly normal situation. For the most part, it is safe to ignore RAID groups and simply let Data ONTAP take care of things.
Volumes
     Volumes are data containers. A volume is analogous to a partition. It’s where you can put data. Think of the previous analogy. An aggregate is the raw space (hard drive), the volume is the partition, its where you put the file system and data. Some other similarities include the ability to have multiple volumes per aggregate, just like you can have multiple partitions per hard drive. and you can grow and shrink volumes, just like you can grow and shrink partitions.
Qtrees
     A qtree is analogous to a subdirectory. Lets continue the analogy. Aggregate is hard drive, volume is partition, and qtree is subdirectory. Why use them? to sort data. The same reason you use them on your personal PC. There are 5 things you can do with a qtree you can’t do with a directory and thats why they aren’t just called directories:
  • Oplocks
  • Security style
  • Quotas
  • Snapvault
  • Qtree SnapMirror
Opportunistic lock (OpLock)
     Opportunistic lock (OpLock) is a form of file locking used to facilitate caching and access control and improve performance. A cache (pronounced CASH) is a place to store something temporarily in a computing environment.
     OpLocks are made to enable simultaneous file access by multiple users while also improving performance for synchronized caches. In a synchronized cache, when a client requests a file from a server, the shared file may be cached to avoid subsequent trips over the network to retrieve it.
OpLock is part of the Server message block (SMB) protocol, also known as the Common Internet File System (CIFS) protocol.  OpLocks include batch locks, exclusive locks and level 2 OpLocks.
Security Styles
     Each volume and qtree on the storage system has a security style. The security style determines what type of permissions are used for data on volumes when authorizing users. You must understand what the different security styles are, when and where they are set, how they impact permissions, how they differ between volume types, and more.
     Every qtree and volume has a security style setting—NTFS, UNIX, or mixed. The setting determines whether files use Windows NT or UNIX (NFS) security. How you set up security styles depends on what protocols are licensed on your storage system.
     Although security styles can be applied to volumes, they are not shown as a volume attribute, and they are managed for both volumes and qtrees using the qtree command. The security style for a volume applies only to files and directories in that volume that are not contained in any qtree. The volume security style does not affect the security style for any qtrees in that volume.
     There are four different security styles: UNIX, NTFS, mixed, and unified. Each security style has a different effect on how permissions are handled for data. You must understand the different effects to ensure that you select the appropriate security style for your purposes.
It is important to understand that security styles do not determine what client types can or cannot access data. Security styles only determine the type of permissions Data ONTAP uses to control data access and what client type can modify these permissions.
     For example, if a volume uses UNIX security style, CIFS clients can still access data (provided that they properly authenticate and authorize) due to the multiprotocol nature of Data ONTAP. However, Data ONTAP uses UNIX permissions that only UNIX clients can modify.
Quotas:
     Quotas provide a way to restrict or track the disk space and number of files used by a user, group, or qtree. You specify quotas using the /etc/quotas file. A quota limits the amount of disk space and the number of files that a particular user or group can consume. A quota can also restrict the total space and files used in a qtree, or the usage of users and groups within a qtree. A request that would cause a user or group to exceed an applicable quota fails with a ``disk quota exceeded'' error. A request that would cause the number of blocks or files in a qtree to exceed the qtree's limit fails with an ``out of disk space'' error.
     User and group quotas do not apply to the root user or to the Windows Administrator account; tree quotas, however, do apply even to root and the Windows Administrator account.
     Before going to Snapvault and Snapmirror we have to know what is snapshots.
Snapshots
     NetApp snapshot is the patient technology of netapp that allow the Storage admin to take the backup of files locally, on the storage box and a very fast restoration of files in case of any file corruption and file deletion by mistake. To learn the snapshot we have to first go through the concept of AFS (Active file system).
Active file system
     Netapp write data using the 4 KB block size so when ever we write the data into netapp file sytem it breaks up that file into 4 Kb blocks for example we want to write a file ABC then it will be written as below. So in above example ABC is using 4 netapp block to write the file ABC. So at any point of time a file is represented by the active file system.
Definition of snapshot on the basis of active file system
     Whenever we take snapshot of any file, all the block’s constituting the file becomes frozen means after  taking the snapshot of any file in netapp, blocks constituting the file can not be altered and deleted, when end use make some changes into that file, changes are written using new blocks.
     for example some end user make some changes in file ABC and convert the block C into C’ then new file will be ABC’.so if storage admin has taken the snapshot then the file will be written as below.
     So for definition wise snapshot can be defined as the the read only image of active file system at any point of time.
Secret behind very fast data retrieval using snapshot technology
     As described snapshot in above lines snapshot is the read only image of active file system at any point of time. so after the first snapshot which has frozen the ABC blocks, file got deleted or got corrupt, means file ABC’ got corrupt and it is required to retrieve the last image of that file, as because of snapshot ABC blocks are their as those got frozen because of the snapshot so retrieval only changes the pointer towards the previous frozen blocks and with in second file got retrieved.
Snapshot as the secret of Netapp performance and other feature
     Other some Patient technology of Netapp are fully based on snapshot engine, Below is a description of those technologies.
1. Snaprestore.
2. Snapmirror.
3. Snapvault.

     Above is the data backup and recovery spectrum in netapp fas storage system. Only using snapshot we can backup a whole volume or aggregate of file but we can only restore a single file, which does not seems practical in any sense, so their are other technologies that usages snapshot engine but provide more feature and granularity to storage admin.
* Snapshot provides the following data backup and recovery spectrum.
* Snap restore enables the storage admin to recover a whole qtree, volume using a single command.
* Snapmirror that provide the feature of DR (Disaster recovery solution) works on snapshot engine technology.
* Snapvault is the technology that enable the storage admin to take backup of data on a remote storage.
Difference between Snapmirror and Snapvault functionality
      Both snapvault and snapmirror usages the snapshot engine and seems slimier in functionality  but their is a very basic difference in both technologies.
Snapvault
     Snapvault is a feature that provide a backup solution on a remote storage system independent of remote storage type, Means we can take backup on non netapp storage system as well, in netapp taking backup on a non netapp storage can be achieved using OSSV (Open sytem snap vault).
Snapmirror
     Snapmirror a DR solution provided by Netapp means we enables a snapmirror relationship between two Netapp sytstem, then in case of Disaster storage admin can route the user to access the data from the replica or mirror storage.













1 comment: