Your SlideShare is downloading. ×
How to setup i scsi target drive using freenas
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

How to setup i scsi target drive using freenas


Published on

Published in: Education, Technology

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. TrainSignal - Computer Training VideosTrainSignal Blog - Free Computer Training BlogOur Training Products:Microsoft TrainingCisco TrainingVMware TrainingCitrix TrainingCompTIA TrainingMicrosoft Office TrainingWireless Network TrainingGuide to Certifications and Technology News for IT ProfessionalsAbout This BlogContact UsSupport ForumsBlog HomeIT CertificationsNewsTips and TutorialsFree Computer Training VideosIT Career HelpSubscribe to NewsletterHow to Setup iSCSI Drive Using FreeNASBy Dave LawlorJanuary 19, 2009I recently wrote an article on how to setup a NAS using the open source FreeNAS software. One of the many features of FreeNAS is the ability tosetup an iSCSI drive.iSCSI stands for Internet SCSI and allows client machines to send SCSI commands to remote storage servers such as FreeNAS. This allows you toconsolidate your storage drives into a single machine for lower cost per GB and easier maintenance, with the illusion of local disk drives on yourclient machines. The functionality to use iSCSI drives is built into both Windows Vista and Server 2008 natively. At the higher end you can also useiSCSI for low cost clustering solutions and disaster recovery.In the past this was usually done using special hardware and Fibre cabling, though with iSCSI you can leverage your existing network infrastructure.It should be noted that depending on the network load and performance requirements of your servers this can be drastically slower than the dedicatedoptions. For a high performance production application you can still use iSCSI but I would look at setting it up on its own network at 1GB speeds.How Does iSCSI Work?There are two parts to the iSCSI protocol, the first being clients and the second being storage devices.Clients are called iSCSI initiators and can be configured either using hardware or software solutions. As I mentioned earlier this functionality isalready built into Vista and Server 2008, so we will not have to add any software/hardware to these machines.The storage devices are called iSCSI targets and must be running some type of software/hardware to receive the incoming requests from the iSCSIinitiators. Luckily FreeNAS has the ability to create iSCSI drives as part of its core package so I am going to use the FreeNAS server I used in a pastdemo.Setup iSCSI Target Drive on FreeNAS ServerHow to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 2. I’m going to use FreeNAS as the iSCSI target, and if you are going to follow along with this demo, it is imperative that you have one setup as well.If you don’t you can read how to setup FreeNAS server and then come back to this article for the next steps.This demo is going to assume that while the hard drives are installed in the server they are NOT added to the FreeNAS interface.1. Connect to your FreeNAS server through the WebGUI using your favorite browser. In the top menu select Disks, then click Management.2. Click on the plus sign in the lower right corner to add drives.3. Next to Disk, choose the drive you want to add from the drop down, and if you want enter a description for it next to Description.I usually leave the rest of the settings at default then click Add.4. When you go back to the Disk Management screen you will be asked to confirm the addition by clicking on Apply changes, go ahead and do thatnow.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 3. 5. From the top menu choose Services, then iSCSI Target.6. Click on the plus sign in the Extent area.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 4. 7. The Bolded fields are required, so place a name in the Extent name field, leave the Type as Device, and then choose the Device you want in thedropdown.You can also enter a note in the comment field for reference. When you have set your options click on Add.8. When you get back to the iSCSI Target page click on Apply changes.9. Click on the plus sign in the Target area.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 5. 10. As before the Bolded fields are required. Here is a breakdown of the fields:Target name: Add your own or leave the defaultFlags: RW for Read/Write or RO for Read OnlyStorage: Will have the extents listed that were setup, choose the one you want to useAuthorized Network: Enter the IP network that can access this drive. For example if your IP was, you would enter people will leave the 24 in the dropdown if your subnet mask is you fill in all the info click on Add.11. Back at the iSCSI target page you need to click on Apply changes once again.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 6. 12. Now place a check in the box next to Enable in the top right corner and then click Save and Restart in the bottom left.The iSCSI Target drive is now setup and ready for use.Setup iSCSI Initiator on VistaNow that the iSCSI target drive is ready, let’s go in and configure our Vista client machine to use it.1. Click on the Start menu and type iSCSI into the menu bar and hit Enter.2. Depending on your settings you may get a UAC warning, go ahead and approve if you do.3. If this is the first time you are using iSCSI you will get a warning that the iSCSI service is not running and it is asking if you want to start theservice and also have it automatically start with your computer. Go ahead and click Yes.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 7. 4. The next window that appears will ask if you want to unblock the Microsoft iSCSI service in Windows Firewall. Click on Yes.5. When the iSCSI Initiator Properties appears click on the Discovery tab.6. Click on Add Portal…7. Place the IP address of the iSCSI target in the text field labeled IP address or DNS name: and then click OK.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 8. 8. Click on the Targets tab.9. Highlight the target drive listed and click Log on…How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 9. 10. In the next window you can choose to have this connection restored when the computer starts by placing a checkmark next to that option. If youdon’t then leave it blank. Either way click Ok.11. You should now see a status of Connected, confirm that and then click Ok.12. Click on Start, right click on Computer, then click on Manage.13. If you get a UAC warning, click through. You will now see the Computer Management MMC, click on Disk Management and in a few secondsthe disks will populate.Disk 1 is the iSCSI drive and you can see that it shows up unallocated. Right click on the drive and select New Simple Volume.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 10. NOTE: If the disk drive was formatted previously you might have to Delete partition first.14. When the New Simple Volume Wizard starts go ahead and click Next.15. Set the size of the volume you want to create; in this demo I am using all the space. After you set the space click Next.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 11. 16. Assign a drive letter, for this demo I am using F; then click Next.17. I am going to format this drive as NTFS and place a check next to Perform a quick format. You can also assign a volume label, then click Next.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 12. 18. Review the settings selected and then click Finish.19. Depending on the speed of the network and the size of the drive it may take some time to format. When it is finished you will see it ready to go inDisk Management.SummaryWe have setup a iSCSI target drive in FreeNAS and then setup an iSCSI initiator in Windows Vista to attach to the FreeNAS drive. After that weconfigured the drive for use on our Vista machine by formatting it and assigning a drive letter.While not for everyone, iSCSI definitely has its uses and if it is suitable for your environment and needs, FreeNAS provides a low cost alternative.More Related PostsWindows DNS Server 2008: Setup External Internet DNS Server1.How to Install IIS 7 and Setup a Static Website in 13 Easy Steps2.The Right Way to Perform a Backup in Exchange Server 20073.New Training Release: Windows Vista Training4.Cleaning Up Your PC5.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 13. You can leave a response.About the AuthorDave Lawlor (MCTS, MCP, A+) has been working in the IT field since leaving the U.S. Army in 1996. Working his way up from printer hardwarerepair to running a corporate datacenter for a multinational corporation, Dave has seen many environments throughout the years. Focusing on websites and search engine optimization the last few years, with the release of Server 2008 it has renewed his passion for the Wintel platform and servertechnologies. David also runs where he posts free videos and walk-throughs for a variety of server technologies.David currently works as a freelance technical consultant and writer for a variety of companies in the Chicago area.Authors Website: http://www.DaveLawlor.comDiscussion32 comments and trackbacks for “How to Setup iSCSI Drive Using FreeNAS”CommentsPosted by Gary Sims on January 20, 2009, 6:03 amThanks for an excellent guide, I have blogged about it at, Gary1.Posted by Scottt on January 26, 2009, 2:03 pmAfter setting up the system per your recommendation I get an error code 1 when selecting the check mark for the enable in step 12. I look atthe log and it says it is failing to start the ISCSI service. Any ideas.2.Posted by Bas on February 2, 2009, 9:21 amGreat guide, I’m a total newby with freenas but this makes it easy.@Scotty: I had the same problem, but then I discovered I allready mounted the iSCSI device somewhere else. Deleted this an after that noerror code 1 anymore.3.Posted by Sam on February 8, 2009, 8:15 amHi Im having the same problem as Scottt. Any ideas ? Thanks4.Posted by Giorgio on February 9, 2009, 1:13 pmfor Scottt problem ‘…error code 1 when selecting the check mark for the enable iSCSI Target…’ you must umount disks then check mark andit works.5.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 14. Posted by Shankar on April 1, 2009, 3:26 pmThanks for the guideit is wonderfulonce again thank u very much6.Posted by Iggy on April 3, 2009, 9:08 amVery cool and useful guide. I do have one question for you that I can’t figure out.Let’s say I get all the way to Step 19 (where the drive is mounted and functioning).How do I unmount it gracefully and then disconnect from the target?I can’t find this info anywhere on the ‘net. I’ve tried the “mountvol F: /d” command and that ‘unmounts’ F:, but I cannot logoff the session(using the Targets tab of the iSCSI Initiator Properties panel). I get an error: “The session cannot be logged out since a device on that session iscurrently being used.”I’m using Vista Enterprise on my client machine.Thanks,Iggy7.Posted by Emre CAN on September 21, 2009, 6:42 amHello thank you for this excellent tutorial.Im hoping to get a solution from experts here,My problem is, windows does not start to “New Simple Volume Wizard” because, Windows itself can not find the iSCSI disk no matter howmuch i clicked tru “rescan disks”What would you suggest?Sincerely,Emre.8.Posted by Iceberg Titanic on October 23, 2009, 8:08 amHi folks -To unmount the devices, so that you can enable the iSCSI service, go to the Disks menu, and select Mount Point. You can unmount drivesthere.9.Posted by Paul on November 8, 2009, 12:51 pmThe new version has just been released and I have never used FREENAS before and loved this tutorial. The version 7 has implemented somechanges with regards to iSCSI Target and I am a bit confused. Would love to see a revised turorial based on the FreeNAS .7Thanks in advance10.11.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 15. Posted by Ash on December 2, 2009, 11:47 pmError code 1 is owning me. Tried unmounting, makes absolutely no difference.Posted by jonthegimp on December 4, 2009, 11:30 amAshIt depends on what version you have – I was able to fix mine with the following: that helps, it is a frustrating problem.12.Posted by Kakunka on December 8, 2009, 7:42 amGuys:This is for Vanilla XPFirst, go to Control Panel Select Administrative ToolsNow Select ServicesMake sure Logical Disk Manager and Logical Disk Manager Administrative Servicesare started, right click and select start.NowCheck that Microsoft ISCSI Initiator Service is started (same deal)Now make sure ISCSI is up using the MS ISCSI initiator as he specs above( run C:WINDOWSsystem32iscsicpl.cpl )Okay close out Services go back to Admin ToolsNow select Computer Managementunder Storage select Disk ManagementThe disk will appear with a red no go iconright click and select initializeNow right click and select partition and format and select Drive letter. . .“voila” as they say in Frogland. . . Drive should appear in your Win Explorer windowK.13.Posted by vinzzz on January 19, 2010, 3:36 pmHi I have a question regarding iSCSI. I bought a NAS so i can centralize my data. While my data is centralized, i want to index mynetworkshares on the NAS, so i can quickly find files, metadata etc.Windows 7 doesnt allow indexing networkshares.Is iSCSI a solution for my situation? Can the data still resist on my NAS, available for all computers in my LAN, and still trick windows that ihave a local drive of 1.5TB (actually the disk on the NAS) ?14.Posted by powpow on February 4, 2010, 1:28 pmHey Iggy,This error is likely being caused by a open file or shared folder pointing to a location on that target.Under My Computer | Manage | Shared Folders | Shares, stop any shares that point to that target.15.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 16. Posted by Dan on February 20, 2010, 2:34 pmFirst I’d like to compliment you on your outstanding tutorials I have just recently started working with iSCSI and FreeNAS and you’ve reallygiven me a good education over the past two days. SO on to my question…Out of personal and business curiosity I’ve been trying to make myFreeNAS drive available through the internet. Is this possible? I can see the target from a remote network however when I try to log on i get aconnection failed error. I can connect and transfer data just fine on my local network it’s the WAN part that’s giving me a hard time.Thanks,-Dan16.Posted by Paul on June 28, 2010, 5:45 pmThanks for this guide! I got my Freenas iSCSI target running and windows sees it without problems.17.Posted by rick on July 23, 2010, 4:16 pmOne Question -Is it possible to create a mount point smaller than the drive size?In my case, I have a 5TB storage device ready to mount to ESX using iSCSI and I like to create mount point smaller than 2TB.Thanks if you know the answer.Rick18.Posted by Prashanth on August 8, 2010, 2:49 pmWhen I try to add the target portal, I get a connection failed error…..Any ideas friends ?ThanksPrashanth19.Posted by Kevin on August 19, 2010, 7:24 amHello,I configured an iSCSI target using FreeNAS as explained in this tutorial. I have two Windows 2008 R2 servers that can access the disk drive.But when I write a file in it from one server, I can’t see it in the other server.Any idea on how to solve this ?Thanks.Kevin20.Posted by anuj on August 21, 2010, 10:55 amthanks mate for nice post21.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 17. Posted by insightrules on August 28, 2010, 8:10 amHi,I’m installing oracle RAC in virtual box using freenas to share teh OCR and ASM disks.The /ocr01 /ocr2 /ocr3 partitions are mounted on both servers. but when installing Oracle cluster a error message is displayed. Can create a fileon /ocr1 on server1 but when tryes to read it from /ocr1 on server2 is not there.I create a file on /ocr1 on server 1 and the file is not getting syncronized on server2.Any help????Thanks in advanced22.Posted by Madhurranjan on September 15, 2010, 4:06 amI get a “Connection Failed” message. In freenas gui , i can see the status as ONLINE as shown below but i am unable to connect to it from anytarget. Any thoughts on how this can be fixed ?ad4 78534MB iscsi drive PFDB32S7SJSBVM Always on Unknown or unformatted ONLINE23.Posted by Seclusion on October 27, 2010, 2:16 amI have the same problem. When I try to connect my Iscsi FreeNAS to my initiator ISCSI of Vista I have the same message like Madhurranjan“Connect Failed”. I Actually have the last version of FreeNAS and I work with VMware Workstation. The network connection is by DHCPthrough VMware (I can acces to my admin FreeNAS). If you have any solutions24.Posted by Anuj@systechblog on February 6, 2011, 8:01 amGreat guide, thanks its help me a lot.25.Posted by Ali on March 9, 2011, 9:11 amHello,I configured an iSCSI target using FreeNAS as explained in this tutorial. When I try to add the target portal on my Windows server 2008, I geta connection failed error.Any idea on how to solve this ?Thanks.26.Posted by Ali on March 9, 2011, 9:14 amIt was working and both servers were rebooted and it would not reconnect so I deleted the iSCSI portal and tried to re-establish it and I keepgetting connection failed error message.27.28.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 18. Posted by MarcusMarcus on April 15, 2011, 6:41 pmThis is a great how to. Any chance of getting an updated one for FreeNAS 8? I know it is only in Release Core at the moment.Posted by trevor nezar on April 26, 2011, 9:42 amGreat guide thanks,got to work this morning and my iScsi target has lost all partition info – 6 HDD’s wiped. where do I begin ?29.Posted by single on May 21, 2011, 11:39 amThanks for your answer & your picture ~ther are useful for me,because i get big trouble. i cann’t set the iscsi,but i can only set nus~~~ha ha….however,you give me big a favor,thank u very much~30.TrackbacksFreeNAS Setup for my Home Environment | redmutt.com1.FreeNAS and RM2.Post a comment032Sign-up for Our NewsletterCategoriesTips and TutorialsRelated PostsBuild Your Own Open Source NAS Device Using FreeNAS – Part 21.Build Your Own Open Source NAS Device Using FreeNAS – Part 12.Server 2008: How to Setup a Remote Desktop on Windows Vista3.How to Setup User Authentication in FTP 7 on IIS 7.04.How to Create a Backup Image in Windows Vista and Windows XP5.Name *E-mail *Web siteXHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike><strong>CommentHow to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54
  • 19. Featured ProductsTagsThis PostFreeNAS StorageAll PostsCiscoCloud Computing Free IT TrainingIT CertificationsIT Jobs Linux Microsoft Networking Office2007 Office 2010 PowerShell Security Server 2008Server 2008 R2 SharePoint SQL Server System Center TechEd Tech Events TrainSignalVirtualization VMware VMworld Windows 7Windows VistaAbout UsTrainSignal is a fun, profitable and high growth company founded in 2002 that produces premium quality computer training videos with a focus onmaking learning more fun and more effective. Our training is very comprehensive and designed to give our customers in-depth knowledge, buildhands-on skills and promote career advancement.Our Training Products:Microsoft TrainingCisco TrainingVMware TrainingCitrix TrainingCompTIA TrainingMicrosoft Office TrainingWireless Network TrainingConnect with UsBecome a fan on FacebookFollow us on TwitterView Our YouTube ChannelCopyright © 2002-2011 TrainSignal, Inc. All Rights Reserved. • All logos and trademarks are property of their respective owners.How to Setup iSCSI Target Drive Using FreeNAS de 19 27-10-2011 22:54