Notes

Orange Pi NAS

Edit on GitHub

System Administration
2 minutes

Connect hard drives over USB

  • Set up drives to auto-mount on system boot
  • Share the drives over the WiFi network

Setting up a NAS

Run the following commands before and after connecting your hard drive to figure out which one you need to mount.

1# get device UUIDs
2sudo blkid
3
4# find out partition names
5cat /proc/partitions

setting up for NTFS and EXT4 drives

1# install tools
2sudo apt-get install fuse ntfs-3g
3
4# create mount points
5sudo mkdir /media/aamnah/NAS /media/aamnah/STUFF
6
7# mount drive
8sudo mount -t ext4 /dev/sda1 /media/aamnah/NAS
9sudo mount -t ntfs-3g /dev/sdc1 /media/aamnah/STUFF

edit fstab to auto-mount drives

1sudo nano /etc/fstab
LABEL="NAS"   UUID="94638681-0f6b-46c1-9207-c02a702c72cd"   /media/aamnah/NAS        ext4  defaults 0 0
LABEL="STUFF" UUID="7C011EE7317A299E"                       /media/aamnah/STUFF   ntfs-3g  defaults 0 0

share the drive over network

1sudo apt install samba
2
3sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
4sudo nano /etc/samba/smb.conf

Edit smb.conf file

i tried to make the extrenal drive called NAS publicly accessible without having to provide a password, but it didn’t work. some articles mentioned changing user to nobody and changing pemissions to 777 (actually change owner and perms for the drive itself), but that did nothing. kept getting the you do not have permission error..

[nas-test]
path = /media/aamnah/NAS
public = yes
writable = yes
browsable = yes
read only = no
;guest ok = yes
;guest only = yes
;guest account = nobody
create mask = 0777
directory mask = 0777

what did work was providing force user = aamnah. (my username is aamnah on both devices) i am able to access from Windows and browse as well as create files inside this shared drive. it did not ask me for a password

[NAS]
path = /media/aamnah/NAS
writable = yes
public = yes
force user = aamnah

Access the drive from Windows

Open File Explorer. Right click on This PC in the sidebar and select Add a network location.

\\192.168.111.100/NAS

Access the drive from macOS

_Files > Go > _

Cmd + K is the shortcut.