When reconfiguring my home WIFI router this week, I have a thought to setup a home file sharing network drive. I try the Raspberry Pi approach first, and upgrade to a dedicated NAS (Network Attached Storage) device Synology 220j a few weeks later.
The Raspberry Pi 3B+ and a case I bought one or two years ago has been collecting dust in a drawer for quite some time. It is time to bring them out and get some use out of them.
My original plan is to connect a retired SSD to the PI via an USB adapter. It would be a little messy to handle the cable and the exposed SSD drive. So I decide to use a Samsung 64GB USB flash drive which is also retired.
The two articles linked below are on the top of Google search.
After reading the two articles, it seems that the first one suites my needs better. The first tutorial is quite good but I still run into a few problems. Below are some notes I have when setting up the Pi.
sudo mkfscommand in the tutorial. I have to use Linux Mint desktop app USB Stick Formatter to format it to EXT4 first and then connect it to Pi.
\\raspberrypiin Windows and
smb://raspberrypiin Linux to access the shared drive.
The Synology 220j two bay NAS is on sale a few weeks ago and I get one. The setup process is easy and fast. I install two 2.5 inch laptop hard drives in it, and watch those two youtube vidoes. About one hour later, the NAS is up and running.
Here are the steps to mount the nas in Linux Mint. The idea is mainly from a post on linux mint online forum.
/etc/fstabto add a mounting point, and add the line to the end of the file. This assumes that you name the Synology device as
//nas.local/home/ /media/synology cifs \ credentials=/etc/samba/credentials,uid=1000,gid=1000 0 0
/etc/samba/credentialsfile to add username and password.
sudo mkdir /media/synologyto create the mounting directory.
sudo mount -ato activate the new line in
The Synology network drive works well when all computers connect to the same router. My work laptop is on a VPN and it does not have access to the Synology network drive.
An easy way to share files between the work computer (on VPN) and other computers is to use a digital ocean Ubuntu server, and use FileZilla ftp software to upload and download files or folders thru SFTP protocol. I am not sure if this is a correct way to do things but it works well for me now.
Those three commands install FileZilla on Linux Mint.
apt-cache show filezilla # show package info sudo apt update sudo apt install filezilla -y
Reference: Q&A on superuser.com
Update on 9/3/2021
In Ubuntu 21.04, the fstab setting does not work. The setting should be in the following format.
//<192.168...>/home/ /media/synology cifs \ username=<name>,password=<pw>,uid=1000,gid=1000