Using Network Storage on the Raspberry Pi

Using Network Storage on the Raspberry Pi

It is highly likely that you are using an 8GB SD or Micro SD card with your Raspberry Pi. This is adequate for many purposes, but if you fully load your Raspberry Pi with additional applications (see my tutorial on installing more applications on your Raspberry Pi), you may find yourself running short on space. Of course, you can use a larger SD card, but if you have a Network Attached Storage (NAS) at home, you can access and store files on the NAS.

In this tutorial you will learn how to access that external device. Note, however, that there may be differences depending on what device you are using.

Types of Network Drive

There are three main 'formats' that network drives use to allow access to their files; Samba, NFS and AFP. Each was originally designed for sharing files over Windows, Unix/Linux and Apple networks. However, most computers can share files between these three types. The main differences between them are the way that they transfer files and the way that file permissions are stored. Fortunately, your Raspberry Pi can access files on them all.

Accessing Files from the Desktop

The easiest way to see what files and folders are being shared on your network is to use the File Manager. Boot your Raspberry Pi into Desktop mode and open the File Manager from the Menu, under Accessories:

Starting the File Manager

This will open the File Manager:

File Manager

To find out whether there are any servers sharing folders over your network, use the Go -> Network menu option:

View Network Drives

This will show you what is being shared:

Network Shares

I have a few NAS drives as well as PCs and Macs sharing over my network, as you can see above. (If you can guess the naming convention I use for my home servers, why not tweet me at @Geeky_Tim?).

Open any of the server shares you see on the list to see whether they are sharing anything. Unless you have allowed 'guest' access on any of your shared folders, you are likely to be asked for a username and password:

User Accounts

You may need to access your NAS via its control panel (often a web page) itself and add more accounts so that your Raspberry Pi can access its stored files. I find that for non-sensitive files, like music, videos and photographs, a read-only account can be useful to allow any number of computers on your home network to access those files. Your NAS may allow 'guest' accounts, which means that you do not need to specify a username and password to access the files. Of course, for sensitive files you should always password protect folders and files appropriately.

If you have write permissions to network drives, you should now be able to copy and create drives over the network and store them away from your Raspberry Pi. This is an excellent way to backup your project files from your Raspberry Pi.

In a future tutorial, I will show you how to access network drives from the command line, and make those drives reconnect each time you boot your Raspberry Pi.

Featured Products

Raspberry PiRaspberry Pi 3 Model B+
Sale price £40 incl. VAT excl. VAT
Raspberry PiRaspberry Pi Zero W
Sale price £15 incl. VAT excl. VAT

1 comment

Eric

Eric

I have a Synology NAS and have no issues accessing share folders from windows and can access DSM from chromium on my Pi (4B 8GB if that matters). Following these instructions I see my NAS shared twice. One goes to afp://SynNAS.local:548 and the other goes to smb://SynNAS.local:445. AFP returns an error: Error resolving “SynNAS.local”: Name or service not known. After clicking OK, it says Error The specified location is not mounted. SMB returns an error: Error Failed to retrieve share list from server: Connection refused followed by the same I’m struggling to see where I went wrong. Any thoughts?

I have a Synology NAS and have no issues accessing share folders from windows and can access DSM from chromium on my Pi (4B 8GB if that matters). Following these instructions I see my NAS shared twice. One goes to afp://SynNAS.local:548 and the other goes to smb://SynNAS.local:445. AFP returns an error: Error resolving “SynNAS.local”: Name or service not known. After clicking OK, it says Error The specified location is not mounted. SMB returns an error: Error Failed to retrieve share list from server: Connection refused followed by the same I’m struggling to see where I went wrong. Any thoughts?

Leave a comment

All comments are moderated before being published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.