Você está na página 1de 47

SAN Administration

on Data ONTAP 7.3


LUN Access
2008 NetApp. All rights reserved.
Objectives
At the end of this module, you should be able to:
Describe the steps to allow a Windows Server
2003/2008 initiator to access a LUN on a
storage system
Describe the steps to allow a Solaris 10
initiator to access a LUN on a storage system
2
2008 NetApp. All rights reserved.
LUN Access
To connect an initiator to a targets LUN:
1. Create an igroup if necessary
2. Create the LUN
3. Map the LUN to the igroup
4. Find the LUN on the initiator
5. Prepare the LUN as a new disk on the initiator
3
LUN Access Overview
Data ONTAP Setup
Windows Setup
Solaris Setup
2008 NetApp. All rights reserved. 4
1. Create an igroup
Ethernet
Ethernet
Fibre Channel
Fibre Channel
Initiator
Target
My_FC_igroup
21:00:00:2b:34:26:a6:56
OS Type: Window
My_IP_igroup
iqn.1999-04.com.a:system
OS Type: Windows
Place WWN in
igroups for iSCSI
Place WWPN in
igroups for FCP
igroups are described by OS
LUN Access Overview
Data ONTAP Setup
Windows Setup
Solaris Setup
2008 NetApp. All rights reserved.
Steps to Create an igroup
1. Optionally, verify initiators connectivity
fcp show initiators
iscsi initiators show
2. Create the igroup and place the initiators into the
igroup
igroup create {-i|-f} -t ostype igroup_name
[node, node]
switch i = iSCSI igroup
switch f = FC igroup
ostype = solaris, windows, hpux, aix, linux, netware, vmware
node
iSCSI type has worldwide node (WWN)
FC type has worldwide port name (WWPN - may be aliased)
3. Verify the igroup
igroup show
5
2008 NetApp. All rights reserved. 6
2. Create a LUN
Initiator
Target
LUNa
LUNs may exists in any
volumes or qtrees
LUNc
LUNa exists in
vol0 in aggr0
/vol/vol0/LUNa.lun
LUNc exists in qtree2
in vol2 in aggr2
/vol/vol2/qtree2/LUNc.lun
LUNb
LUNb exists in vol1 in aggr1
/vol/vol1/LUNb.lun
2008 NetApp. All rights reserved.
Steps to Create a LUN
1. Create a LUN
lun create -s size -t ostype lun_path
size = in bytes by default
use m for megabytes
use g for gigabytes
NOTE: LUN sizing is discussed in detail in Module 5
ostype = solaris, windows, hpux, aix, linux, netware, and
vmware, windows_gpt, windows_2008
lun_path
LUN path begins with /vol/{VolumeName}/[qtreeName]
Last portion of path is the LUN Name
Example: /vol/vol1/qtree1/lun1
2. Verify the LUN
lun show
7
2008 NetApp. All rights reserved. 8
3. Map a LUN to an igroup
Ethernet
Ethernet
Fibre Channel
Fibre Channel
Initiator
Target
My_FC_igroup
21:00:00:2b:34:26:a6:56
OS Type: Windows
My_IP_igroup
iqn.1999-04.com.a:system
OS Type: Windows
LUNa
Map a LUN to
an igroup
LUNb
2 1
Assign a LUN ID
2008 NetApp. All rights reserved.
Steps to Map a LUN to an igroup
1. Map a LUN to an igroup
lun map lun_path igroup_name
[lun_id]
lun_path = path name of a LUN
igroup_name = name of an initiator group
lun_id = unique identification number that the
initiator uses when the LUN is mapped to it
if not entered, automatically assigned
Example:
lun map /vol/vol1/qtree1/luna My_IP_igroup 1
2. Verify the LUN mapping
lun show m
9
2008 NetApp. All rights reserved.
lun setup Command
LUN creation, optionally igroup creation, and
igroup and LUN mapping may be
accomplished with a single command
lun setup
A wizard-like command that prompts the user for
relevant information
The result of the command is a newly created
LUN mapped to a new or existing igroup
10
2008 NetApp. All rights reserved. 11
Creating a LUN with lun setup
system> lun setup
This setup will take you through the steps needed to create LUNs and
to make them accessible by initiators. You can type ^C (Control-C)at
any time to abort the setup and no unconfirmed changes will be made
to the system.
Do you want to create a LUN? [y]: y

Multiprotocol type of LUN
(solaris/windows/hpux/aix/linux/netware/vmware/
windows_gpt/windows_2008)[linux]: windows

A LUN path must be absolute. A LUN can only reside in a volume or
qtree root. For example, to create a LUN with name "lun0" in the qtree
root /vol/vol1/q0, specify the path as "/vol/vol1/q0/lun0".
Enter LUN path: /vol/SAN/lun1
2008 NetApp. All rights reserved. 12
Creating a LUN with lun setup (Cont.)
A LUN can be created with or without space reservations being
enabled.
Space reservation guarantees that data writes to that LUN will
never fail.
Do you want the LUN to be space reserved? [y]:

Size for a LUN is specified in bytes. You can use single-character
multiplier suffixes: b(sectors), k(KB), m(MB), g(GB) or t(TB).
Enter LUN size: 1g

You can add a comment string to describe the contents of the LUN.
Please type a string (without quotes), or hit ENTER if you don't want
to supply a comment.
Enter comment string: Windows LUN
2008 NetApp. All rights reserved. 13
Creating a LUN with lun setup (Cont.)
The LUN will be accessible to an initiator group. You can use an
existing group name, or supply a new name to create a new
initiator group. Enter '?' to see existing initiator group names.
Name of initiator group []: ?
No existing initiator groups.
Name of initiator group []: iWIN_fcp

Type of initiator group iWIN_fcp (FCP/iSCSI) [FCP]: FCP

2008 NetApp. All rights reserved.
Creating a LUN with lun setup (Cont.)
A Fibre Channel Protocol (FCP) initiator group is a collection of
initiator port names. Each port name (WWPN) is 16 hexadecimal
digits, separated (only) by optional colon (:) characters. You can
separate port names by commas. Enter '?' to display a list of
connected initiators. Hit ENTER when you are done adding port
names to this group.
Enter comma separated portnames: ?
Initiators connected on adapter 0c:
Portname Group
10:00:00:00:c9:2d:9f:76
10:00:00:00:c9:2d:a0:63

14
2008 NetApp. All rights reserved. 15
Creating a LUN with lun setup (Cont.)
Enter comma separated portnames: 10:00:00:00:c9:2d:9f:76
Enter comma separated portnames: <CR>

The initiator group has an associated OS type. The following are
currently supported: solaris, windows, hpux, aix, linux, netware or
vmware.
OS type of initiator group "iWIN_fcp" [windows]: windows

The LUN will be accessible to all the initiators in the initiator group.
Enter '?' to display LUNs already in use by one or more initiators
in group "iWIN_fcp".
LUN ID at which initiator group "iWIN_fcp" sees
"/vol/SAN/lun1" [0]: 1
2008 NetApp. All rights reserved. 16
Creating a LUN with lun setup (Cont.)
LUN Path : /vol/SAN/lun1
OS Type : windows
Size : 1.0g (1077511680)
Comment : Windows LUN
Initiator Group : iWIN_fcp
Initiator Group Type : FCP
Initiator Group Members : 10:00:00:00:c9:2d:9f:76
Mapped to LUN-ID : 1

Do you want to accept this configuration? [y]: y

Do you want to create another LUN? [n]: n
2008 NetApp. All rights reserved.
Windows Steps
To connect an initiator to a targets LUN:
1. Create an igroup
2. Create the LUN
3. Map the LUN to the igroup
4. Find the LUN on the initiator
5. Prepare the LUN as a new disk on the initiator


NOTE: We will explore these steps first for
Windows and then for Solaris
17
LUN Access Overview
Data ONTAP Setup
Windows Setup
Solaris Setup
2008 NetApp. All rights reserved.
4. Find the LUN on Windows
Using the Disk Management Tool, Rescan Disks









18
Right-click and
choose
Rescan Disks
Select Disk
Management
2008 NetApp. All rights reserved.
4. Find the LUN on Windows (Cont.)
19
The LUN
is offline
The LUN appears
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows
Make the LUN online
20
Right-click,
select
Online
Note: The LUN
is not initialized
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
Initialize the LUN in Windows Server 2003
21
Right-click,
select
Initialize
To convert to GPT, right-click and select from menu
NOTE: MBR is
the default
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
The LUN is now ready for provisioning
Windows Administrators may use either:
Disk Managements New Simple Volume Wizard in
Windows Server 2008
Disk Managements Create Partition Wizard in
Windows Server 2003
Share and Storage Management
Available on Windows Server 2008 or later
One location for Administrating Shares and Storage
We will examine this tool in this module
Storage Manager for SANs
Available on Windows Server 2003 R2 or later
Requires Data ONTAP VDS Hardware Provider,
downloadable at the NOW site
22
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
Windows Server 2008 has Disk Managements
New Simple Volume Wizard
23
Right-click,
select
New Simple
Volume
The wizard will launch
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
New Simple Volume Wizard (Cont.)
24
Specify the method to mount
Specify the volume size
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
New Simple Volume Wizard (Cont.)
25
Verify the configuration
and finish
Specify the format
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
Alternatively, a LUN may be formatted through the
Share and Storage Management for Windows 2008
26
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
Navigate to the Volumes tab to investigate the current
volume configuration
27
Click
here
Select Provision Storage
to configure the LUN
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
28
Since our LUN is identified
as a disk, select here
Then click Next
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
29
Select the
appropriate disk and
then Next
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
30
Determine the size
of your volume and
select Next
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
31
Determine how to
mount the new
volume and select
Next
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
32
Determine whether to
format the volume and
then select Next
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
33
Review, and if
correct, select
Create
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
34
Note: you may
want to share out
the new volume
2008 NetApp. All rights reserved.
5. Preparing the LUN for Windows (Cont.)
The new volume is now available for use
35
2008 NetApp. All rights reserved. 36
Windows Stack
LUN2 LUN1
Format LUN
Port 3,4 Bus 0, Target 0, LUN1
NTFS NTFS
Disk 1 Disk 2
Filesystem Added
E: F:
Mounts
Port 3,4 Bus 0, Target 0, LUN2
LUN1
LUN2
SCSI\DISK&VEN_NETAPP&PROD_LUN\4&61E00BC&0&000001
SCSI
Devices Path
SCSI\DISK&VEN_NETAPP&PROD_LUN\4&29BC0C71&0&000100
2008 NetApp. All rights reserved.
Solaris Steps
To connect an initiator to a targets LUN:
1. Create an igroup
2. Create the LUN
3. Map the LUN to the igroup
4. Find the LUN on the initiator
5. Prepare the LUN as a new disk on the initiator


NOTE: We will now explore these steps
on Solaris 10
37
LUN Access Overview
Data ONTAP Setup
Windows Setup
Solaris Setup
2008 NetApp. All rights reserved.
4. Find the LUN on Solaris - FC Only
Use cfgadm -al to verify that the LUN is visible
38
# cfgadm -al
Ap_Id Type Receptacle Occupant Condition
c0 scsi-bus connected configured unknown
c0::dsk/c0t0d0 disk connected configured unknown
c0::dsk/c0t1d0 CD-ROM connected configured unknown
c0::dsk/c0t2d0 disk connected configured unknown
c1 fc-fabric connected configured unknown
c1::10000000c92d9f8a unknown connected unconfigured unknown
c1::10000000c92da0c4 unknown connected unconfigured unknown
c1::10000000c92db0c1 unknown connected unconfigured unknown
c1::500a098186f7c786 disk connected configured unknown

The LUN is showing up
The LUN is configured
automatically in Solaris 10
2008 NetApp. All rights reserved.
4. Find the LUN on Solaris
devfsadm maintains the /dev and /devices namespaces
Scans SCSI bus for new LUNs
Example:
# devfsadm
Check for available LUNs with sanlun application
from the Host Utility Kit



Use luxadm probe to verify LUN available
39
# sanlun lun show
filer:lun-pathname DEVSLU20-F1:/vol/flexvol1/lun1
device filename /dev/rdsk/c1t500A098186F7C786d1s2
adapter emlxs0
protocol FCP
lunsize 10m (10485760)
lunstate GOOD
# luxadm probe
Found Fibre Channel device(s):
Node WWN:500a098086f7c786
Device Type: Disk device
Logical Path:/dev/rdsk/c1t500A098186F7C786d1s2
Remember the path
to correctly identify the
LUN for the
next commands
2008 NetApp. All rights reserved.
5. Prepare the LUN for Solaris
Format and label the new disk
40
# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
0. c0t0d0 <ST320011A cyl 38790 alt 2 hd 16 sec 63>
/pci@1f,0/ide@d/dad@0,0
1. c0t2d0 <ST320011A cyl 38790 alt 2 hd 16 sec 63>
/pci@1f,0/ide@d/dad@2,0
2. c1t500A098186F7C786d1 <NETAPP-LUN-0.2 cyl 8 alt 2 hd 16 sec 128>
/pci@1f,0/pci@5/fibre-channel@0/fp@0,0/ssd@w500a098186f7c786,1

Specify disk (enter its number): 2
selecting c1t500A098186F7C786d1
[disk formatted]
Disk not labeled. Label it now? Y
Same disk as from
the output of
luxadm probe
2008 NetApp. All rights reserved.
5. Prepare the LUN for Solaris (Cont.)
Examine the partition (slice) table of the LUN
41
format> partition
partition> print
Current partition table (original):
Total disk cylinders available: 8 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 0 (0/0/0) 0
1 swap wu 0 0 (0/0/0) 0
2 backup wu 0 - 7 8.00MB (8/0/0) 16384
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 0 - 7 8.00MB (8/0/0) 16384
7 unassigned wm 0 0 (0/0/0) 0

partition> quit
format> quit
Slice 2 and 6 are usable.
We will use slice 2.
2008 NetApp. All rights reserved.
5. Prepare the LUN for Solaris (Cont.)
Next, add the UNIX file system (UFS) to the
raw device
Example:

Finally, mount the new disk
Note: use the block device not the raw device
The block device will have the same unique
identifier of the raw device but with a path
beginning with /dev/dsk
Example:
42
# mount /dev/dsk/c1t500A098186F7C786d1s2 /mnt/lun2
# newfs /dev/rdsk/c1t500A098186F7C786d1s2
Mountpoint
Block device name
2008 NetApp. All rights reserved.
5. Prepare the LUN for Solaris (Cont.)
The LUN is ready to use
Example:
# cd /mnt/lun2
# touch foo
# ls
foo lost+found

43
2008 NetApp. All rights reserved. 44
Solaris 10 Native Stack
LUN2 LUN1
Block Devices
UFS UFS
Disk 1 Disk 2
File System Added
/mnt/X Mounts
LUN1
LUN2
/dev/rdsk/c1t500A098186F7C786d1s2
Raw Devices
/mnt/Y
/dev/dsk/c1t500A098186F7C786d1s2 /dev/dsk/c1t500A098186F7C786d2s2
/dev/rdsk/c1t500A098186F7C786d2s2
2008 NetApp. All rights reserved.
Summary
Regardless of the initiator OS, there are five
basic steps to access a LUN:
1. Create an igroup
2. Create the LUN
3. Map the LUN to the igroup
4. Find the LUN on the initiator
5. Prepare the LUN as a new disk on the initiator

45
LUN Access Overview
Data ONTAP Setup
Windows Setup
Solaris Setup
2008 NetApp. All rights reserved. 46
Exercise
Estimated Time: 60 minutes
46 2008 NetApp. All rights reserved.
2008 NetApp. All rights reserved.
Module Review
What is an igroup?
A group of one or more initiators
How does an FCP igroup differ from an iSCSI
igroup?
FCP igroup contains initiators WWPN
iSCSI igroup contains initiators WWN
Can you add a LUN to a different igroup using
the LUN ID?
Yes

48

Você também pode gostar