Find the answer to your Linux question:
Results 1 to 8 of 8
Like Tree2Likes
  • 1 Post By mbuell
  • 1 Post By mbuell
Hi all I have a raspberry pi with Raspbian installed and a 2 TB hard drive attached. I am very new to linux and would really appreciate any help. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2014
    Posts
    2

    Use Linux Machine as File Server and Mount It on Clients


    Hi all

    I have a raspberry pi with Raspbian installed and a 2 TB hard drive attached. I am very new to linux and would really appreciate any help.

    I have uploaded many videos and photos onto the drive and would like a way to mount it as a folder on Mac and Windows machines so that I can access them.

    I have tried tens of tutorials for setting up vsftpd as well as using sftp to no avail. I have a user named 'pi' that I use for SSH. There is another user named 'www-data' that owns all of the photos and videos (because they are in a folder that is synced with OwnCloud on a different computer). The reason I don't just use OwnCloud on this computer is that I don't want it to download all of the files onto the computer. Moreover, I simply want to mount the drive over the network so that I can use this computer with Plex Media Server to view the photos and videos on my Roku.

    That being said, I need to be able to access the entire hard drive from the computer that it is network-mounted on, not just the home directory for pi.

    I have encountered various problems every time I tried to set up vsftpd and sftp (probably all my fault), but like I said I am a beginner and would appreciate any and all help to get this working.

    Thanks!

  2. #2
    Just Joined!
    Join Date
    Feb 2009
    Location
    USA
    Posts
    21
    Quote Originally Posted by lasportsman13 View Post
    Hi all

    I have a raspberry pi with Raspbian installed and a 2 TB hard drive attached. . . .
    and would like a way to mount it as a folder on Mac and Windows machines so that I can access them.
    . . .
    I have encountered various problems every time I tried to set up vsftpd and sftp (probably all my fault), but like I said I am a beginner and would appreciate any and all help to get this working.

    Thanks!
    Idk Raspbian - but google says it is based on debian. Ok - so my recommendations are:
    1. install and set up Samba on the raspberry. Put the shared files in your shared directory, and do NOT connect to the WHOLE drive unless or until you require such access, eg, to update.
    2. Forget the ftp in any shape or form. Security issues. Not worth the effort.
    3. Use sshfs to connect to the complete file system.
    4. Use ssh to connect to and use the os for updating etc.

    So, install samba and ssh, and sshfs if it is separate from ssh (I forget if it is), and you'll be cool. And secure. Of course, if you want, you could just install ssh and sshfs, but I really think you'll find cross-platform use easier with Samba.
    lasportsman13 likes this.

  3. #3
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    941
    Question... Okay I can see and Raspberry Pi handling OS and Samba, but would it handle the I/O of being a file server and especially streaming media files. Trying to learn more about the Raspberry Pi.

  4. #4
    Just Joined!
    Join Date
    Feb 2009
    Location
    USA
    Posts
    21
    Quote Originally Posted by docbop View Post
    Question... Okay I can see and Raspberry Pi handling OS and Samba, but would it handle the I/O of being a file server and especially streaming media files. Trying to learn more about the Raspberry Pi.
    Good question. Of course - IF it will accept Samba and ssh - at the worst, I would imagine it would just be slow. However, in my experience, a home LAN, even images, doesn't get stressed with a low powered cpu. But idk about media files, or if it were used for big resource hogs like a gis.
    docbop likes this.

  5. #5
    Just Joined!
    Join Date
    Jan 2012
    Location
    Central Hell, CA
    Posts
    4
    Quote Originally Posted by docbop View Post
    Question... Okay I can see and Raspberry Pi handling OS and Samba, but would it handle the I/O of being a file server and especially streaming media files. Trying to learn more about the Raspberry Pi.
    Yes, it will handle it. There is actually a Raspbmc distro which is specifially a media server (xbmc). Personally, i don't do much with media other than music. I stream .mp3s pff of my pi, serve files and support my local (home) dns all from one box.

    As a side note, if you are worried about clock cycles, init 3.

  6. #6
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    941
    Quote Originally Posted by rex_s View Post
    Yes, it will handle it. There is actually a Raspbmc distro which is specifially a media server (xbmc). Personally, i don't do much with media other than music. I stream .mp3s pff of my pi, serve files and support my local (home) dns all from one box.

    As a side note, if you are worried about clock cycles, init 3.
    Thinking about the port I/O for the connected storage becomeing a bottleneck. I'll probably get a Raspberry Pi soon and can get a better feel for its capabilities.

  7. #7
    Just Joined!
    Join Date
    Jan 2012
    Location
    Central Hell, CA
    Posts
    4
    Quote Originally Posted by docbop View Post
    Thinking about the port I/O for the connected storage becomeing a bottleneck. I'll probably get a Raspberry Pi soon and can get a better feel for its capabilities.
    USB2.0, although everything is pushed off of the SoC. Make sure you get the 512M RAM model. i suppose it's a tradeoff as the fewer clocks you are using, technically you have those available to access the USB, and vice-versa.

    This is normally where I state that I'm not an expert.

  8. #8
    Just Joined!
    Join Date
    Jan 2014
    Posts
    2
    Quote Originally Posted by mbuell View Post
    Idk Raspbian - but google says it is based on debian. Ok - so my recommendations are:
    1. install and set up Samba on the raspberry. Put the shared files in your shared directory, and do NOT connect to the WHOLE drive unless or until you require such access, eg, to update.
    2. Forget the ftp in any shape or form. Security issues. Not worth the effort.
    3. Use sshfs to connect to the complete file system.
    4. Use ssh to connect to and use the os for updating etc.

    So, install samba and ssh, and sshfs if it is separate from ssh (I forget if it is), and you'll be cool. And secure. Of course, if you want, you could just install ssh and sshfs, but I really think you'll find cross-platform use easier with Samba.
    Thank you so much! I finally figured out how to install Samba and it does exactly what I need it to do

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •