FINALLY! NVMe SSDs on the Raspberry Pi

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
finally Raspberry Pi users can get rid of flaky micro SD cards and boot off of nvme ssds using a hat like this this is the Hat Drive top Edition from Pineberry pie and I'd like to thank them for sending this as well as the Hat Drive BM1 or the Hat Drive bottom that goes underneath the Raspberry Pi these two boards allow you to put an nvme SSD which can be much more reliable and much faster on a Raspberry Pi 5 using its PCI Express connection that's this little connector on the Raspberry Pi 5 now a lot of people are asking me uh does this fit in a Raspberry Pi 5 case and the answer to that is yes it will now this is not the actual final production Hardware this is a prototype that they sent me to test and if I pop that on there it fits just inside of this little case if you remove the fan from this case there's normally a fan there the problem is that when you put all this together there's not much ventilation so I don't really recommend that it will fit and it will run but it will probably throttle somewhat so instead I have over here my other Raspberry Pi 5 and it has an active cooler on top and this is not the actual Hardware that we'll be shipping this is just my little janky setup but if you put this on top uh it will it will hold it off of the pie enough so that there's air flow into the active cooler so the way that this works is you put an nvme SSD on top top uh this is a maker dis from cyron they sent me this like a year or two ago I've never actually tested it uh but I did format it so it's it's empty right now you put this in and you put this on top of the pie and then you connect one of these little cables now this is called an FPC or F FFC uh flat flexible circuit board cable it's literally a circuit board but it's very flat and it's flexible that's why they call it that this is an impedance controlled one you can see that there's different Trace widths and uh it has some shielding the one that I was using in my early testing of the Raspberry Pi is not impedance controlled so I had some issues with signaling and uh so this cable is very handy they also make a 100 mm version of this cable uh but one thing to keep in mind if you're buying any of these kind of things is orientation matters very much here so there's a little arrow on the cable and I don't believe there's an arrow on the Raspberry Pi 5 uh but there is an arrow on this board so when you're installing the cable you want to line up the those little itty bitty triangles but the first thing I want to do is put Raspberry Pi OS on here so I can boot from it raspberry pies don't come with bootable EnV by default you have to kind of enable that so I'll show you how to do that so this Raspberry Pi 5 already has a Micro SD card with Raspberry Pi OS on it so I'm going to boot that up too but first let's flash this in Raspberry Pi imager on my computer I have this little USB I call it the the puck it's like a little puck that I can put this nvme drive in and it's nice to have uh but you can pop this in and I'm going to plug it into my Mac using whoa this is the kind of thing that I edit out if I'm scripting a video but I'll leave it in for your enjoyment when you're trying to work one-handed it's not always that fun okay there we go it's plugged in and up here if I open up imager I should be able to choose an OS and I'm going to choose my pre-downloaded copy of raspberry pios and then choose a storage device so I'll choose that and write and I'll just save the settings that I had before so I'm going to write this no yes and touch ID there we go so it's going to write that image to the nvme and while it's doing that we'll set up the Raspberry Pi so I'm going to go ahead and turn this guy on which I need a power cable if you don't have power you're not going to get anything so let's plug it in like so and I'll show you how to set up the rice spray pi5 for PCI Express devices specifically nvme ssds quick editor note about power it's important that you use the Raspberry Pi power adapter or something equivalent that's going to supply enough power uh because this hat is going to use the power from the pi and it should use around 5 Watts there's actually a power measurement circuit on the Hat there's not one on the one on the bottom but there's one on the hat so you can monitor the power usage of the uh the nvme SSD that you plug in the drives that I've tested have all worked fine but make sure you follow the issue that's Linked In the description uh where I'm testing these things because there might be some drives that don't work as well if they require too much power for the pi to supply to it so we just finished writing that file writing the Raspberry Pi OS to the nvme SSD so I'll pop that out from my computer and get ready to put it on the pi and then I'm going to log into the Raspberry Pi that I just booted up and I'm going to run the command uh P sudo rpy eom config D- edit now if you want a guide for this I do have a guide on my website it's the nvme SSD boot with the Raspberry Pi 5 guide I will link it in the description so you don't have to sit there and like try to type all the commands as you see them on the screen but that's this command it's going to edit the eom so that we can tell it hey boot from nvme if if it exists the key is that we want to change this boot order command to have six at the end that's going to tell the Raspberry Pi first try booting off the nvme drive then try micro SD then try USB so we're going to edit this go down here and put six right there and then hit control o just to write the file and then contrl X and then now it's going to say please reboot to apply this update so I'm going to say pseudo reboot and it's applied that so the next step is we need to get the hat and the nvme installed on the Raspberry Pi 5 so I'm going to wait for it to boot up and I'm going to shut it down so we're booted back up and if I go back up to the eom and look at it it saved it as 416 so we know we're good to go I'm going to exit out of here and shut it down Pudo shut down now now to get this hat installed I'm going to disconnect power because I don't want to accidentally short anything out here so I'll unplug that and then the final hardware version the production they ship will have the right standoffs and everything I don't have them so I'm literally just setting it here I don't recommend doing that I need to put this flexible printed circuit board right here and these gold these gold pins need to face towards the p and this Arrow needs to be towards the power side of the pie or you can line it up on the hat right here the key with these cables is to get them in all the way if you don't you're going to have signal issues so I pull up on this little latch and I wiggle this a little bit to make sure it's in there nicely and and then I gently push down until it kind of Pops in now this cable is in and now I can put the Hat up here and work on this part so I'm going to do the same thing here making sure that this Arrow lines up and this little this little tab you lift it up to let it go put in the wire there we go it's in and again I I kind of Wiggle things a little bit to make sure I'm in nicely and you might need to go in and out a couple times to just to make sure that it's all straight and then push down on the latch that latches that in and that's all you need for this board and like I said the production version will be a little more secure than this follow the instructions that uh Pineberry gives you I'm going to put the SSD that I just flashed on the computer in here and I'm going to go ahead and take out the micro SD card you don't actually need to do this because it should boot off of here anyway but I'm going to do that just uh just to swing for the fences now let's plug in power and we'll see what happens so that was the first Boot and then it's going to reboot and resize the the disc partition but now it's doing its boot and then it's going to shut down again and boot up again and then it should be up and running and this time it should boot up and get to the pi desktop and there it is we're booting off that nvma SSD and I'm going to do a little Benchmark just to see how fast this particular SSD is now this is a PCI Express gen 3x2 SSD so we should be able to get a lot of speed out of it if we can kind of overclock PCI Express go to the Gen 3 speeds instead of Gen 2 okay so I'm going to log into this thing I just flashed it yes I'll accept that host key and if I do lsblk it should show that there's just an nvme drive now if I had the MicroSD card in there you'd still see that too uh but I'm going to run a benchmark on the nvme that I'm booting off of to see how it how Gen 2 and gen 3 speeds compare so I'm going to go to Pi benchmarks comom and this is a nice Benchmark to run on any storage device on Raspberry Pi just to get a point of comparison okay description is cyon maker dis okay so we got a score of 31 702 I don't know how that score is calculated but basically we have uh you know 350 to 400 megab per second maximum right speeds now if I say PSE sudon Nano boot config.txt this is where you can change the PCI Express settings so I'm going to go back to my blog post and you can see up here is where the uh the PCI Express generation settings now this is an interesting thing if you boot off an nvme drive you don't actually have to have this first line but if you boot off of a micro SD card you have to put this line in to enable that external Port so if you just want to use an NVM drive for storage you can put this or this and uh that that enables the external PCI Express uh but if you boot off an nvme it it just automatically knows that so that's an interesting thing I I don't know why it's not enabled by default maybe it will be someday and uh this whole discussion that I just had with you will be moot but I'm going to put that in there anyway uh just because I like belt and suspenders um and then we're going to change the generation to three uh so I'm going to write this file and exit and I'll show you if I say pseudo LS PCI vvvv this is how you find out all the information about PCI Express devices so up here this is our nvme Drive NVM Express right here and if we look at link status link status is this it says speed 5 Gat transfers per second downgraded by one downgraded so it's the drive is actually a PCI Express gen 3x 2 drive so it could do a lot more bandwidth we're going to try to get it to PCI Express gen 3x one which the the pi supports well hopefully it supports which should be 8 Gat transfers per second so let's try that out uh we'll say pseudo reboot and the pi looks like it rebooted so I'm going to log back in lspci uh we'll do pseudo lspci vvvv and go up to the nvme drive which is right here link status 8 gig transfers per second it's still downgraded because now it's by one and the drive could do by two but this should be faster so let us run that Benchmark again we'll do this and we'll call it uh cyon maker dis and now we can see the score is a bit higher uh you know PCI Express Gen 2 versus gen 3 isn't going to magically make everything so much faster but throughput can be much faster so we're getting 776 megabytes per second on this drive I've gotten up to around 900 megabytes per second on faster NV ssds so you get a lot more performance when you're doing large file copies and things so yeah it's pretty awesome that you can do this and uh one other thing to watch for if you're experimenting with different PCI Express devices is you can look into dsage and you can follow the log and if there are any errors they'll start popping up in D message so luckily I'm not seeing any errors at all even though I just did a bunch of file copies so it looks like this uh cable and this board are doing a good job with that so finally we are freed from the Restriction of micro SD cards and uh you can run any nvme SSD the Hat Drive top allows you do 2230 and 2242 like this one and the half Drive bottom which I haven't gotten around to a lot of testing it I just plugged it in made sure it worked um it will allow you to do 2280 which are much more common and you can get a lot more high performance nvme ssds even if they're PCI gen 3 it's going to be great for a Raspberry Pi so another thing that you can do with these is actually adapt them to other PCI Express devices so I'm going to be doing a lot of fun Exploration with PCI Express on the Raspberry Pi 5 including this for those who know what this is uh so stay tuned and make sure you follow my Pi PCI Express database on the uh on GitHub and on the website to see all the things that I'm testing and to follow the community as they're testing things like graphics cards and tpus for AI and machine learning and frig and stuff lots of cool stuff storage controllers and till next time I'm Jeff Kling
Info
Channel: Jeff Geerling
Views: 400,611
Rating: undefined out of 5
Keywords: raspberry pi, nvme, ssd, pcie, pci, express, pineberry pi, hat, hardware, attached, on, top, bottom, hab, expansion, speed, stability, storage, adapter, gen 2, gen 3, config, boot, eeprom, bootloader, edit, configure, setup, tutorial, howto, guide, performance, benchmark, pi, sbc, linux, format, flash, pi os, debian, process, header, ffc, fpc, impedance, controlled, matched, high speed, shielding, accessory, addon
Id: EXWu4SUsaY8
Channel Id: undefined
Length: 13min 31sec (811 seconds)
Published: Fri Nov 17 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.