Hernán J.

Larrea

NetApp Data Ontap Simulator Cookbook
HOW TO BUILD YOUR OWN VIRTUAL, ALL FUNCTIONAL STORAGE SIMULATOR, WITH UBUNTU OS AND ISCSI FEATURES.

.................................................................................................................................................................................................................................. 4 Netapp licenses ......................................... 3 Ingredients......................................................................... 4 Recipe ................................................................................................. 3 Vmware Server 2 .........................com................................ 4 Ubuntu Server 10................................................................................................................................. Larrea – www............................................... 4 Model ............................................................................................................................................................................................................................................................................................3........hernanjlarrea................ 10 2 Hernán J...............................................................ar .............................................................................................................NetApp Data Ontap Simulator Cookbook CONTENT Introduction........................................ 3 Concepts ......................................................................................................................... 5 Installing licenses ................................... 4 Ubuntu aditional packages ...04 ......................................................................................... 7 provisioning a lun through iscsi .......... 7 About me .......................................................................4 ......................................................................................................................................................................................................................................................................... 4 Data Ontap simulator 7........

it would be great you to read some about other Storage Vendors and most of all about SAN and SAN Connectivity.ar . Volume. INGREDIENTS 3 Hernán J. you arrange your physical disks into Aggregates. is the admin portal for the storage. an alternative for the CLI. Snapshots. qtrees. different vendors. working. But as this is not a NetApp administration guide. you can create volumes inside of it. synthetic hardware. it would be great first you to have some idea of what a storage box is. it is a physical layer composed by FC cables. but the aggregates are composed by raid groups and these ones by physical disks. how to arrange them to reach a technical objective. For example. LUN. this will help you to set up a very real. Larrea – www. Storage fundamentals. and inside these volumes you can create shares. and just say these are key concepts to understand in order to be able to operate you NetApp simulated Filer. If you are already familiar with Storage concepts or with NetApp technologies don’t bother reading this section.netapp. if you want to read more you can do it at NetApp’s NOW site. even we are not going to virtualize a SAN (since it is not possible). understand the loop? Of course. NetApp is just one more of them. or both. FilerView.NetApp Data Ontap Simulator Cookbook INTRODUCTION I have created this document as it has been a great experience to me working with the Data Ontap simulator. is the way NetApp call’s their storage boxes. for real storage environments this is the cornerstone. building the simulator as it is explained on this guide. I’m going to stop here talking about this. It is very real. Aggregate. and all functional lab. Once your aggregate is created. filers. FC switches and directors. doesn’t care if they are used only NAS (CIFS and NFS) or only for LUN Mapping. qtree.hernanjlarrea. So. If you want to learn some storage fundamentals or NetApp fundamentals. will let you practice exporting LUN via iSCSI.com. luns or snapshots. and we are going to use iSCSI instead. they call their boxes. and SAN Connectivity. creating shares. Finally. Filer. an Aggregate can have more than one raid group. such as EMC. CONCEPTS Some stuff you need to get familiar to understand this guide if you have never worked with storage solutions. this is what you can do with the disks inside your storage. working with snapshots. it is almost an all functional virtualized storage. so you can get an idea the way it is in the real world. http://now. let’s cook…. And what is a SAN. and get a better understanding on the gaps between the real world and this simulator. Hitachi and IBM.com. I’ve mentioned this couple of times at this point. gain some practice on the Data OnTap CLI or FilerView. this nothing else but the hardware you add to your VM.

