News Ticker

Connect to a NAS drive

I often post about NAS drives on Twitter. Follow me here

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.

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/

I often post about NAS drives on Twitter. Follow me here

4 Comments on Connect to a NAS drive

  1. Thnx! Works like a charm.

  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.

  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.

  4. 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!

2 Trackbacks / Pingbacks

  1. Connecting the PI a NAS drive and Windows shares « alex.theedom
  2. Connecting the Pi to a NAS drive and Windows shares Boost your career with us Professional Java EE Video Training and Tutorials

Leave a Reply

%d bloggers like this: