How RAID parity works?
----------------------
Parity data is used
by some RAID levels to achieve redundancy. If a drive in the
array fails,
remaining data on the other drives can be combined with the parity
data (using the
Boolean XOR function) to reconstruct the missing data. For
example, suppose two
drives in a three-drive RAID 5 array contained the
following data:
Drive
1: 01101101
Drive
2: 11010100
To calculate parity
data for the two drives, an XOR is performed on their data:
 
  01101101
XOR 11010100
------------
 
  10111001
The resulting parity
data, 10111001, is then stored on Drive 3.
Should any of the
three drives fail, the contents of the failed drive can be
reconstructed on a
replacement drive by subjecting the data from the remaining
drives to the same
XOR operation. If Drive 2 were to fail, its data could be
rebuilt using the XOR
results of the contents of the two remaining drives,
Drive 1 and Drive 3:
Drive
1: 01101101
Drive
3: 10111001
as follows:
 
  10111001
XOR 01101101
------------
 
  11010100
The result of that
XOR calculation yields Drive 2's contents. 11010100 is then
stored on Drive 2,
fully repairing the array. This same XOR concept applies
similarly to larger
arrays, using any number of disks. In the case of a RAID 3
array of 12 drives,
11 drives participate in the XOR calculation shown above and
yield a value that is
then stored on the dedicated parity drive.
what is data striping?
----------------------
In computer data
storage, data striping is the technique of segmenting logically
sequential data, such
as a file, so that consecutive segments are stored on
different physical
storage devices.
Striping is useful
when a processing device requests data more quickly than a
single storage device
can provide it. By spreading segments across multiple
devices which can be
accessed concurrently, total data throughput is increased.
It is also a useful
method for balancing I/O load across an array of disks.
Striping is used
across disk drives in redundant array of independent disks
(RAID) storage,
network interface controllers, different computers inclustered
file systems and
grid-oriented storage, and RAM in some systems.
RAID Disk types
---------------
Data disk
  - holds data stored on behalf of clients
within RAID groups
  - and any data generated about the state of
the storage system
    as a result of a malfunction
Spare disk
  - does not hold usable data, but is available
to be added to a
    RAID group in an aggregate. Any functioning
disk that is not
    assigned to an aggregate but is assigned to
a system
  - functions as a hot spare disk
Parity disk
  - stores row parity information that is used
for data reconstruction
    when a single disk drive fails within the
RAID group
dParity disk
  - stores diagonal parity information that is
used for data
    reconstruction when two disk drives fail
within the RAID group, 
    if RAID-DP is enabled.
how are RAID groups formed?
--------------------------
- they are
automatically formed when you add disks to an aggregate
- Data ONTAP adds new
drives to the most recently created RAID group until
  it reaches its maximum size (default
behavior)
What size of RAID group should I choose?
----------------------------------------
- recommended range
of RAID group size is between 12 and 20
Data ONTAP Storage units
------------------------
1. disks
  - physical device that you put into the
shelves
  - e.g, SATA,BSAS,or SAS
2. raid groups
  - a collection of one or more disks providing
a RAID level
  - if its a RAID-DP, there is atleast one data
disk and 2 parity
  - disks (parity disk + dparity disk)
2. plexes
  - a collection of one or more raid groups
3. aggregates
  - consists of disks within the raid groups
  - collection of one or two plexes
  - if unmirrored, it contains a single plex
  - if mirrored, it contains 2 plexes
3. volumes
  - 2 types: traditional and FlexVol
  - tradional -> it inherit properties its
containing aggregate (directly tied
                 to aggr)
  - FlexVol -> loosely coupled to its
containing aggregate; you can alter
               properties on the fly
(RECOMMENDED!!!)
4. qtrees
  - subdirectory of the root directory of a
volume
  - you can use qtrees to subdivide a volume in
order to group LUNs
5. LUNS
  - logical unit of storage under a volume
  - you can create LUNs in the root of a volume
(traditional or flexible) or in
    the root of a qtree
  - NOTE: don't create LUNs under Data ONTAP's
root volume (/vol/vol0)
Disk types based on speed
-------------------------
SAS - Serial Attached
SCSI (faster)
BSAS - Bridged SAS /
SATA drives (slower); this
       means you have SATA disk in a SAS
enclosure (it is a DS4243 shelf)
How disks are named?
--------------------
{slot}{port}.{shelfID}.{bay}
example: 3c.10.21
How are disk firmwares updated?
-------------------------------
- when you assign it
to storage system
- you can do it (ask
Netapp technical support what is your target disk firmware)
Commands
--------
| 
Displaying | 
# lists all disk on
  the cluster 
storage show disk 
storage show disk
  -T --> adds TYPE of disk column at the end (SAS,BSAS,etc.) 
# shows info for a
  particular disk 
disk show 1b.29 
# display unowned
  disks 
disk show -n 
# shows busy disk 
stats show
  disk:*:disk_busy 
example output:
  disk:39CF5F4E:715905F5:E3AEEB55:DCADA33F:0[...]000:disk_busy:100% 
# this command
  shows more of the hardware side of the disk 
filer01>
  storage show disk 4b.01.13 
Disk: 3a.01.13 
Shelf: 1 
Bay: 13 
Serial:
  6SL3LM8B0000N2367MFW 
Vendor: NETAPP 
Model:
  X412_S15K7560A15 
Rev: NA00 
RPM: 15000 
WWN:
  5:000:c5004b:e8877c 
UID:
  5000C500:4BE8877F:00000000:00000000:00[...] 
Downrev: yes 
Pri Port: A 
Sec Name: 4b.01.13 
Sec Port: B 
Power-on Hours: N/A 
Blocks read:      0 
Blocks
  written:   0 
Time interval:
  00:00:00 
Glist count: 0 
Scrub last done:
  00:00:00 
Scrub count: 0 
LIP count: 0 
Dynamically
  qualified: No 
Current owner:
  4294967295 
Home owner:
  4294967295 
Reservation owner:
  0 
filer01> 
# to see firmware
  version of netapp disk (it is the column with NAxx) 
sysconfig -a 
storage show disk 
# how to see raid
  size of an aggregate? 
aggr status -v 
  * raid size = data disks + parity disks 
  * under Options, example: raidsize=16 | 
| 
Assigning | 
# unowning a disk 
disk assign 0c.51
  -s unowned -f 
# assigning a spare
  disk to another system 
c 
# assigning
  multiple disks to local node 
disk assign disk_1
  disk_2 … disk_N | 
Tutorials
---------
| 
Manual Update of
  Disk Firmware | 
1. remove all files
  under /etc/disk_fw (make a backup just to make sure) 
2. download the
  target disk firmwares (here are examples) 
3. within 2 minutes
  it should start updating by its own 
4. if disk
  firmwares are upgraded, verify by issuing this 
   command: storage show disk -x | 
Debugging/Troubleshooting
-------------------------
| 
data is copied to a
  spare disk | 
Sun Sep  6 04:13:56 EDT
  [filer01:raid.rg.diskcopy.start:notice]: /aggr1/plex0/rg2: starting disk
  copy from 3a.01.11 to 4b.02.0 
Sun Sep  6 04:14:03 EDT
  [filer01:raid.disk.predictiveFailure:warning]: Disk
  /aggr1/plex0/rg2/3a.01.11 Shelf 1 Bay 11 [NETAPP   X412_S15K7560A15 NA06] S/N
  [6SL3KS740000N23610JD] reported a predictive failure and it is prefailed; it
  will be copied to a spare and failed 
... 
Sun Sep  6 06:31:28 EDT
  [filer01:raid.rg.diskcopy.done:notice]: /aggr1/plex0/rg2: disk copy from
  3a.01.11 to 4b.02.0 completed in 2:17:32.30 | 
 