even it is documented by NetApp that is fully supported by their simulator. Larrea – www. You will get an ISO image file from where you will get all you need for your simulator.3.com/d/info/datacenter_downloads/vmware_server/2_0 just register and download.4.04 was the latest version available. at the moment this document was written 10.vmware. mounting ISO images in synthetic CD hardware of your VM and more than one Ethernet synthetic interface in your VM. At the time this document was written.NetApp Data Ontap Simulator Cookbook What you will need for your recipe and where to get it. DATA ONTAP SIMULATOR 7.com. this is my choice. partner or customer.ubuntu. iSCSI.04 This was also my choice. VMWare Server 2 it is free. and you can get it from: http://downloads.4 The master piece. of course the ISO for this version is much bigger than for 7. you can change it for any other that supports a Linux operating system. I guess you can run another Linux flavor you like. UBUNTU SERVER 10. NFS. UBUNTU ADDITIONAL PACKAGES Some packages you will need.com (for this you must be a NetApp’s member. all of them available from the Lucid repository. as the company I work for is. Syncmirror.3. Snapmirror. such as Flex Clone. VMWARE SERVER 2 Virtualization software. It is also free.htm MODEL 4 Hernán J. NETAPP LICENSES Data Ontap simulator includes all the licenses or the products and features available in your filer. just select 32 bits Server ISO and download it. I’ve been able to download it.com/server/getubuntu/download no need registering. CIFs. as I choose Ubuntu as the base system I used apt in order to get the packages. I haven’t tried if registering on through that form makes also the download available). you can get it from http://now. • • • • open-iscsi (necessary for mounting iSCSI exported LUNs from your virtualized storage) lsscsi (just to check when an iSCSI LUN has been mapped to the system) expect (necessary only for running the simulator in background) vim (just because I like it more than vim-tiny) For Ubuntu choosers. but if you choose another Linux flavor you might have to download the sources or precompiled binaries and make them on you system.3. the simulator itself.4. You can find them inside the ISO image. Download from: http://www. under .netapp.ar . anyway there is a registration form available on the site. and so on. Also this new version seems is does not need to run on top a VM./docs/license_keys. Data Ontap 8 version had already been released but as it is for 64 bits I preferred to keep working on 7.hernanjlarrea.

internet is plenty of documents to answer your questions and I’ll be pleased to answer any consult. And once the ns0 interface from the storage is attached to the physical one. no graphical interface. 5 Hernán J. no clustering. I recommend you to use between 256 and 512 MB for RAM and 8 GB for disks will be ok. The VM NICs can be bridged. that’s your call. 1. Larrea – www.ar . and also based on what your Virtualization software allows you. press F4 and select the installation mode. Ubuntu is this case. the server where the simulator is running it won’t be able to access the storage through that interface. I recommend you to set at least one of them as bridged or NAT. We will need 2 because by definition. and as we are going to map luns though iSCSI a second interface will help us to do so. binds its network interface/s to physical interfaces (actually this is a synthetic NIC but the simulator doesn’t know that). we will install Ubuntu Server with the Virtual Machine mode. Also the storage once installed will be simple configured. NAT.com. no wasted space. so a minimal system is installed. ater selecting language. or host only connections to your hosting machine. a common VM configured to run a Linux OS with 2 virtual NICs. Create your VM with 2 NICs. let’s take a quick view of what we are going to build and its layers (on the following diagram I’m going to include only the relevant layers). We are talking about this much in depth in the following sections. such as in the OS installation process. but I’m not going to show that here. lun snaps vol0 Volume (vol1) aggr0 Aggregate (aggr1) ns0 Data Ontap Ubuntu VM eth0 iSCSI eth1 Data Ontap root Aggregate and Volume Starting from bottom to top. RECIPE Here you will find the steps for the implementation of the VM and the Simulator. the guide is meant to let you setup your lab to learn some storage and NetApp not Linux. 3. the OS. Follow the installation steps for the OS. 1 configured as NAT or bridged at least. Install Ubuntu server as minimal virtual machine mode.hernanjlarrea. As we are going to download some packages with apt. you can play with that if you want. the Data Ontap simulator. 2. no unneeded packages. during the first screen. our VM.NetApp Data Ontap Simulator Cookbook First of all. on some parts I’ll show a high level description on what should be done. 4. no virtual interfaces. Finally the Data Ontap simulator and the open-iSCSI package for LUN Mappings. Moving forward. Take note of which network interface will you select as primary when the installation prompts.

