Mount an external drive
I'm no Linux expert, but I've installed Samba and Automount to be able to use an external drive on the USB port on my Firewalla Blue. But I can't get it to work. Is it possible to write a 'How to' for linux newbies?
-
Hey I might be a year late, but I've literally just did this on my Firewalla RED.
Here is a guide based on the notes I took whilst messing around to get this to work (took a couple of failed attempts and recovering the box back to factory to get it right)
GUIDE:
SSH into your Firewalla box and then first update and insall Samba, I used these two commands:
# sudo apt-get update
# sudo apt-get install samba samba-common python-glade2 system-config-sambaOnce installed, you then want to find your USB disk (make sure you have plugged it in!).
# sudo fdisk -lThis will give you an output, the bottom line should be somthing like
/dev/sda2 * 8192 15523839 15515648 7.4G b W95 FAT32Create a directory for your share:
# sudo mkdir /media/usb-drive
# sudo chmod 744 /media/usb-driveNow mount the drive (replace sda2 with whatever your drive comes up as from the fdisk -l command ran earlier):
mount /dev/sda2 /media/usb-drive/
test it worked by typing
# mount
If no output, it didn't work.
To see whats on the drive,
# cd /media/usb-drive
Type the below to get a full listing
# ls
OK now back to the Samba set up,
Create a permission for the sharing:
# sudo chown -R nobody:nogroup /media/usb-drive/
# sudo chmod -R 0775 /media/usb-drive/Copy the Samba default configuration file to a backup (in case you need to revert)
# sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.backup
Edit Samba configuration file
# sudo vi /etc/samba/smb.conf
Add the next lines to Samba configuration file (press "i" to enable input/edit):
-----------------------------------------------------
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = Firewalla-Box
security = user[SambaShare]
Comment = Samba Shared Directory
path = /media/usb-drive
writable = yes
guest ok = yes
read only = no
force user = nobody-----------------------------------------------------
Press Escape then save by typing
:wq
Restart Samba
# sudo service smbd restart
You should be good to log into the share
type your path in file explorer (replace x with Firewalla's IP)
\\192.168.1.x\sambashare -
Here is a better/cleaner guide with screens. Just tried it it works fine.
-
You guys are working way too hard. Just use sshfs.
I’m not a Samba fan - why install something new when the functionality already exists. But yes, there are times and places where samba is great - but not on tight lil Firewallas.
SSHFS (SSH Filesystem) is a filesystem client based on FUSE for mounting remote directories over an SSH connection. SSHFS is using the SFTP protocol, which is a subsystem of SSH and it is enabled by default on most SSH servers.
When compared to other network file system protocols such as NFS and Samba the advantage of SSHFS is that it does not require any additional configuration on the server side. To use SSHFS you only need SSH access to the remote server - which we already have.
Because SSHFS uses SFTP , all transmitted data between the server and the client is encrypted and decrypted. This results with a slightly degraded performance compared to NFS, and higher CPU usage on the client and server.
-
Gold reboot always wipe things out. You can put a script in https://help.firewalla.com/hc/en-us/articles/360054056754--Firewalla-Gold-Customized-Scripting-
-
No, but feel free to write one. :-)
Start here.
https://hub.docker.com/r/servercontainers/sambaUse this as an example.
https://help.firewalla.com/hc/en-us/community/posts/1500001199002-Cloudflare-DDNS-Docker-Setup-on-FWG -
I have a script that I can run already that does everything to get samba up and running. It works fine when I run it manually. But I see no evidence of it running when my Gold reboots. I started looking at using Docker, but I have no experience with it and don't understand the paradigm either, so I'd prefer to us my script since I think I'm at 99%.
I even chmod'd my start.sh file up to 777, so anybody can do anything with it at this point, yes?What am I missing??
Please sign in to leave a comment.
Comments
18 comments