Ultimate Pi Storage: Setting Up a Raspberry Pi 5 NAS with Pimoroni NVMe Base

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey robot makers do you want to learn how to set up an nvme drive on a raspby pi 5 with a Pimon bass then this and and create the ultimate Nas I should add then this is the show for you so let's di straight in my name is Kevin come with me we build robots and bring them to life with code and have a whole load of fun along the way okay let's get to our show turn down the volume of my notifications there because they always seem to getting the way there so we're going to do things a little bit differently this week uh we're going to go through how to install this uh uh Pimon base the nvme base with a brand new mvme Drive uh but we're going to do this kind of first we normally do the demos kind of after all the showand tell stuff we're going to actually properly show it this time and that's simply because when we get to the bit where we install the OS it might take a little bit of time so therefore if we just mix up the order um it won't take forever while you just watching a progress bar to complete so what we're going to cover at Today's Show we're going to learn how to install an nvme drive and set up a Nas with um with samb lots of acronyms and words there that we'll explain in the show so we're going to explain what an nvme Drive is what those letters stand for what it can do what it can do better than USB drive for example to look at how to install the Pimon nvme base which is a brand new board which goes underneath the Raspberry Pi uh we're going to install the Raspberry Pi OS so that actually boots from the mvme drive and then we're going to set up some file sharing with samb which is a file sharing system for Raspberry Pi and Linux and then we'll have the usual live stream Q&A mailbox at the end of the show as well okay so like I said we're going to do this a little bit differently this week we're going to actually go to the demo straight away and that's just so that we can uh get the installer going and then look at some other bits and pieces so over here on my my desk on the captain stap as I usually say on the pin videos it's got a nice little USB drive that I uh loaded the uh OS on just so that it's cached actually on this drive already that should save us a little bit of time so I've already got a Raspberry Pi 5 here here this one is um a pinebury p hat um and you can see there this has got one TB drive on it and uh this one fits quite neatly into the the official Raspberry Pi case so you can just see the little connector there that connects into the PCI E um bus there so that one's already set up we're actually going to do a fresh install I've got a Rasberry Pi 5 here that's running if I go over to my overhead uh there for example uh this is actually the the Raspberry Pi five up and running if we go to the let's just go to the terminal and if we just do a DF DH that shows us our dis full and you can see there we've got um 18 gigs free at the moment we're using um probably just a couple of gig on this drive it's quite a fresh Drive there's not very much going on there so that's essentially just one um probably a 32 gig card the SD card okay so let's get back over to our overhead so what I'm going to do I'm actually G to unplug the keyboard the network cable the power and the video just so that we've got the drive nice and accessible it's quite warm that and uh we're going to install the the base which is actually going to go on the underside you can just see the SD card there has 32 gig and uh that's the pcie connector that we're going to be connecting the drive to as well so got a couple of things here to look at we have the pimr nvme base it is uh being shipped out to people now as I understand there's the the actual circuit board and then we get a few other bits and pieces in here a very important little cable which is the one that's going to go between the the board and the the Raspberry Pi that's everything out to that bag and we've got this nvme base which you can see there's a circuit board it's got two important things that's the connector that's going to connect to the rasby pi 5 and this is going to connect to the the nvme drive itself and then there's a number of holes with some markings on there for different sizes we'll talk about that shortly and we've also got the four Moun holes for the uh the pie to connect to underneath we've also got some nice little rubber feet and we've got a packet of screws and nuts and things so I'm just going to tip these out just so that I can easily get at them so we also have here the nvme drive itself this one is a 1 tbte Drive did open this before just to check everything that worked okay I've not installed anything on it just yet so going to be very careful not to touch those uh those Edge connectors that are just there if I just hold this up to the camera you can just see though there's uh about five little connectors and then there's a whole bunch of other ones so that little Gap there helps us Orient on the drive where this is actually going to connect into so I've gone and earthed myself already so the first thing you normally do is you angle this um as you push it in and that just helps it sort of key into place and you can see there it sort of flaps about a little bit so there's this little Half Moon kind of um area here what we want to do is we want to put a screw through that so one of these nuts is um nuts and bolts one of them is slightly longer than the rest so what I'm going to do yeah this is going to be an episode where I drop a lot of stuff so we we need to build that uh drop counter don't we so what I'm going to do is just put one of these little nuts to hold that in place there also see the beautiful artwork on the back of the drive there nvme base for Raspberry Pi now some of these have a a typ one I think the early ones have a they have no um is it no B so it says raspberry so if you got one of those that's probably a collector's item that right so that's now screwed in that's not going anywhere that drive is now connected to this uh this base so the next thing we need to do is quite a quick thing to do so I'm just going to push these little screws through the hole get these standoffs which of these little hexagonal nuts and just quickly push these into place so I think Paul has done a really nice video on pyron's website of how to set these up so when you're buying them you can see in sort of slow time all the uh the thoughts from the people that actually made this so I'm just trying to rush to put this together so that we can start to install the OS on it and then we can move to the interesting part where we set up the nas so I've just installed those four standoffs on the the base there we go like so and what we can now do is there's this little connector that's just here and this is let just get that to focus and this has got a little hinge on it so if I just very gently prize up you can see that it sort of moves around as a little hinge and we can get this and we can put this so that the the sort of shiny side down that's going to push into the into the little connectors there and then we just just push push that down into place very gently so it don't break it and now that's uh that's secured into place just going to make sure that's sat nicely there we go I think just moved ever so slightly as I moved it right so that's now locked into place you can see now uh that's what the half finished article looks like so what we're then going to do is get our Raspberry Pi 5 and we're going to just line up the drive and the pi now the easiest way to install this now is to get your Pi five and very gently just nudge that up so that's open I've broken so many of these on the uh camera modules just by being a bit too un careful with them so once you pull that back just make sure that this is it'll go the right way around there we go so this is going to connect with the the shiny side pointing to the USB drives let's just push this into place this is pull the the toughest bit of the video when you're trying to do it and get everything in shot so I'm just going to push that connector into the drive and then once that's in we then just press those I was trying to Google what these things are actually called cable locks cable clips this bit that I'm pushing in at the moment what is it actually called right now that that's there we can swing that round like so so you can now see that's uh connected up it's kind of goes a little angle which is quite cool and now we can finish off the install by just putting these screws into place so put a screwdriver just here there we go and let's just do the other one there we go just for completeness I'll do the rest of them so obviously this means that it's not going to fit nicely in the the Raspberry Pi official case but it does mean that we can put any of the uh the things into the um the pin headers there so it's not getting in the way of that which they got around that on the pinebury pi one simply by having um it actually extra headers on the hat itself but it does mean that that's quite um quite tall now but they did engineer it so it goes in the official case which is quite neat right there we go got this Screwdriver from maplin and look what my dog did to it that's mini you found it and chewed it it's my favorite screwdriver okay so that is the the drive ready to go so what I'm going to do now I'm going to leave the the SD card in place for now so that's still in there you can just see the SD card and I'm just going to plug in some power I'm just going to se in here just so that it doesn't short anything out um we can see now it doesn't fit nicely into the the case anymore so let's just plug in all the USB things first let's plug in the video this is going to my capture card and let's plug in some power okay we should see that uh spin up in a second if I've done everything correct yep there we go and if I now go over to um let's go back I'll go back to me and then I shall press this button here yes you can see up in there that corner of the screen there that's the video from uh the actual Raspberry Pi booting G so it's booted up quite nicely there okay so actually I can go over to that now full screen like so so I've got a couple of I've got Wi-Fi and I've also got that ethernet cable plugged in and I'm capturing the video by um a capture card just so that we can see what's going on so the first thing I'm going to do now I'm just going to click on accessories imager and then I'm going to load up um the operating system onto this new drive so I'm going to choose the OS which is the 64-bit one and I'm going to choose the storage so if we can't see the storage there that means that we need to make some changes the easiest thing to do is to do um a pseudo appt update I'll show you what that looks like so we open up a a window if we do pseudo apt not spy apt update that should bring on the the latest versions of all the uh the files and if you do a pseudo apt upgrade any files that need to be installed will then get suggested I've already done this before the show and giving it a reboot as well so that it has the latest firmware ready to go so that's the drive you can see one tbyte I'm going to click next um let's edit some settings so let's set the host name to be let's call this one Devo 2 and let's set a username and password let's set a password there let's configure our wireless LAN so type a password in there as well and let's set a local as well why not let look at these Services is there anything that we need to set in there yes let's definitely enable SSH that helps us log in and let's have a look at the options that's fine okay let's click that and let's apply those customizations let's initialize and arrays and we just need the password which is the password of this pi I think that's it there we go right so that's going to take a little while for that to do so while it does that I'm just going to come back over to our slides and we're going to have a look in slow time about some of those things that we've just covered because um this is the bit that takes the longest time and there's nothing I can do to speed that up so what is nvme you might have heard this term and just taken it for granted that's what it's called it actually stands for nonvolatile Memory Express so the express is a bit like PCI Express that's where they they've stallen that term from so this refers to memory that retains data even when the power is turned off so if you think about regular Ram that you have in your computer as soon as you switch that off the ram gets erased all the programs that running disappear so if you've not saved something to permanent storage you will lose that so nvme is nonvolatile it will stay once you've turned the power off that's essentially what that means and the express part like we said is borrowed from PCI Express which is what we're actually using to connect this to the rasby pi 5 and that's a very highspeed peripheral component interconnect uh the express version highspeed interface for common computers so just having a quick look at some comments about the the bandwidth so hopefully that will recover shortly I can just see that some people are getting dropped down it'll probably buffer for a little moment and you'll just have to uh to just pause it and let it catch up if you just refresh your browser as well that also helps for people watching this live so yes mvme was specifically designed to unleash the potential of solid state drives which were a bottleneck for Alit interfaces such as s and that was designed for slower spinning drives where you could actually waste a bit of time for a cache to fill up um with these kind of drives it's so fast this no longer becomes the bottleneck the bottleneck was actually the the uh interface itself so what is mvme there's a few different standards for this um the usually are built into the SSD drive itself um in these cases with the mvme they just have the connector at the end and that most common connector is this m.2 connector um so they are very small very Compact and that's why you'll find them in things like laptops and uh uh personal computers as well U2 is the um the pop poop but it's also a name for a standard of a slightly larger mvme Drive the ssds uh and these are often found in Enterprise and server environments as well so they're sort of physically similar to the 2.5 SATA drives but a different connector for that high-speed performance the then you've got the pcie adding cards uh these are usually just called AIC cards or AIC the card at the end would be redundant I guess uh these are fulls side cards that slot into your motherboard of your computer via a pcie slot and then we have this NF1 which is a Next Generation form factor as well and again that's designed for servers and data center usage so each form factor is designed for a specific use case most commonly you'll find uh in our kind of hobbyist and uh desktop consumer space is the m 2 oops thanks Vince Vince has just become a member there uh thank you very much for that I'm just going to switch off the stream elements just for a moment just so that we can uh do the main part of the show I'll switch them back on when we get to the uh the the Q&A section so there a naming convention you'll see that these nvme drives have a name which is four numbers usually so these are actually the dimensions of the board a bit like 18650 batteries are actually uh to do with the dimensions of the battery it's the exact same thing with nvme Drive as well so 2230 would be the 22 mm by 30 mm size I think we in using the 2242 for this particular show um you can see that's quite a small size just about the right kind of size for a Raspberry Pi but you can go up to the 2280 on the Pimon board as well they support quite a few of the sizes I think there's about four or five sizes that they support there okay let's go to the next one there so installing the nvmi drive nvme drive on the rasby pi5 you've seen it's quite simple straightforward to do so there's four steps to this we're going to install the mvme drive on the um the board we're going to install the OS onto the um the nvme drive with the imager which is what we're doing currently you have a quick look and see how that's going so I just SW over to there you can see just need to uh type in the password there perfect so that one is ready for us in a moment when we we finished our main slid which is good to know uh so once we've done the installing of the rasb pi OS onto the mvme drive we then need to change the boot order because if we don't do that it'll still try and boot from the the uh SD card or the USB connector or the network and there's a sequence of those so what we want to do is bump up the envme drive to be the first one that it is an option to boot from then we can remove the SD card completely and that means we can then have all that speed and power of the and capacity of that mvme drive so unpacking the base as you've seen this quite straightforward we have this nice PCB board with two connectors on it there and a bunch of holes which we've uh used to connect to our rasb PI 5 underneath uh as I said as I was unpackaging it make sure you Earth yourself if you have a computer with like a metal case like a Mac for example you know just touch the metal um just to make sure you're earthed yourself but if you have any kind of static electricity that you've been um generating as you're moving around by your clothing or just by picking up from other objects that can actually get transferred to the memory and damages it it essentially gives it electric shock and can damage it so you don't want to touch the edge connectors really try and handle it very carefully if you can H yourself do that first so next up you'll see this this little slot um that along the one side of the mvme drive the little Notch that Keys it into place make sure you get that the right way round and that you are putting the drive in the correct way don't try and force this or if you've bought an mvme drive that's the wrong size for the board you'll notice when the notch doesn't quite um align properly that probably means you bought the wrong one so you probably need to speak to your supplier about that if that happens um so you want to put it at a slight angle I did about what 30° and then pushed it down and then there's a little retaining screw and on this case there was also a nut that we attached underneath and that meant that that could then be secured into place um and that just means that the drive isn't going to pop out if you move it the the pie around uh and it means all the connections are sort of electrically sound next we installed all those standoffs so there's a couple of screws it does actually come with some longer screws um so this is in the the Pimon um MVB Basse pack as you can see theyve got these longer screws I think they're about 12 mm something like that or they have the short ones depending how you want to um configure your pie if you've got something else that this is going to screw onto there's um um rather than having two screws going into the standoff you could have one long one go all the way through and then have something else that the connects to the pie on top so if you got a hat for example that needs some standoffs you could have kind of layers and layers of sand sandwich together like a Big Mac of standoffs uh so they just securely lift the uh the Raspberry Pi above the base and allow some air through and a kind of solid physical uh connection all the way around so once we've done that we can put the little screws in in our case this is what we wanted to do um so that the Raspberry Pi 5 is held into place as well once we've done that we can then attach that little cable that's probably the fiddlestx it wasn't too hard you saw me do it just then uh and this is I was saying about those little cable clip connectors so you need to sort of prize that one it opens up like a like that from the Basse on the the the Pimon bass the mvme bass um but other ones I think the pine Pi one that one I can't remember what that one did actually I think that's the same that one also hinges up as well just makes a nice connection so don't force them just very very gentle with the the can snap very easily and then that's it it's very difficult to actually replace that because it's part of the the plastic that's attached to the motherboard the attached to the PCB so once we've done that we can then um close that lock it into place and then your your cable is not going to go anywhere and you've got a nice solid connection there so next we need to change the boot order so we're going to do that right now we're going to run this RPI - eom-cc config and then space- e that's going to edit it and then we simply need to change this boot order and add a number six to the end of it so let's do that now let's go back over to um our rasby PI 5 which is just finished it says we can now remove the SD card from the reader in this case it's actually the the mvme um thing the card that is in there already so what we want to do now is run that RPI uh eom I think it was config and then space- e uh oops and then we need to run this as root let's do pseudo there and we've already got boot order there so I'm just going to add the number six to the end that's actually a hexadecimal value there that f416 uh and that's actually the sequence of which the drive is going to boot in so once we've done that I can do controll and X yes to save the buffer return and you can see there now it says there are pending updates and what we need to do now is just do init six um in fact we could do instead if I go to the overhead camera uh what we can actually do instead is is press the power button press and hold it you now see that the the machine is now shutting down if I go back to the overhead camera you can see now it's now powering off there we go and it's now completely powered off so what I can now do is I can remove that SD card I can do this without damaging it there we go so that's now taken out and if we now power the P back up and head back over to the overhead we should see in a second that this will now power up and everything hopefully should work okay just give me a bit of a flashy light there that doesn't look good let me just have a quick check and see what's going on there just power that off so I think red means bad so let me just power this off for a second and then power that back up let's do that so if I go to the overhead just so you can see what I'm actually doing there so I'm just going to power this back on like so if I do that there we go we should be able to see everything that's going on at the same time you can kind of see me leaning over there we go that sounds that feels better the fan has come on not sure why it's uh messed up for a second I'm just going to let that there we go if we now go back over to to the overhead we can see now so what it say failed to open SD card which we know but it isn't booting from the drive importantly so let's just see what it says there boot mode USB so I think I know what's going on here so let me just go back to the main camera um I'm going to put the SD card back in so I'm just going to unplug the power on here here I just want to show you what I'm actually doing there so you can see going to pull the SD card back in so we can actually boot from that just to finish the job off I think there might be an update that we need to run or something that we need to back in Focus there we go uh we might just need to do that bias update some drives need this others don't need this at all so uh let's just wait for that to power up just press that on there we go look the power in that helps there we go just press the power on and I wanted to show you any kind of thing that happens like this because this is what today's show is about it's actually getting this thing to work because some drives are different this uh Pineberry P one I didn't need to do any kind of fancy update for that that one simply just plugged in and Away went and it was F fine um so just going to wait for this to boot up it's quite quick to boot off the SD card anyway so we're not going to be waiting around too long okay let's just see what it comes up with there and while it's doing that I'm just going to back to our show notes for a second so we did the pseudo RPI eom config - e um what we'll now do is just have a look and see if there's an extra command that we need to run um to get this to work so I'm just going to go back over to the Pimon website and just check on anything else that we need to do uh to get this up and running I'm pretty sure it's the same actually so there we go so I think if I go to I go to there now yep so the P's booted up okay so let's go and have a look and see what we need to do next so I'm going to open up a terminal and I'm just going to run that command again where we did the uh PSE sudo RPI dasom Dash and then it was config was it update it was update - e okay so I did config d e and this is now update d e so what that will do is actually force that any any updates that are required will actually get updated there it's also saying there uh rosby Pi 4 for cm4 cm4 S and Pi 400 The Flash ROM updates are not enabled by default okay so there is some additional things that we can try that are on the raspber pi the Pimon website but I'm just going to try this now because I think by doing that update that will that'll get us where we need to be so I'm just going to let that uh to do its thing it's going to get back to me for a second because that looks uh ugly with all those bars on there looks like the YouTube Chanel channels crashed or something now you don't actually get a speed boost on boot time when you put an mvme Drive in surprisingly Because the actual delay of loading all the software into memory is um the sort of sequence of updates is actually part of the Raspberry Pi's update process so actually putting in a faster Drive doesn't actually make the the boot up faster but everything else is a lot faster right okay so I think we probably now have booted from that uh new drive so if we now go back over to the overhead which is now here let's have a check and see if I now do dis free Dash uh so we're now still booting from the Raspberry Pi's SD card so I'm going to try again by removing the SD card and seeing if there's any issues there I'm also going to see what that update is that it seems to think it's got there so I'm just going to let it install those I did actually do an update before so I'm not sure why that's the case so type in my password that it oops wrong one ah interesting so when I typed in the password then um that proves we're actually running off the the uh the brand new nvme drive so if we look on there nvme and look at the free space the V space available 887 gigs so that's actually telling us that we have the new Drive installed and we've actually booted up from it as well so that's a success um all I needed to do was do that um RPI update uh rather than the config so if we go back to that terminal for a second oops using the wrong Mouse there if we go back to that terminal I'm just going to type in the history so we can see what commands we've typed in there so I did the RPI - e-update d e u before I did uh config and config allowed us to edit the file so if I go back in there I can show you how to do this we go back in and we change that to be config d e we get the editor where we can actually edit changes and when you come out to this even if you say no um it will still say that they pending changes so there's a command there just on the bottom line that says if you want to actually get rid of these updates that you've just put in you can just do dasr to remove them so those temporary files have now been removed um that was just me demoing it so I think those um updates are probably nearly installed going to go back to our slides and once this is done we can then set up sber uh but that's that's good that means we can carry on with the show things are working as we expect them to great so we're now booting from our new nvme Drive so installing the Raspberry Pi OS on the mvma drive you saw that it's quite a straightforward process I'll just talk you through it now in a bit more slow time so the first thing we did we on the the booting from the SD card on the Raspberry Pi 5 running Raspberry Pi OS the latest version I went to the uh the pi menu accessories and then imager and imager booted up and uh we can have a look at what that looks like now there's three buttons on here essentially so the first thing we do is choose the device so this is a Raspberry Pi 5 so we selected the raspberry pi5 option the reason they've done this is to try and simplify the sort of tree of choices you need to go through to guide people into the correct OS for the for their um computer because if they have a Raspberry Pi 1 for example and they're trying to install the latest version of rasby pios on there the 64-bit version that won't work so they need the 32-bit version to prevent all those kinds of wrong choices being made they've added these extra steps so we're just going to choose the Raspberry Pi 5 um we're then going to choose the operator system so it'll say which OS version you want to install we're going to go for the 64-bit version the default one Bookworm uh this is the um December the 5th 2023 version of raspberry pios uh once we've selected that we can then choose that storage button I didn't have uh screenshots on this when I was uh doing um the test of this so I couldn't actually screen grab them to show you this uh so yes we choose the mvme drive you saw just on the video me doing that we click the next button and then it will download the Raspberry Pi OS and burn it onto the nvme drive once it's finished doing that um we can then um we can then do an extra step now it says on there you can turn off the drive remove the SD card but before we do that there is that actually that extra step and that was the changing of the boot order so I made a bit of a mistake on that one and you can see on here we do the pseudo RPI - eom-cc config space- E I think that's for edit that edits the configuration we can put that six on the the end of the boot order um and then once we've done that we can then just do the update command so the config command first and let's actually go in there and add the extra command that we needed to have on there cuz I missed that out I want this to be sort of complete so we had on there update as well there we go you saw the magic then behind the curtain so there we go that's the extra command that we needed to do so there's config to edit the file and update to actually make that happen so if you like what I do and you want me to grow the show more please make sure you give this video a like drop me a comment let me know if you have a Raspberry Pi 5 and if you're intending to get a hat or a bass or both on different machines let me know what your choice is and if you haven't subscribed to the channel already please do me a favor means an awful lot to me if you do this subscribe to the channel cost you absolutely nothing and it means you'll get notified when I do new new live streams and new videos and I do go live every single Sunday at 7:00 GMT um and you can join in the chat uh the end of the show as well so let's get to installing sber uh and setting up some file sharing this is really straightforward to do compared to the rest of the show so sambba is actually one of these backronyms uh SMB is the send message Block it's a protocol used to used by Windows machines initially uh to send files between each other it's quite an old protocol um but it's been picked up by the Unix crowd and also the Mac crowd they've also started using this they used to be all different types of file transfer protocol that we used like NFS for um the network filing system for Unix um Apple had their own AFP they had the Apple file sharing protocol they've all now just basically settled on the one that Microsoft developed years ago which is samb SMB so you can see down on the logo SMB with the A's in between uh that's where we get sber from just a piece of trivia there so what we need to do is we need to install uh the sambba and samb common binaries once we've done that we can then set up a uh folder that we can share we just need to change some file permissions on there and we do that with the CH mod which is like the um change mode of the file we we're basically saying plus r I think there should be a capital R um and that will basically recursively change any files that are in that folder already but we're going to create a new folder called share we're then going to share it 775 is a I think it's octal if you're interested rather than hexadecimal or binary and basically that sets the the three different types of permissions that you have in the Unix world you have World group and user and they're in sort of groups of three so we're going to do that so let's go back over to our raspby PI and let's um install sber and then set up a new folder to share so I'm just going to click on that so first of all we'll do um pseudo apt install samb and then there is Samba common Das bin I think so let's install that I'm just going to say yes this is where the the new Raspberry Pi 5 is so much quicker at installing things than the previous generations uh compared to the this is almost like two three times faster uh than the Raspberry Pi for installing things so satisfying to see how quick that is okay that's sber installed um so what we need to do now is we need to create so we'll do make directory a folder that's called share so we do LS4 list we can we can now see we've got a folder that's called share if I do ls- l it'll list it long and that will show the the file permissions that we have so these d stands for directory we got read write execute read write execute R write execute we've then got the the name of the owner um of the file as well so what we need to do is change that um the mode of the file which is these file permissions going to say- R for recursive we're going to say 775 and then the name of the folder that we want to change so we now do the ls- L again we'll see that now we've got some extra WR permissions for the group which we're missing from the uh the previous version so that's 775 essentially sets each one of those like so okay so what we need to do next we go to um our Etc SL sambar I think it is let's just list that yes we've got a sb.com so we need to edit that I'm going to do Nano um and then Etc um samb type in this unlocking at the screen at a funny angle that's why it's taking me a second to do that and then SMB conf okay and if I scroll down to the very bottom of this file it says it's unwritable so I just need to exit out of that and do pseudo at the very beginning of that that'll just help me write to there we go we can we can now write to the file because we're a super user the very bottom of this file I'm just going to add some extra bits and pieces into this so what we're going to do I'm just going to get this um on my screen so I can see it so if you want to follow along with this tutorial back over to me for a second I've actually written all this up on kevs robots.com uh so if I just show you what that looks like we can you'll be able to see what I'll be following along with so there's an article I think it's currently on the go to the blog section um how to install an mvme Drive um as a Nas server you can see there we've got uh how to set up samb on rasby Pi 5 there um so it's got all the different steps you need step by step so we basically just edited the uh the SMB file and basically we want to copy all of this now onto um that um that text file so I'm just going to load this up on another screen so I can see it and then I can do this and show you the same time right so I'm just going to go to that there we go right let's go back over to um the Raspberry Pi so I'm going to create a new section down here so we start out with the name of the share that we want to give it so I'm just going to call this one share use those square brackets to Encompass it and then we can give it a comment this appears kind of on the uh when you're s browsing the drive so we can say we'll call this one Pi share folder something like that okay we then need to say what the path of that folder is so path call and we need to give it the full path so home slash now on this particular pie my main user is called Kev if I go up to the terminal and just open up a new terminal and do the the command PWD which is like the current working directory you can see home Kev is where all my files live so I'm just going to move that let's move that up there for example so when I'm telling it where this shared folder is it's actually in home Kev and then share so next we need to say whether it's browsable so this means uh if you're looking from another computer like a Windows or a Mac computer um is this actually browsable so we're going to say yes we can then say is it writable yes um we can also say only guested now the idea of this is sometimes you might want to have like an anonymous folder uh that's only accessible to guests but not other people this isn't the case in this one we then have a thing called a mask so before when I set those um um o the 0775 they're the the file permissions the mask is essentially the file permissions when it's creating uh new files so create the ma the create mask looks like that and the directory mask oops type that correctly directory mask sorry typing on one computer at an a funny angle and looking back at my other instructions on the other screen screen so it's a bit awkward this and then public we can say yes the public is whether this is accessible by everyone or not and we can even say guest okay in this case we're going to be very permissive in this case and just let everyone access it right that's it I'm going to do contrl X to uh say I want to save the file yes I want to save it with the y key and then enter to exit out so that's now been added to our sambba configuration we also need to add in a user for our sambba so we do pseudo SMB pass pass WD and then we're going to do - A to add to this and I'm going to add the Kev user to this I'm going to create a new password type that password in again okay the the final thing we need to do is restart sber so the way that we do this we do sber system control CTL restart smbd which is the samb demon like so right if we now go over to a different computer so I'm going to go I'm going to go to the Mac I'm just going to find it and then show you on the screen uh we should be able to now discover this on our Network um so we called the machine Dev 2 didn't we yes so if I now go over to here these are a couple of machines you can see Alex's Network there Dev 2 is the one that we just created we can see we've got two shares we have share and we have Kev Kev is my home folder but also share is the one that we've just created so if we now create and we can see there almost a terabyte free which is good because that's uh what we uh created I can actually go back over to that Raspberry Pi computer I can use the touch command to uh create a file let's call it uh read me. text something like that and I'll go back over to um back over to my Mac like so and let's just see if I just go out of that and back in we should see that um read me file up here momentarily I don't know how quickly it Updates this I'll just resize the window and see if it'll it'll find that file um or not as the case may be maybe we just create something in here as well as test something like that so you can see that we can we can copy files across um I'll I'll copy a file in fact let's save let's think about this let's open up let's go open up a text editor and I'm just going to save a file um into the drive as well just so we could see that that works both directions so if I just go over to Here let do Hello World file save and then I'm going to save that as let's go down to Dev O2 into share and I'm going to call this one file from mac. text let's use RTF actually rich Tech format okay so that's now appeared there there so if I now go back over to the uh to the Raspberry Pi uh let's go back over to the Raspberry Pi there and let's do LS uh let's go into that's why that file didn't appear I wasn't actually in that correct folder if I just move that file MV read me. text let's move that into share and then let's do change directory to share that's why we could actually see that in there and then do LS we should now see ls- L we have the file from the Mac we've got the read me. text and we've got that test folder as well so that now means that uh the file sharing is now set up and we can now see that on the the Mac if I go back over to the Mac there um you can see now I'm connected to the share I can see that read me. text that we created um so hello back save that and let's just go okay and there we go so we've Now set up five file sharing and this means that we can connect to this from our phone so I show you my phone there basically you can go to the files app if you're on iOS you can find this on your network because it's kind of showing where it is you basically just even need to know the IP address of the Mac it's all it's already doing all that kind of broadcasting and stuff in the background as part of that SMB protocol so it actually works I'm so pleased I'm so pleased how simple that was to do now that might have gone over your head and that's why I've written up um of this information online so you can do this slowly in your own time so there's the configuration that we uh we added to that configuration file the SMB configuration file on our Raspberry Pi we created a new um header section which is what those square brackets are we created a new comment which was the pie shared folder we told it what path to share which is the home in my case Kev SL share and then we set the options you can just basically choose these default ones if you wish or if you want to know more about this you could basically just Google sber and un understand what all these different um settings actually mean but they're pretty permissive as their setup there and then we added the new user which was the SMB password d a and then in my case it was Kev rather than Pi but added my user account to the SMB um database of passwords that's allowed and therefore we could when we connected to over a network we're able to sort of see that shared drive automatically everything just worked so if you want to learn more about um robotics python Raspberry Pi I've got all kinds of courses all completely free ready for you to learn right away on Kev robots. Kev robots.com learn uh I've actually been updating Kev robots uh in the background adding a few more features to the website such as the new search facility um and I've also been uh tweaking some of the other things just to make it a bit more user friendly so head over to learn and you'll be able to get learning today if you want to get yourself one of these robot maker hats we have them in all different colors uh we've got t-shirts we've got mugs all kinds of good stuff and very soon we're still working out with our supply at the moment um for the shipping we've got the the robot makers Almanac and we have the maker notes they're going to be added to the store very soon as well so check out kez robots.com merch if you want to get yourself that and help support the show if you not already joined our Discord server you can head over to K robots.com Discord get yourself a sign up link there and join our growing Community it's really quite a large community now is it about 300 users I think are on there Alex it's quite um quite a lot of people um and occasionally dip in there myself um see what people have been do particularly if they're showing pictures of their robots if you want to follow me on social media I'm all over social media so you can find me at Kevin mle threads. net for threads on Tik Tok I'm Kevin malier 6 on Instagram I'm Kevin Mia on X I'm Kev kevmac on masterdon I'm kevmac masterdon doso and I'm also on Blue Sky at km. B.O as well you'll get some behind the scenes pictures videos all that kind of good stuff there as well if you want to get your name in the credits you can do that a number of different ways you can a super thanks a super chat you can join the YouTube membership program I'm actually going to switch back on the um stream elements thing there as well so we can get those overlays going as well so if you want to get any of those things you can go to k robots.com coffee buy me a physical coffee as a one-off if you like or if you want to join a membership program is to the same price of a coffee per month to help support the show and help me keep me in robots that I can keep uh making programs about okay so that's uh and there's a couple of supporters I also want to give a call out to right away so we have um people who bought coffees in the last month we' got Mar Louise Mayer who's on the show today we got Jason and we've got a new member today um Alvaro Diaz Gutman who joined the buy me a coffee membership program as well we've got Mary Louise we have Jeff Johnson Dean Cy Marin Brent Tom shmy and Steve Phillips and on the YouTube side we have Alis we John Paul Jolly Cassie Dale from hybrid robotics tinkering rocks JDM Johnny bit Bill Hoy arrad 39 cheer lights we've got hands from Cheer lights Michael and of course we have Tom as well okay so that's everything I've got for you in the main part of the show so it's at this part of the video where I'll say thank you so much for watching and I shall see you next time
Info
Channel: Kevin McAleer
Views: 15,937
Rating: undefined out of 5
Keywords: Raspberry Pi 5, NAS, how to set up samba on raspberry pi, Raspberry Pi 5 NAS, NVMe Storage, NVMe, Raspberry Pi 5 NVMe, raspberry pi, raspberry pi server, hard drive, raspberry pi nas raid 5, Raspberry Pi 5 SSD, rpi5 nas, nas, rpi, rpi5, pi5
Id: ZpWuKFOMV-I
Channel Id: undefined
Length: 48min 26sec (2906 seconds)
Published: Mon Jan 15 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.