Edit /etc/iscsi/iscsid. Run /sim/runsim. 6.hernanjlarrea. Larrea – www. vim . the internet. Create a new log for each session? [no]: Overwrite the single log each time? [yes]: Run /sim/runsim. Text between brackets shows the default option. 16.sh script execution. 25.sh following steps (13 to 26 ) show the options given during the setup. Run: apt-get install open-iscsi c. Run: apt-get install expect d. 23. 13. 22. Install the following packages: a. How much memory would you like the simulator to use? [512]: 256 Set the amount of memory you feel comfortable with inside the parameters given. 26. for remote administration and filesharing with your desktop. Where to install to? [/sim]: Would you like to install as a cluster? [no]: I’ll write another document regard clustering options. And if you want fix IPs for both interfaces. 19. 20.sh to start the simulator. For these steps. any comments will be made in bold to avoid confusion between script’s prompts and comments. you can run /sim/steup. lsscsi . Edit /etc/network/interfaces to include your second interface.com. 11.ar . the local network and the simulator from the VM ensure the eth0 is first in the routing table (Run command: route) if not. expect . select openSSH and Samba. anytime you want to run this configuration again. How many more would you like to add? [0]: 26 What disk size would you like to use? [a]: a Choose whether you feel comfortable with. 18. if you press return without entering any character this will be the configured option. open-iscsi .NetApp Data Ontap Simulator Cookbook 5. When prompted about server functions to install. Run: apt-get install lsscsi Configure iSCSI daemon to start automatically. 12./setup. just in case something goes wrong you do not have to run the installation all over again. 8. The first time you run the simulator it will ask you to set settings relevant to your virtual storage functionality. 10. For next steps (28 to 48) I’m going to show the prompts by the setup script. 24. Would you like full HTML/PDF FilerView documentation to be installed [yes]: n Continue with installation? [no]: y Your simulator has 2 disk(s). just delete the routes for eth0 and add them again. 17. Mount the Data Ontap simulator CD and run the installation script . Once Ubuntu is installed I recommend you to take a snapshot of the VM.sh to start the simulator and the first configuration. Please enter the new hostname []: ontap01 Just choose a name that likes you. Restart networking daemon. Do you want to enable IPv6? [n]: 6 Hernán J. 14. Also to get this working properly so you can access. 29. these functions are not required pieces for the puzzle but might make your life easy working with the simulator. 7. 21. 9.sh. change the startup mode to automatic. comments will be in bold to make difference between installation prompts and comments. 27.conf under Startup Settings. Disk adapter to put disks on? [0]: Use DHCP on first boot? [yes]: Ask for floppy boot? [no]: Which network interface should the simulator use? [default]: eth1 Make sure to check an interface different from the one you selected as default during the installation. If installed openSSH configure it to accept connections over any of the network interfaces. 15. Run: apt-get install vim b. 28.

