 Tom here from more systems. We're going to talk about hard drive pass through with XEP and G You want to learn more about me or my company head over to Lawrence systems calm If you like to hire for a project there is a hires button at the top If you like to support the channel out in other ways There is affiliate links for products and services we talk about down below Including a full review of this Dell PowerEdge R720 XD server in our lab provided by tech supply direct We have a discount code to get you to some Discount off your purchase from them. All right, I'll leave a link to this video as well if you're interested in more details about the server But there are different ways that you may want to set up pass through on XEP and G XEP and G does support pass through of the hard drive and it supports pass through of the full controller That would be controlling all the hard drives and when you pass through the whole controller That means you would be passing them through to a specific VM And then that controller would not be available for other VMs and all the drives attached to that controller would then be Only available to that particular virtual machine. Maybe that's what you want to do. That will probably be a different video Now what I'm going to show you is how to take individual hard drives off of a controller and pass them directly into the VM Now the use case for doing this is frequently probably Free NAS. I think that's the most common question I get about this But any time you want to test any type of system that requires or really recommends direct access direct read write access to the Hard drive not going through the hypervisor where you add overhead add a potential problems latency or compatibility issues You want direct read write at the hardware level. Well, you just pass that hardware through There's a few reasons whether you're doing it directly to the hard drive or directly controller You may or may not want to do this one from a virtualization standpoint Although it may work and it does give you the enhanced speed because there's you're removing one layer But the other side is for failover would be an example Even if you had two identical servers that hard drive lives in only one of them So whether that hard drive or controller that you've chose to pass through Once you've set that up and attached it You can't just take that and drop it on another server because you'd have to physically move all the hard drives as well Just a couple things to note the final thing I will note is when you pass hard drives through because Xcp and G can see them, but can't control them This breaks snapshotting And this is a problem other hypervisors suffer as well where snapshotting may not be available Because it tries to snapshot drives that it doesn't have control over because they're passed through So just a couple prerequisites a couple things to note when you're doing this that those could be problems But for labs and testing purposes This is definitely a easy fun way to do this and it's not that hard. It is not exposed in the UI here though So I'm running Zen Orchestra here version 553 along with Xcp and G version 8 so Up-to-date system as of right now jingary 2020 8.0 GPL and we're gonna go over here to storage And there is no other than this removable local storage set up on here We have this a dozer and this one are both running separately on a physically separate server running free NAS That's how attached to the NFS share and an ice because you share and On here we have this host Sorry virtual machine Debian and this is the Debian server We're going to be passing the drives through currently has just one disk and it's set up on that NFS share And here we are logged into it and LS BLK shows the block devices attached in right here This is it one drive, but if we go here Lots of drives not doing anything right now, but I don't want to give them all to that VM we're just gonna pick a couple of them to give to the VM and By the way past she's pretty straightforward and pretty easy to do now first thing to note is you can see that SDI has var log on it and other things on there Definitely don't want to use that one because that's actually what Xcp and G itself is running on so you do have to make sure that you know that the disks that are on there are Not in use and we're gonna do SDA so sue cbf disk slash dev SDA You can see there's nothing but free space on there, which is great We'll do STB free space Well, there's a GPT partition from another demo I did so I'm gonna head and just delete it because I don't want anything on The drive now you think it's on the drive will pass through so that is an option if you wanted to pass it through Take an existing hard drive that had information on it and pass it through this is another scenario Well, this would work perfectly fine. You just take it and pass it through once, you know what the idea is Now first step in the process we got to go here to see SRV And there's nothing in here right now. It's blank. So we're gonna make it directory where call it pass drives Call it whatever you want. This is just easy for me make their pass drives CD pass drives Now we have to create a storage repository You can create storage repositories in Sensor over here when you go to storage, but it does not have an option That would allow you to create because it does local But then it's the hypervisor controlling it. You're not actually passing a drive through It's gonna create it and create a one a place for you to deposit all those VDIs and virtual machines Go back over here to storage And we're gonna do something a little bit different. We're gonna create a very special one Let's copy and paste the command out. This will be located The details of the commands will be linked to a forum post and a forum post will be linked back to this video So if you don't want to try and write down the commands, you'll find them in the forum post linked below So Xe SR create so we want to create we call the label is pass underscore drives type Udev Content type disk device config location SRV pass drives So what this does? Creates a storage repository with this you ID it create generates a new one each time and now when we look over here Right, there's pass drives shows right up So no problem, but there's no distance yet So if we hit rescan, it's not gonna find anything because there's nothing to find Now here comes the really easy part for linking each of the distance here LN dash s now I'm in just to point this out when you do a symbolic link if you're in the same directory You can just type it like this LN dash s slash dev sd a press center And what that did was created a symbolic link sd a to dev slash sd a Now if we go back over here Rescan There's one hard drive now. It has no awareness of what's on that hard drive So it says zero bytes free because well, it doesn't understand it and it's not going to but at least it can see it So we have a methodology of knowing that the hard drive is in there And we'll just up here again. We'll do the See now we have three symbolic links in there Just hit rescan. Hey, look all the drives are there. How do you attach them? Well, a couple things about attaching them one I probably should have named them first, but we'll go ahead and name them right now You should make sure For your sanity sake that you give these names to know what they are related to where they are in the system So let's say, you know that you added sda first and sdb and then this guy was cuz he ID for Sdc and the reason I say this is if you ever have a hard drive go bad You're not sure which one it is If you at least know where they are and maybe make some labels and make reference to them Just pre thoughts on theirs. I've had people trying to sort out things in post when they've had something fail So now we have the three drives. We've named them. They have this name here We can put the serial number in there if we wanted to get more specific you could dive in however you want But let's go over here to the VM And even with this VM running and it does have those end tools installed in it We're gonna go ahead and attach a disc and go back over to show you real quick here here And we only have this one drive attached. So, you know, if we the LS BLK it lists out this one X VDA And then the partitions one two and five here and the volume groups So we go ahead and attach disc Scroll down and there's those ones SDA pass drive. So this is the storage It thinks there's nothing free because it can't see inside of it. All right. Now the drive is attached so well, we go in here and list it real quick and Just up arrow. We've gained another disc So let's go ahead and attach the other ones just for good measure STB and Scroll down and find STC here. All right. Now all the drives are attached. You can see the size of hard drive But like I said, he can't see what's in them. So go here now. We have three drives now We can do whatever we want with these drives. We can CF disc Dev X B D Be and this is where things may get a little bit more confusing because this already had one Virtualized disc pass through and then several real disc pass through it They started at DC and E versus the way it was labeled over in X C P and G So once again, you start to see where these alignments can happen to where you may be confused Which disc is which if you have or have one that has a problem But from here, we could format do whatever we want to these this they show up with the free space in here we can However, you want to do it create a new partition Format them they work like any other drive from here and now now like I said, this works with whatever hyperbite with the hypervisor And then you nest in whatever you want. So let's say free nas for example, and you want to create ZFS you would then Ideally you would install free nas itself the install instead of a USB like you would normally on a hardware device install a small virtual hard drive but then pass through all the hard drives that you want ZFS and to be part of the ZFS pool on with Free nas and it would be that simple to do In the case of this if you wanted to build a raid array within here because this particular System running Linux and I want to build a raid array out of it. Cool. I take those drives now I've done this and like I said really for lab This isn't something as much for production due to the fact of the snapshotting problem And well, it doesn't make it good for failover because it's tied to this machine now but it it definitely is a pretty straightforward way to do this if you want to attach drives directly to the system and I will show you how to remove them. So let's go ahead and it was shut down this VMs. You don't need it anymore And we'll go here This shut off. So it's just disconnected. We'll forget forget forget Actually, we should just probably just remove this. I don't even need this whole VM anymore That one's deleted and we're going to go over here to storages past drives And we're gonna say disconnect from all hosts And then we're just going to Forget it. It's gone. Then we go back over here to our System here, which it still exists here and then I just RM star Remove symbolic link Yes, and I could have just done this but you know good old RM dash RF and past drives Done it's back to the way we started so the storage processor is gone So I've used this a lot of times for testing That's why some of the drives were in there like I said, but it's pretty straightforward to do you just do this You know the XES are creating. I guess I'll leave a link to the forum post to the command I used to do this It's pretty straightforward And I'll do a separate video because I know people have been asking about this about how to pass things through such as the Whole controller. I'll do that separate videos I need to set up a separate machine for that because I do use some of these drives for other reasons alright and thanks And thank you for making it to the end of the video if you like this video Please give it a thumbs up if you'd like to see more content from the channel hit the subscribe button and hit the bell icon If you like YouTube to notify you when new videos come out If you'd like to hire us head over to Lawrence systems calm fill out our contact page and Let us know what we can help you with and what projects you'd like us to work together on if you want to carry on the Discussion head over to forums that Lawrence systems calm where we can carry on the discussion about this video other Videos or other tech topics in general even suggestions for new videos They're accepted right there on our forums, which are free Also, if you like to help the channel in other ways head over to our affiliate page We have a lot of great tech offers for you and once again, thanks for watching and see you next time