Do you have a lot of files lying around like photos, videos, documents, movies, music on your hard drive? Afraid that they may run into drive failure? Want to build a network-attached storage NAS to prevent that but they are too expensive?
If your answer is yes to all the above questions, then this project is perfect for you! For those who do not know, NAS which stands for network-attached storage, allows you to store things like your movies, videos, pictures, etc on portable hard drives and external storage devices via your network!
This means you do not have to plug a USB storage directly into whatever device you are using whenever you want to store something which is very convenient and perfect if you wish to back up multiple computers? Samba is a re-implementation of the SMB Server Message Block networking protocol that allows Linux computers to seamlessly integrate into active directory environments.
Step 1: Update your system. Step 2: Install Samba on our Raspberry Pi. Step 3: Creating a sharing folder. Step 4: Sharing folder using Samba. Step 5: Define Details of share. You can rename it to whatever you like to call your shared storage space as well. If you wish to store the shared folder on an external drive, just change to path option here to point it towards your external drive. By setting it toit allows users to read, write and execute.
Step 6: Save changes. Step 7: Make a user for Samba on the Raspberry Pi. Annnnd we are done! Step 1: Go to Map Network Drive.
Step 2: Connect to the network folder. Step 3: Key in password.
Raspberry Pi Minecraft V1.12 Server – Excellent Performance Guide
Annnnnd you are done, you have just connected your windows to your Samba share! Step 1: Open Connect to Server Dialog. Step 2: Enter IP address and connect. Step 3: Enter Username and password.For the past few years, I have run a few websites on a Raspberry Pi 3B at home. I decided to do this just because I like to do some general tinkering with gadgets, but also because I thought it would be a cheaper way of hosting websites. But is the Raspberry Pi web server performance adequate?
Now I am going to share with you what I have learned whilst using the Raspberry Pi as a web server. You might even want to try setting up your own server. As you can see, the Pi as a relatively low spec device, so you will not want to use this for websites with high volume traffic. Similarly, it works best with static websites as these require less grunt to run. I currently have a couple of WordPress websites running and they sometimes struggle to render the web page.
Given the importance of website load times on SEOthis can be a problem. The concerning issues with running a website on the Pi are the low CPU speed, memory and the storage medium. The slow CPU and memory are the main reason why running frameworks such as WordPress can be problematic.Raspberry Pi Supercomputer Cluster
Quite simply this is too much for a humble Pi to cope with. The Raspberry Pi web server performance really suffers in this scenario. WordPress and other Content Management Systems read and write to a database. This adds additional work for the Pi to perform before it can render the webpage. These read and writes are being made to the micro SD card, which is a slow-performing storage medium.
SD cards are great for storing photos on your camera or maybe some MP3 files. Sadly, they do not perform well on a live web server. Quite simply micro SD cards are just too slow and unreliable. When you can consider why people use WordPress; they want to update content regularly, then you can understand why frequent writes to the card are necessary.
If you run a static website then you likely do not want to make changes to the website content often. In this case, you can simply take a backup image after finalising your website content and always have it ready to be reinstalled. However, doing this on a regular basis for a frequently updating WordPress website would just be a pain. You would have to shut down your server, remove the card for imaging and then reboot the server.
All this time your website is unavailable. A guaranteed way to be given an SEO penalty by Google. Furthermore, in my experience, the CPU and memory are not the biggest issues with running a website. This card is frequently corrupting. Unfortunately, the Raspberry Pi web server performance is seriously inhibited by the use of an SD card for storage.
SD Card Solution? This may well be an issue but I have noticed that when the server is under high load corruption occurs. No power cuts involved at all. A possible solution to the SD card corruption problems is to try and reduce the number of writes taking place by disabling logging, but if you are running a live server you really need log files to keep on top of any server related issues.
Thankfully, this can now be done on some models of Pi.If you attach an external SSD to your Raspberry Pi 4 Byou will get significantly faster app opens and file transfers.
One of the most important improvements in the Pi 4 is its USB 3. To find out, I attached an M. The Flash drive was so sluggish that I only tested it on the faster Pi 4. Unfortunately, at this time, on the Pi 4, you cannot boot off an external drive I hear that a firmware update which addresses this is comingbut I was able to copy everything except the boot partition to the SSD, so all the programs and most of the core files of the OS itself loaded from it.
To see how much quicker the SSD is, I recorded launch times for a few different apps. The LibreOffice Calc spreadsheet app takes a little it of time to load, even on the fastest storage.
The Flash drive was weak, as expected. GIMP, the free Linux alternative to Photoshop, is a powerful image editor, but it also has you stare at its splash screen for quite a bit of time before it loads. Perhaps the real bottleneck for opening GIMP is processing, rather than storage. One common use case for the Raspberry Pi is as a web server.
The good news here is that having a faster storage drive equates to handling more requests per second. I was surprised to see how well the Flash drive did here, considering how poorly it performed everywhere else. Very often just opening the start menu was laggy, with submenus taking seconds to appear. This only happened with the Flash drive.
The Linux equivalent of Crystal Disk Mark, IOzone, is a synthetic test that gives you sequential and random reads and writes. We performed our tests using a MB storage file and found the most interesting results with the 4K, K, K and 16,K highest block sizes. Blocks on the lower end of the spectrum, particularly during random reads and writes, represent the most common use case for opening and using apps, while the higher block sizes are good for saving or copying large files.
The SSD was usually 2 to 4 times faster than a microSD card and as much as 13 times quicker when dealing with large, sequential reads or writes. There are a couple of outliers where the Flash drive takes the lead. Random writes are even more important than random reads because the OS and software ex: your web browser storing its cache are always writing small files, so slowness here leads to sluggishness and unresponsiveness. On sequential writes, the SSD beats the tar out of the microSD card on both Raspberry Pi systems, with speeds as much as 13 times faster.
Again on sequential reads, which are helpful for doing large file operations, such as copies, the SSD leads the pack by a mile, offering 3 to 4 times the speed of a microSD card. The USB Flash drive does well with larger file blocks only.
I was surprised to see that switching from the default microSD card to an SSD had almost no effect on boot time. To be fair, a lot of the boot process still takes place on the microSD card, but the rest of the OS -- including Windows -- loads right off of the external drive. As I said in my review of the Pi 4, p YouTube videos appear sluggish when played at full screen but play fine in a window.No credit card needed.
Sign up here! So I found yet another cool use for a Raspberry Pi. You can actually use it as a file server, or more accurately a controller for a file server. All you need is your Pi and a nice external drive and you can serve files to anyone on your network. You need the Raspberry Pi set up and connected to your network. The first thing you need to do is make sure your Raspberry Pi can see the external drive. You want to look for a string identifying your USB device, but the [sda] is the part you want to pay attention to.
So first we want to create a location for this drive on the Raspberry Pi. This is done with the following command:. Now, we want to create our share. This step is also optional, but you can add this as a drive on your computer. Make sure you have an additional power supply going to your USB drive. You may also need to Change bit to bit encryption for file shares under Advanced Sharing Options to make it work with certain versions of Windows.
I hope this tutorial has shown you how to set up a file server on your network. I could do this with any Linux or Windows machine, but the idea of a big loud machine to do the same task is wasteful and more expensive. Get notified when new tutorials are posted: So I found yet another cool use for a Raspberry Pi. Now plug in the USB drive. You should see something like this come up: You want to look for a string identifying your USB device, but the [sda] is the part you want to pay attention to.
Type in: hostname and check the output. Add this as a drive on your computer This step is also optional, but you can add this as a drive on your computer. In the next box, browse to your USB drive on your Raspberry Pi and add it: Now it will be added automatically as a drive on your computer!The Pi Hole project adds an entire new level of performance and security to our home network.
Our household has a few Raspberry Pi's doing various tasks from tracking airplanes flying overhead, measuring temperature humidity in our house, Docker projects, and several more hidden away for a rainy day. The rainy day finally arrived when I stumbled across a new project. This time it is entirely different I always say this. However, it's true. This Raspberry Pi project Pi Hole is the gatekeeper to our home network.
Traditional Ad Blockers are usually Browser Plugins or software utilities on every computer on your network. Managing all your devices is cumbersome, hard to maintain, and leaves a gaping hole for network-connected devices like TV's, Printers, Alexa's, Sonos, or any other smart devices which connect to your network.
The Pi Hole blocks Ads, Malware, and overreaching metrics collection network-wide. Since I switched to SimpleAnalytics to stop tracking people on our websites I thought to apply the same principle to our home network. Now I get to decide how I server metrics and ads as well. How does the Pi Hole work though? This Web server just serves up a blank page. Installing Pi Hole should increase performance and security simultaneously for our home network.
The risk of the project is a single Raspberry Pi is now the single point of failure for my network, so reliability becomes a concern. Like any other project I run everything in a Docker container, and this project should be no different. The Pi Hole project already has a nice Docker project utilizing compose. The Pi Hole Docker install is well documented and quite nicely done. After installing Docker on the Raspberry Pi it was an easy git clone, a couple of modifications to select my timezone and preferred DNS servers CloudFlare 1.
Once Pi Hole is running, it is time to switch over my network to the Pi Hole. That's it! Now every device that connects to my router is now taking advantage of Pi Hole. Now that my network is funneling through the newly configured Pi Hole it's time to take a look at the Dashboard. The dashboard is a friendly interface which greets you with some fantastic statistics and visualizations right off the bat.
The menu bar on the left side of the Dashboard offers even more functionality. The level of detail and functionality is impressive and adds confidence. The Pi-Hole has been running for 1 month now on my home network. I have had to whitelist 1 or 2 URLs which was blocking a reset of an Alexa which had an issue, and a video conferencing system had all sorts of tracking and metrics built in which were causing some havoc until I whitelisted them.
It is scary and incredible to think the number of ads and metrics forced upon us, and this number continues to increase. I am delighted with the Pi Hole project and am recommending it to all.
Since I am so impressed with the performance and security, the next step is to install this in our 56K. Cloud office. It is also interesting how we could set up a secondary Pi so we could have a primary and secondary DNS server for our office. Published 1 March 4 min read. By Brian Christner. Installing Pi Hole Installing Pi Hole should increase performance and security simultaneously for our home network. Pi Hole in Operation Now that my network is funneling through the newly configured Pi Hole it's time to take a look at the Dashboard.
Review after 1 month in operation The Pi-Hole has been running for 1 month now on my home network. Next Steps Since I am so impressed with the performance and security, the next step is to install this in our 56K.
Indeed, the bottleneck is not the HDD link. Therefore it could be the network link? Lets test using iperf:. That's it! It seems that the bottleneck is the WiFi network. Here is the wifi statistics:. What's3 wrong with my Wifi? It is the signal level too low?
Can anyone explain me how the above statistics affect network performance? Your WiFi dongle is reporting good signal quality e. This weak signal is probably the reason why you don't have a better throughput than 2.
In addition, you should know that if your client the computer connected to samba or the other end of iperf is also on the WiFi, the bandwidth might be limited by the WiFi of your client computer. But you still might get lower throughput in practice due to overhead of the packets encoding, packet loss, and most importantly to the fact that you are not the only one on your wifi. Only 1 WiFi user can communicate at one time unless you have a And if you have a smartphone, tablet other computers on the same WiFi, they might steal some of your bandwidth during those tests.
My strong recommendation is: use a Ethernet cable between the Raspberry Pi and the router or WiFi access point.A Network File System NFS allows you to share a directory located on one networked computer with other computers or devices on the same network. The computer where the directory is located is called the serverand computers or devices connecting to that server are called clients. Clients usually mount the shared directory to make it a part of their own directory structure.
The shared directory is an example of a shared resource or network share.
Subscribe to RSS
If you want a network share that guest users can easily connect to, Samba is better suited to the task. This is because tools to temporarily mount and detach from Samba shares are more readily available across old and proprietary operating systems. For easier maintenance, we will isolate all NFS exports in single directory, into which the real directories will be mounted with the --bind option.
First we create the export filesystem:. This will not apply if using authentication see below. Now mount the real users directory with:. It is set to "no" by default, which is fine, because we are not activating NFSv4 security this time. Furthermore, this file should have the following lines in the Mapping section:.
Network File System (NFS)
However, note that the client may have different requirements for the Nobody-User and Nobody-Group. For example, on RedHat variants, it is nfsnobody for both. If you're not sure, check via the following commands to see if nobody and nogroup are there:.
For those who use LDAP-based authentication, add the following lines to the idmapd. This will cause idmapd to know to look at nsswitch. If you have LDAP authentication already working, nsswitch shouldn't require further explanation.
To export our directories to a local network The files on your NFS are open to anyone on the network. As a security measure, you can restrict access to specified clients. These have to be IP addresses because of a limitation in rpcbindwhich doesn't like hostnames. Note that if you have NIS set up, you can just add these to the same line.
Please ensure that the list of authorised IP addresses includes the localhost address Now that your server is running, you need to set up any clients to be able to access it. To start, install the required packages:. You can also specify the NFS server hostname instead of its IP address, but in this case you need to ensure that the hostname can be resolved to an IP on the client side. UIDs of any users on the client must match those on the server in order for the users to have access.
The typical ways of doing this are:. Note that you have to be careful on systems where the main user has root access: that user can change UIDs on the system to allow themselves access to anyone's files. This page assumes that the administrative team is the only group with root access and that they are all trusted. Anything else represents a more advanced configuration, and will not be addressed here. A user's file access is determined by their membership of groups on the client, not on the server.
However, there is an important limitation: a maximum of 16 groups are passed from the client to the server, and if a user is member of more than 16 groups on the client, some files or directories might be unexpectedly inaccessible. The IP address of the server should already be there. Alternatively you can rely on DNS if you want - it's up to you.
This applies to clients using NIS. Read the BUGS section in man netgroup for more information. These have to be IP addresses because of a limitation in rpcbind.