The Tiny Solution to All Your Storage Problems
by jackmmaker in Circuits > Raspberry Pi
121 Views, 4 Favorites, 0 Comments
The Tiny Solution to All Your Storage Problems

Have you ever run out of storage, either in the cloud or on your PC? I bet you have. This project will show you how to make a tiny NAS (Network Attached Storage) from a raspberry pi 0 2 W. This will let you make your own locally accessible cloud storage, limited only by the size of USB you use.
Supplies

3D Print the Parts


You can find the files for this project on my Printables. The 3D printed parts were designed in Tinkercad. Print one of each part. Once they are printed, place the raspberry pi on top of the bottom piece, lining up the posts with the holes in the raspberry pi.
Put in the USB Adapter

Take the USB adapter and put it into the USB port closest to the micro SD card port. It is very important that you put it in this port and not the other port because the other port is power only.
Flash the Raspberry Pi

Open the Raspberry Pi Imager and select Raspberry Pi 0 2 W from the choose device dropdown menu. Next, open the choose OS menu and select Raspberry Pi OS (other). From there, choose Raspberry Pi OS (Legacy, 64-bit) Lite. Then choose your SD card from the choose storage menu. Finally click next, make sure you modify your settings so that you raspberry pi can connect to your wifi, and apply customization settings. Once it's done, plug the SD card into the raspberry pi.
Put the Top On

Once the micro SD card is plugged into the Raspberry Pi, take the top and line up the USB and HDMI holes with the USB and HDMI ports. The top fits snuggly over the bottom piece and should stay in place once pushed over the bottom.
Install Open Media Vault

Plug in the raspberry pi. From there, SSH into the pi. If you don't know how to do this, follow this guide. Once logged in, copy and paste this command in:
sudo wget -O - https://raw.githubusercontent.com/OpenMediaVault-Plugin-Developers/installScript/master/preinstall | sudo bash
Next, you must reboot your Pi by typing sudo reboot. Log back in, then type
wget -O - https://raw.githubusercontent.com/OpenMediaVault-Plugin-Developers/installScript/master/install | sudo bash
This will take a while, so let it sit. It may also disconnect you from your raspberry pi while installing, so give it a few extra minutes just to be safe. While running, it may change your IP address, so double check to be sure.
Log Into Open Media Vault
Go to your search bar and type in the raspberry pi's IP address. This will take you to a log in screen. The default username is admin, and the default password is openmediavault.
Change the Admin Password

Click the outline of a person in the top right corner of the screen, then click change password. From there, just enter your new password, then click save.
Insert Your USB Drive

Insert your the end of your USB drive into the adapter.
Set Up the USB

Now we're going to set up the USB you're using for storage. First, click the storage button on the left. Then select Disks from the menu. From there, you should be able to see which disk is yours from looking at the size of each USB. Select your disk then click the eraser in the top menu. Select quick, then next. Now, click the file systems button in the left menu. Click the plus button, then EXT4. For the device, select the USB we just wiped. Click save, then close once it's done. A new screen will appear. For the device menu, choose the USB we just formatted then click save. Once you click save, you will notice a banner in the top of the screen asking you to confirm the changes we just made. Whenever this banner appears, click the check mark and then yes.
Create a Shared Folder

Click the shared folders button in the left menu, then click the plus button in the top menu. Choose a name, and select the USB we just set up for the file system. Then choose your security preferences. I would suggest something that doesn't let others do anything, so that people you don't know can't do anything with your files. Next, click save and then apply the configuration changes.
Enable Samba and CIFS

Click the Services button on the left, and then SMB/CIFS. Next, click the settings button and check the enabled button. Click save, then confirm the pending changes. This will make it so that you can access your shared folders from other computers, but we're not done yet.
Add a Shared Folder to SMB/CIFS

In order to make the shared folder we made accessible, we need to add a share. To do this, click the SMB/CIFS button again, then click the shares button. I already have a shared folder, but you will not. Click the plus button and a new screen will appear. Make sure that the enabled box is checked. In the shared folder field select the folder you made. Click the save button, then apply the configuration changes.
Add New Users

You may want to add additional users for other people who will access the NAS. To do this, click the users button on the right, then click users. Click the plus button to add a new user. From here you can specify the user details, including their username and password.
Upload to and View Files in You Folders

Now for the whole reason we made this NAS: lets add some files to our folders! To do this, open the file explorer and go to This PC. Right click and choose Add a Network Location. Click Next, and then Choose a Custom Network Location. Type in the following:
\\yourip\yoursharedfolder
So I would type in \\192.168.0.17\main. Next it will ask you to put in your username and password. Once you do this, you will be able to see the files already in the shared folder and add files of your own. Congratulations! No longer do you have to pay for more storage in the cloud or try to delete all the files you don't need off you computer.