com. 33. 40.) Selection (1-2)? [1]: 1 Enter the password for the root user []: Retype the password: The default name for this CIFS server is 'ONTAP01'. To install the licenses it is really simple. so go to the file.168.101 Please enter timezone [GMT]: Where is the filer located? []: Argentina What language will be used for multi-protocol files (Type ? for list)?:en_US Do you want to run DNS resolver? [n]: Do you want to run NIS client? [n]: Do you want to configure the Shelf Alternate Control Path Management interface for SAS shelves [n]: New password: Retype new password: Do you want to make the system visible via WINS? [n]: A filer can be configured for multiprotocol access (. 32. 7 Hernán J. 50. Selection (1-4)? [1]: 4 What is the name of the Workgroup? [WORKGROUP]: At this point you should be being requested to enter the root password. 46. 48. 39./doc and open the file named license_keys.0]: Please enter media type for ns0 {100tx-fd. Once loged in as root you will be taken to the Data Ontap prompt “your storage name”> in my case Ontap01>. 41. to accomplish this objective what we need to now is: • • • • Create a new Aggregate.0. 43.168.. Would you like to change this name? [n]: Data ONTAP CIFS services support four styles of user authentication. 44.1]: Please enter the name or IP address of the administration host: 192. Now you can start playing with your storage! INSTALLING LICENSES For most things we want to do here.255.ar . Larrea – www. 45. we need to install some licenses. Do you want to configure virtual network interfaces? [n]: Please enter the IP address for Network Interface ns0 [192. auto} [auto]: Please enter the IP address for Network Interface ns1 []: Would you like to continue setup through the web interface? [n]: Please enter the name or IP address of the IPv4 default gateway [192. Create a volume inside the Aggregate. 37. Create a LUN inside the volume.168.htm. 35. 42. To get a summary on the licenses installed just run the license command. PROVISIONING A LUN THROUGH ISCSI At this point your simulator should be up and running and you should have all disks as spares. from your linux machine mount the CD image and browse to . 36..255. Create an Initiator group and add our iSCSI address. we can do it through CLI or via FilerView.0. 38.hernanjlarrea. 47.106]: Please enter the netmask for Network Interface ns0 [255.NetApp Data Ontap Simulator Cookbook 30. 34. grab the code and run the following command in the Data Ontap CLI: license add <code> Repeat the procedure for every product or feature you want to enable. 31. 49.0. For our next objective we will need to install iSCSI license.

ar . the root aggregate will be shown an all the other disks will be shown as spares). and aggregates are composed by raid groups. (So it will create 2 raid groups with 8 disks each. let’s decorate the plate… Creating a new aggregate First of all. First of all.NetApp Data Ontap Simulator Cookbook • • • • Map the lun and the initiator group. check the space on it: ontap01> df -h -A aggr_tst Aggregate total used avail capacity aggr_tst 191MB 80KB 191MB 0% aggr_tst/. Keep playing with your storage! I’m going to describe how to do this through the CLI. Larrea – www. Ontap01>aggr create aggr_tst -r 8 -t raid4 16@16m This command will create an aggregate called aggr_tst with a raid group size of 8 with only 1 disk of parity per raid group (raid 4) and will include 16 disks of 16 MBs each.snapshot 0TB 0TB 0TB ---% Now we’ve got all the space for us. So. let’s check the space on it: ontap01> df -h vol_tst 8 Hernán J. let’s create a 100MB volume inside this aggregate: ontap01> vol create vol_tst aggr_tst 100m This command will create a 100MB volume named vol_tst inside the aggregate aggr_tst. (If no aggregate was created only aggr0. Make a FS inside the new disk and mount it.snapshot 10MB 0MB 10MB 0% There are 10MB (5%) reserved for aggregate snapshots as we won’t take any snapshot from the aggregate let’s claim that space: ontap01> snap reserve -A aggr_tst 0 ontap01> df -h -A aggr_tst Aggregate total used avail capacity aggr_tst 201MB 80KB 201MB 0% aggr_tst/. Log in from the OS to the storage over iSCSI and discover the LUN. Ontap01>sysconfig –r You will get an output with the details on the physical disks and how are they arranged in through the different aggregates. as we already cooked. but you might want to do it through the FilerView all options are available from any of these interfaces. we know disks are arranged into raid groups. the volume is created. but only 7 will be usable since each raid group has 1 disk or parity). So. as I mentioned in the concepts section. Creating a volume inside the aggregate Now the aggregate is created. lets check the status of our disks.hernanjlarrea.com.

the type o OS which will access that LUN and finally the path where you want to store it inside your filer.debian:01:58cad98ae9c6 ontap01> igroup show Initiators_tst (iSCSI) (ostype: linux): iqn. Creating the LUN Just run the following command: ontap01> lun create -s 50m -t linux /vol/vol_tst/lun_tst ontap01> lun show /vol/vol_tst/lun_tst 50m (52428800) (r/w.1993-08.iscsi file: InitiatorName=iqn.debian:01:58cad98ae9c6 (not logged in) Now. online) And the LUN is created.org. You indicate which LUN to which group and which id will be set to the LUN being mapped. check the iSCSI service is running: ontap01> iscsi status iSCSI service is running In order to create the initiator group. so let’s keep it.1993-08. go to the Linux machine and read the content of /etc/iscsi/initiatorname. you first must know the initiator’s iSCSI node name. 9 Hernán J. ontap01> igroup add Initiators_tst iqn.debian:01:58cad98ae9c6 Then.ar . you must specify it is an iScsi initiator goup type (-i option) and the the host type and the group name. it has been created but it’s empty.org. on the storage side.com. we might want to take snapshots of this volume. and create a LUN inside this volume.hernanjlarrea.1993-08. As you can see.snapshot 20MB 0MB 20MB 0% /vol/vol_tst/. Mapping the LUN to the initiator group Run the following command: ontap01> lun map /vol/vol_tst/lun_tst Initiators_tst 1 and the mapping is done. The lun create command includes the size of the lun (of course it can’t be bigger than the volume where it is located). create the initiator group with the igroup command: ontap01> igroup create -i -t linux Initiators_tst ontap01> igroup show Initiators_tst (iSCSI) (ostype: linux): About the create parameter or igoup command. Creating the iSCSI initiator group First of all. let’s add the node name of the server.org. we need to map the LUN to the initiator group. Larrea – www.snapshot Again we see space reserved for snapshots.NetApp Data Ontap Simulator Cookbook Filesystem total used avail capacity Mounted on /vol/vol_tst/ 80MB 88KB 79MB 0% /vol/vol_tst/ /vol/vol_tst/.

com Hernán J.d/' is not a directory: No such file or directory * Setting up iSCSI targets [ OK ] Finally. I decided to address my career in Wintel technologies.168.233. we only have the cdrom device and the disk where the OS is installed. VMware Virtual S 1.99923498 Now check or SCSI devices.com.1000 iqn. Run: fdisk /dev/sdb. Larrea – www.00 /dev/sr0 [2:0:0:0] disk VMware.1992-08. Run: mount /dev/sdb1 /mnt.00 /dev/sr0 [2:0:0:0] disk VMware.131 192. If you want to know more about me.NetApp Data Ontap Simulator Cookbook Discovering the LUN on the server’s side At this point our storage is presenting the LUN via iSCSI to the server. specially Active Directory. VMware Virtual S 1.233.ar and if you want to email me.0 /dev/sda [3:0:0:1] disk NETAPP LUN 7340 /dev/sdb Creating an FS inside the LUN Run fdisk and create a new partition inside the LUN and then format the partition. list SCSI devices again: root@simulator:/# lsscsi [1:0:0:0] cd/dvd NECVMWar VMware IDE CDR10 1. an IT guy. I’ve been working in IT for almost 7 years.168. I invite you to visit my personal website www. Storage solutions and a little programming in . just to keep a pre discovery view simulator:/# lsscsi [1:0:0:0] cd/dvd NECVMWar VMware IDE CDR10 1.hernanjlarrea. you can do it at hjlarrea@hotmail. simulator:/$ lsscsi [1:0:0:0] cd/dvd NECVMWar VMware IDE CDR10 1.NET.com. Then run mkfs.ar .com.hernanjlarrea. create the partition and write the partition table to the disk. Backup and Recovery environments.ext4 (this is just another one of my choices). Larrea 10 Hernán J.d/open-iscsi restart * Disconnecting iSCSI targets [ OK ] * Stopping iSCSI initiator service [ OK ] * Starting iSCSI initiator service iscsid [ OK ] ln: target `/lib/init/rw/sendsigs.0 /dev/sda Now restart the iSCSI service: simulator:/# /etc/init.omit.netapp:sn.ext4 /dev/sdb1 Finally mount the partition. now the server must run the necessary steps in order to discover the LUN. Larrea.00 /dev/sr0 [2:0:0:0] disk VMware. ABOUT ME I’m Hernán J. Let’s discover the iSCSI target: simulator:/# iscsiadm -m discovery -t st -p 192.0 /dev/sda As you see.131:3260. VMware Virtual S 1. Run: mkfs.

Sign up to vote on this title
UsefulNot useful