[last updated: 2019-10-20]
go to: rPi home page
-----
This will use a rPi with one or more hard drives or SSD's. It will be connected to the home network, so that other computers on the network can access the same files.
- These instructions are from: (link to:) medium.com
- Optional instructions for formatting the drive:
- from:
(link to:) windowscentral.com
- (recommended to format the HD in FAT32)
- Even if it's pre-formatted, it's recommended to re-format it, to ensure no viruses or malware
- Pick a name for the drive: [driveName]
- Format the drive using a Windows machine (though instructions are also given to format it from the rPi).
- If you instead decide to not re-format the drive, you must find out what name it was given when it was formatted:
- Plug the drive in to a USB port on the rPi.
- Answer prompt to open with File Manager.
- Note [driveName] of the drive that is listed in left directory tree under /media/pi
- Mount the drive (it must be plugged in to a USB port at this point):
- (This assumes it didn't mount automatically...)
- $ sudo mkdir /mnt/[driveName]
$ sudo chown -R pi:pi /mnt/[driveName]
$ sudo mount /dev/sda1 /mnt/[driveName] -o uid=pi,gid=pi
- If you want it to mount automatically when re-booted, edit: /etc/fstab and append:
/dev/sda1 /mnt/[driveName] auto defaults,user 0 1
- Set up rPi to give HD access to network:
(recommended to use SMB protocol for network access)
- Install Samba server software on rPi:
connect internet, then open terminal and execute:
$ sudo apt-get update (about 2 min)
$ sudo apt-get upgrade (about 45 min)
$ sudo apt-get install samba samba-common-bin
- Edit /etc/samba/smb.conf
Append the following to the end of the file:
- [share]
- Comment = Shared Folder
- Path = /mnt/[driveName]
- Browseable = yes
- Writeable = Yes
- only guest = no
- create mask = 0777
- directory mask = 0777
- Public = yes
- Guest ok = yes
[if you don't want to allow guest users, omit this last line]
- change the permissions of the /mnt/[driveName] directory so that everyone can read and write to it:
$ chmod 1777 /mnt/[driveName]
- restart the Samba daemon:
$ sudo /etc/init.d/samba restart
- Allow a Windows machine to access the drive:
- Open a File Explorer and click Network (left panel)
- If network discovery is turned on,
you should see the rPi listed.
- double-click the rPi icon
- double-click the share icon to open the network drive
- OR - Allow a Windows machine to automatically mount the drive:
- in Windows File Explorer, navigate (same as above?) to the share folder
- right-click the share icon and select "map network drive"
- check “Reconnect at sign-in”, then click “Finish”.
- The new drive should appear in the left-hand panel and,
if you click on “This PC” the new drive should be visible under “Network locations.”
The shared volume should now mount automatically every time you login to Windows.
- These instructions are from: (link to:) raspberryPi.org
- Other instructions, more generic, on how to mount and access an external HD from a rPi:
(link to:) makeuseof.com
- Another tutorial - (link to:) howtogeek.com
.
.
.
eof