Configuring FreeNAS to be an iSCSI Target in vCenter

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right i just want to shoot a quick video um just to kind of go over the adding a iscsi device into esxi onto your exi this kind of piggybacks onto what we did last week with the network adapter we're going to make some changes there with that network adapter we have to make it a v kernel vm kernel adapter we'll show you how to do that and we'll also show you how to set up our network attached storage in this case we're using a product called freenas you see right here the login screen for freenas just note first before we log in the ip address so you have your pod numbers in this example i'm using pod eight so normally our addresses from the spreadsheet are 10.22.2 dot pod number eight one would be host one eighty two would be host two so on and so forth the iscsi network we're keeping separate so all of our our storage access is going to be on a separate ip network this is a different vlan so we have to change that third octet from a 2 to a 3 and then the freenas setup is on the dot four so it's pod number four of that particular post so in this case 10.22.3.84 will be our freenas okay i'm logging in the username is root the password is the same vmware password that we've been using for the rest of our hosts and this will launch the dashboard a couple things real quick um first off we're gonna look at storage and we need to make sure that our large drive in this case we have a four terabyte drive in there that we're going to be using for storage um it's showing just under that about 3.64 terabytes but we have to make a note of the name that name is one depending upon how these drives appear on that sata chain there it could be ada0 or ada1 so just make a note of whichever drive is your largest drive here you want to make a note of that name and we're going to use that here when we build the iscsi target here okay after that before we get into actually building that we need to enable iscsi so basically we go under services these are all the services that are running on freenas you'll see one here is called iscsi so we're going to enable that so now it's running and we're also going to check the start automatically box so in case this box ever gets rebooted it will always come up with iscsi running okay all right so now we can actually build that target so we're going to go to sharing we're going to say block shares iscsi and here is our global configuration so we have to actually build it from the base up so the first thing we have to do is point it to a particular drive so i'm going to click on the extents tab here there is nothing in here i'm going to click on add i'm going to give it a name in this case i'm just going to call it um vm dash extents we have to give it a device in this case make sure that it's the large drive showing up there so in this case mine was ada one so i click on that and that's all we do on this particular page so we hit save so now we've created our extents and we're pointing it to the right disk now from there we go to the initiators tab click on initiators we hit add we have to allow all initiators and hit save and notice here we have a group id of one we're going to click on the portals tab at the top we're going to hit add for description we're going to say vm-portal okay we are not going to be doing any type of chap no authentication at all our auth group uh we're going to also leave blank but the ip address we're going to select the ip that is on this network which in this case is the um iscsi network the whatever network we're going to leave the port number alone and we're going to hit save and now we've had our port group id and now we are listening on this ip address via that okay next we're going to click on the targets tab and now we're going to tie everything together so we've got our extents our initiator and our portal so we're going to go to target and actually build the target now so target target okay the group name is going to be the vm portal one that we just created group initiator id is going to be the one under the initiators that we did auth method we're not going to authenticate um so we don't have to have a auth minute or group number so we hit save okay once we created a target then we need to go over to associated targets click add target name is vm target loan id on zero extent is the vm extents hit save and now we just created our lun and now we go into and i'm going to actually log in to vcenter okay first thing i'm going to do is go to my host number one so we have host one listed here when i click on that i want to click on configure okay before we click on these set up the storage piece here we have to set up that networking piece at vswitch you may have already had a v-switch built if you do that's fine we're just going to click on these virtual switches here in this case we don't so i'm going to add networking i want to actually add a vm kernel network adapter okay because if you look under here this includes all of our additional administration management network our iscsi fibre channel vsan all that stuff is listed here so we want that v kernel vm kernel port hit next if you already have the vswitch one built that points to that usb nick we are good to go just click on the existing standard switch and you want to choose the v switch that goes to the nic card the usb nick card in this case it's not been added so i'm just going to click on new standard switch hit next i have to add a physical adapter in this case i only have one left that's my virtual usb 0 here hit highlight that hit ok it should pull up one gig full duplex auto negotiate we're good to go hit next network label we can call us whatever we want because i'm using it for iscsi i'm gonna actually write in there iscsi vlan id i'm going to keep alone i'm going to keep it ipv4 vmtu or anything like that so let's go hit next ipv4 settings we actually actually specify an ip address on this v-neck that is part of the iscsi network so it's that 10.22.3 network so i'm going to say use static ipv4 settings okay in this case 10.22.3 that's the iscsi network and because i'm on host one i can use the host ones digit so 81. subnet mask 255.255.255.0 leave everything else alone we're not going to have to set up a default gateway this traffic will never leave this iscsi network hit next and then finish and you'll see here it'll create this new standard switch we can expand that and now we can see our vm kernel port for iscsi going to my usb nic card and i've got green port lights which means i'm connected okay now we click on storage adapters right now nothing is is added as far as iscsi so we click on add software adapter and we want to add software iscsi adapter hit ok and you'll see a new hbab installed here we go vm hba64 that's my guy okay so this is my initiator and we know the target that we're trying to go to is this guy right here in fridaz so i want to click on that software adapter so i'm going to come down here i'm going to verify that it is enabled up and running i should not have any devices yet nor should i have any paths yet because i haven't discovered anything so i'm going to go to dynamic discovery i'll click on add put in the fully qualified domain name or ip address so this is going to be the ip address of freenas that's the one that we set up under the iscsi target so in this case it's 10.22 84. try tricking me there my port number i'm going to leave that alone i'm going to hit ok it added it here but now say due to recent configuration changes a rescan of that hba is recommended so i'm going to say rescan adapter and she's done now once you click on static discovery you should see here that it found that freenas out there because we pointed to that ip address i want to bind that to a network port so i'm going to click add i want to make sure we always use this iscsi reswitch so i'm using the vusp0 hit ok and we got to rescan again okay once we've done a rescan complete you'll notice here we have target of one so we are pointing to the nas we have one device found and there's two paths so we can click um our properties here we're enabled our devices it does bring up the freenas it shows that there's about four terabytes of disk space left we have not consumed any of that yet which means we have not assigned a data store to it yet operation stayed attached and we are good to go it's a nice cozy transport so now we click on storage devices and you'll notice here we have the freenas iscsi disk showing up here okay so we are good to go there now we click on storage we go to our data center we click on storage new data store type is vmfs hit next name of data store i'm going to call it free nas select a host we're gonna do host one and we should see the freedoms because we've added it to that host now okay hit next we're gonna make sure it's formatted with vmfs version six hit next we're gonna do the full partition so in this lab environment we're gonna set up all three host machines to be able to talk to the same partition that we're really only using it for for storing our vms for doing view motion and all that but if you wanted to create this partition smaller maybe you only want to have one terabyte for all your your vmotion and your ha and all that you could have another two plus terabytes for individual data stores for individual vms you could do that here as well just specify the total data store size in this case we're going to use the whole thing so go ahead and hit next ready to complete hit finish and you'll see here is creating that data store and part of what it's doing is it's actually going to be formatting the freenas so we can start to use it boom is complete now we have a new data store called freenas so we are good to go clicking on host one again to summary notice my storage has ballooned out to now almost four terabytes if i click on host 2 which we've not done yet you'll notice that i still have my normal 337 gig so i just have the disk that's in the box whereas here it has the disk in the box plus the new freenas iscsi storage i can also click on data stores and they'll tell me which data stores are on this host click on host two there's only the one data store so hopefully this makes sense if you have any further questions please feel free to reach out but i want you to do this with all three of your hosts so continue to add the exact same um way you're going to add the same storage volume and that way we can start doing ha we can put our vm images out there and then start doing some vmotion and some things like that all right so hopefully you don't have any questions but if you do feel free to reach out you can reach me in chat as always thank you
Info
Channel: Net PandIT
Views: 1,232
Rating: undefined out of 5
Keywords:
Id: Nnejvlg4Voc
Channel Id: undefined
Length: 16min 20sec (980 seconds)
Published: Wed Oct 21 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.