Connecting to a NAS drive from a network connected Raspberry Pi is relatively simple. Here is how I did it with my Pi and the Soft-float Debian “wheezy” version of Linux.

Learn more about Raspberry Pi

Raspberry Pi Essential Training
Build a Raspberry Pi Media Server
Raspberry Pi: Home Monitoring and Control
RetroPie: Building a Video Game Console with Raspberry Pi
Raspberry Pi: GPIO

Log into the Pi and do follow these steps:

  • Enter in root mode by typing: sudo –i
  • Install or update cifs by typing: apt-get install cifs-utils
  • Create the following directory. We are going to mount the NAS drive to this directory.
  • home/pi/myNAS/myShare (type: mkdir myNAS)
  • Edit the file /etc/fstab by doing: pico /etc/fstab
  • Add the following line to the bottom of the page:
  • //IP_of_device/name_of_device /home/pi/myNAS/myShare cifs workgroup=WORKGROUP,users,auto,user_xattr 0 0
  • The IP_of_device it that of your NAS device. In my case I have a USB drive connected to the router and therefore I use the IP address of the router here.
pico /etc/fstab
pico /etc/fstab
  • The name_of_device in my case is called: usb1_1
  • If you have a username and password protecting the drive you should include them in the line as name value pairs separated by commas like this: username=your_username,password=your_password
  • Navigate back to the root and mount the drive by typing: mount –a
  • If it asks for a password enter it or press return if there isn’t one.
  • Now the drive is mounted you can now access these files by doing: cd /home/pi/myNAS/myShare/

6 responses to “Connect to a NAS drive”

  1. Thnx! Works like a charm.

    Like

  2. I’m excited to uncover this great site. I need to to thank you
    for ones time for this fantastic read!! I definitely loved every part of it and I have you saved as a
    favorite to see new stuff on your site.

    Like

  3. Hmm is anyone else encountering problems with the images on this blog loading?
    I’m trying to find out if its a problem on my
    end or if it’s the blog. Any feedback would be greatly appreciated.

    Like

  4. dgn2200 setup as access point Avatar
    dgn2200 setup as access point

    Woah! I’m really digging the template/theme of this website.
    It’s simple, yet effective. A lot of times it’s
    difficult to get that “perfect balance” between user friendliness and visual appeal.

    I must say you’ve done a great job with this.
    In addition, the blog loads very fast for me on Chrome.
    Outstanding Blog!

    Like

Leave a comment