Friday, November 18, 2011

Creating Aggregates, Volumes and more on NetApp

By: Boaz Minitzer
Tag: NetApp ONTAP Release 7.2.4

 

A.   Create aggregates

Initially the filer must be set up with a system disk on the san, an aggregate will need to be created from a serial terminal session. For a brand new installation the setup program can be run as soon as a LUN has been exported to the filer. If the system is powered up at the boot prompt type “bye” to exit the boot prompt and begin the setup configuration. The section below is for creating additional non-system aggregates.
CLI
Example FILER2:
FILER2>disk show –n
*this will list all un-owned disks exported to the filer
FILER2>aggr create aggr1 –d sandir1:42.126L22 sandir1:42.126L23
*the two sandir disks above represent two 500GB lun exported to the filer, aggr1 is used because the system aggregate should not be used for data storage and is typically created as aggr0.

FilerView GUI
  1. Click ‘Aggregates’ in left sidebar, click Next.
  2. Type the aggregate name in the text box: aggr1 (2,3,4….and so on), click Next.
  3. Leave Raid Group size as default, click Next
  4. Click the radio button for Manual on the “Disk Selection Method” screen and click Next.
  5. Select Disk Type: LUN from the drop down menu, and click Next.
  6. On the Manual Disk Selection page, select the LUNs you have exported to the filer from the window on the right hand side of the page. Use shift+ctrl to select multiple LUNs, click Next.
  7. Click Next to return to the original browser window.
  8. Refresh your browser and the newly created LUN should appear.


B.   Create volumes


FilerView GUI:

  1. Click Volumes: Add,
  2. Click Next to start in popup window,
  3. Click Next (choose default of flexible volume), choose volume name, click Next
  4. Next, and select the aggregate you would like to create the volume on, and select default for space guar
  5. Click Usable size, and specify MB and snap reserve, and click next.
  6. Click Next.
  7. Go back to main FilerView window and click Volumes:Manage to refresh.  You should see the new volumes. 
  8. On the console, type df -A to show aggregate information.  The %used for the aggregate agg0 shouldn’t be more than 94% to avoid problems, per netapp support.
  9.  To set the language on the volume, run for each FILER1, FILER2:  vol lang en_US.  This is needed for each new volume if run from the command line, but not from FilerView.

Command Line:
Type vol create <vol-name> -l <language-code> <hosting-aggr-name> <size>[k|m|g|t]

FILER1>vol create test_vol –l lang en_US aggr0 500m


C.   Create Qtree(s)

Create qtree(s) to create a director(ies) where data can be managed.  A qtree will have to be created for each directory that needs to have a quota or mirrored.  Since migrating directories currently on EMC to netapp will give only a couple hundred qtrees at most, this allows plenty of room for growth until you reach the maximum of 4995 qtrees per volume.

FilerView GUI:

  1. Click Volumes: Manage: Qtrees: Add
  2. Click appropriate values, add.  Leave Oplocks checked.

Command Line:
Filer>  qtree create dir-name-here

D.   Set up NFS exports on volumes/qtrees


In FilerView GUI:
  1. Click NFS: Add Export
  2. Click appropriate path options (e.g. Read/write for /vol/hiwnp/app), then Next
  3. Add appropriate hosts to export to (e.g. caliwww1, caliwww2 for /vol/hiwnp/app) and click Next

If the export exists and you want to add permissions/hosts:
  1. Click NFS: Manage Exports.
  2. Select the export.
  3. If export options need to be updated, do so then click next.
  4. Leave the export path as it is, click next.
  5. Add read-only, read-write, or root hosts as select in export options, click next.
  6. Leave the security options as is, click next.
  7. Click Commit to finalize your changes.

Command line:
  1. In one terminal, open /net/<filer-name>/vol/vol0/etc/exports and select an example rule you’d like to copy.  Check for an existing rule for the qtree you want to export.
  2. run exportfs –io <desired-options-here-from-exports>  (will export without changing /net/<filer-name>/vol/vol0/etc/exports)

If access from client OK, then insert/edit line in /net/<filer-name>/vol/vol0/etc/exports with <desired-options-here-from-exports>
If you messed things up, run exportfs -r to revert back.

If the export exists and you want to add permissions/hosts:
  1. In one terminal, open /net/<filer-name>/vol/vol0/etc/exports and select and copy the existing rule you want to update.
  2. run exportfs –io <desired-options-here-from-exports>  (will export without changing /net/<filer-name>/vol/vol0/etc/exports)

If access from client OK, then insert/edit line in /net/<filer-name>/vol/vol0/etc/exports with <desired-options-here-from-exports>
If you messed things up, run exportfs -r to revert back.

Note: use the root= option only when needed, where root needs to write to the file system.  Root can still read from the netapp, but chowning or any other write operation may not work, and the file ownership may not translate.

E.   Set up CIFS exports for volumes/qtrees

In FilerView GUI:
        I.            Click CIFS
     II.            Click Shares
   III.            Click Add
  IV.            Fill in required fields (Share Name, Mount Point, Share Description)
     V.            Click Add
  VI.            Change access as necessary.
From the command line (filer local prompt):
cifs shares –add <share name> <path> -comment
FILER1> cifs shares –add test /vol/data/test –comment “this is a test volume”
Modify permission as necessary.
cifs access <share> [-g] <user|group> <rights>
FILER2>cifs access test bminit:dvrt rwx





No comments:

Post a Comment