Here I’m
configuring iSCSI for a VMware lab. The following could have been
done instead by using the NetApp OnCommand System Manager and/or the NetApp VSC for VMware.
These commands were run on the NetApp Release 8.1X45 7-Mode Simulator (use the version command to check release.) We already have an IP
address configured from the initial setup.

Preliminary
Information

If you have already run the following command, the wipe
procedure will not un-assign disks, they will remain assigned:

NetApp01> disk assign all

To find out the current RAID group configuration,
available spares and their size:

NetApp01> sysconfig –r

After a wipe of the
Simulator 8.1, we should see aggregate aggr0, with a plex plex0, and the plex
with a raid group rg0 of 3 x 1027MB (1GB) disks in a RAID-DP (data, parity,
dparity) and 25 spare disks.

To find out the total size, used space and available
capacity of all volumes:

NetApp01> df -h

Here, I have a root
volume - /vol/vol0 – of size 808MB with only 93MB used!

Resizing the
Root Volume

To reallocate file in vol0:

NetApp01> reallocate start –f –p /vol/vol0

To check reallocate status:

NetApp01> reallocate status

To resize the volume:

NetApp01> vol status

NetApp01> vol size vol0 250m

Note: This step is
not part of the iSCSI setup, just a refresher on resizing root volumes, and
250mb is very tiny. In the real world there are minimum sizes set for the root
volume which you cannot go below – for example: min root volume size for a
FAS2040 running DOT 8.1.1 7-mode is 132GB (source NetApp Hardware Universe)!

Adding Disks to
Aggregate aggr0

Add the 25 spares to aggr0:

NetApp01>aggr add aggr0 25@1G

Below is the output
from running the command above; notice that DOT warns about a low spares disk
condition, and even though this is a lab and it doesn’t really matter, I
pretend it does and reduce the number of spares to add down to 24 leaving 1 hot
spare!

Note: preparing to add 23 data disks and 2 parity disks.

Continue? ([y]es, [n]o, or [p]review RAID layout) p

The RAID group configuration will change as follows:

RAID Group: Current, NEW

/aggr0/plex0/rg0: 3 disks, 16 disks

/aggr0/plex0/rg1: 0 disks, 12 disks

Continue? ([y]es, [n]o, or [p]review RAID layout)y

WARNING! Continuing with aggr add will result in a low spares
disk condition for one or more RAID groups. Are you sure you want to continue
with aggr add? n

NetApp01> aggr
add aggr0 24@1G

Licensing iSCSI
and Starting the iSCSI Service

NetApp01> license add BSLRLTG #iscsi

NetApp01> iscsi start

Creating a
Volume for the iSCSI LUN

To find out the available total space:

NetApp01> aggr show_space

Creating a thin-provisioned volume of size 20G:

NetApp01> vol create vol1 –s none aggr0 20G

Note: the options
for the –s switch are:

volume = thick
provisioned

file = space will
be pre-allocated for all the space-reserved files and LUNs within the volume

none = thin
provisioned

Setting up the
iSCSI LUN, igroup, and LUN Mapping

Here I could be lazy and just run the lun setup command
as below:

NetApp01> lun setup

Below is the output
(reduced.) The lun setup command essentially does for you a – lun create, igroup create, and lun map!