motionEyeOS (PINE A64(+)) 20170611 [Jun 16] | Ubuntu Images (Pinebook) 0.5.5-65 [Jun 15] | Ubuntu Minimal (PINE A64(+)) 0.5.5-65 [Jun 15] | Q4OS (Pinebook) 1805 [Jun 12] | Android 6.0.1 (Pinebook) 20170605 [Jun 5] | Win10 IoT (PINE A64(+)) 10.0.15063.0_20170602 [Jun 5] | FalconGate (PINE A64(+)) 20170430 [May 31] | Q4OS (PINE A64(+)) 1804 [May 30] | Armbian - Ubuntu (SOPINE) 5.27 [May 22]

Getting Started | Visit the WIKI | IRC Logs | Forum Rules/Policy


Creating a NAS server in Pine64
#1
Information 
Hello everyone, i just want to know how to create a home-made NAS server with Pine64, first, i need the software needed and some kind of tutorial if you can. Thanks!
Reply
#2
The Pine performs quite well as a NAS although you are limited by the USB 2.0 interface. Here is what you can expect in real-world use.
For starters you want an 2.5in USB 2.0/3.0 external HDD, a GbE Ethernet switch and a powered USB 2.0 hub. The reason you want a powered USB 2.0 hub is because the drive may/ will likely pull more power than what the Pine's USB 2.0 socket can deliver. 


There are many more detailed guides out there on how to use samba - just use google fu. But here is a quick overview of the process: 

Having connected everything you will need to mount your HDD. I presume you are running headless so ssh into the Pine and: 

Code:
lsblk

It will list your current disks,size, partitions and their mount points etc: 

Quote:debian@pine64:~$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0  55.9G  0 disk /media/ExtDrive2
sdb           8:16   0 149.1G  0 disk 
└─sdb1        8:17   0 149.1G  0 part /media/ExtDrive
mmcblk0     179:0    0  29.8G  0 disk 
├─mmcblk0p1 179:1    0    50M  0 part /boot
└─mmcblk0p2 179:2    0  29.8G  0 part /

Take note of the output. If you haven't formatted your disk to a particular format, and don't know what format it is in you may want to check it out (e.g.):

Code:
sudo file -sL /dev/sda
 
Now create a mount point int /media (substitute whatever you want for ExtDrive)
Code:
cd /media
mkdir ExtDrive


Ok now you can mount your drive (substitute whatever you need for format of the disk, path, etc.) 
Code:
sudo mount -t ext4 /dev/sdc1 /media/ExtDrive

Now you have your drive mounted and can create a folder you want to share in it... unless you already have a folder in it you wish to share of course or wish to share the entire drive. 
Next make sure that your Linux installation has samba installed (not sure if all come with it ?) 
Code:
sudo apt-get install samba samba-common-bin -y

Set up samba to use your user account. e.g. I am assuming here you'll use longsleep's base image:

Code:
sudo smbpasswd -a ubuntu
 
It will prompt you to provide password. 
Now you will need to configure samba to share the designated folder: 
Code:
sudo nano /etc/samba/smb.conf

In the following example I am sharing the mount point of the drive (everything on the drive), but if you want a particular folder shared then just add '/' and name of your shared folder (substitute rest of details as necessary).

Quote:[Shared]
path=/media/ExtDrive
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=no
 
Lastly, you'll need to restart samba:
Code:
sudo service smbd restart

Now your shared folder / drive should be accessible on your network. 
If you need more info please read this tutorial which is more detailed.
  If you manage to click this link you'll join in the IRC channel
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  PINE64 Installer - Simple Way to Image Your MicroSD pineadmin 23 3,284 06-16-2017, 12:37 AM
Last Post: pineadmin
  Upgrading Memory on PINE64 + 2GB Osh818 2 391 04-24-2017, 10:12 PM
Last Post: Osh818
  Mini-Tutorial to get a linux Desktop GUI working on Pine64+ speedro86 15 2,383 04-05-2017, 01:45 PM
Last Post: speedro86
  The 6 most common reasons why Pine64 won't boot Andrew2 106 40,298 03-22-2017, 05:58 PM
Last Post: Luke
Video May dietpi save Pine64 ; watch youtube via chromium hatahata 12 1,326 03-09-2017, 07:41 PM
Last Post: pfeerick
  Can't use HDMI to DVI converter purchased from Pine64 store jeffsteinmetz 8 1,097 03-05-2017, 01:31 PM
Last Post: Luke
  Pine64 won't boot tripledee 6 659 02-28-2017, 05:08 AM
Last Post: tripledee
  New to Pine64 Logan5 9 758 02-16-2017, 09:01 AM
Last Post: Logan5
  unable to write an pine64 image on a 16G micro suresh 2 366 01-26-2017, 12:56 PM
Last Post: suresh
  How to handle a Pine64 correctly gbjensen 5 3,284 12-13-2016, 12:16 PM
Last Post: MarkHaysHarris777

Forum Jump:


Users browsing this thread: 1 Guest(s)