Archive

Posts Tagged ‘NAS’

How to mount a Windows share on startup

April 28th, 2014 2 comments

I recently invested in a NAS device to add a little bit of redundancy to my personal files. With this particular NAS the most convenient way to use the files it stores is via the Windows share protocol (also known a SMB or CIFS). Linux has supported these protocols for a while now so that’s great but I wanted it to automatically map the shared directory on the NAS to a directory on my Linux computer on startup. Thankfully there is a very easy way to do just that.

1) First install cifs-utils

sudo apt-get install cifs-utils

2) Next edit the fstab file and add the share(s)

To do this you’ll need to add a new line to the end of the file. You can easily open the file using nano in the terminal by running the command:

sudo nano /etc/fstab

Then use the arrow keys to scroll all the way to the bottom and add the share in the following format:

//<path to server>/<share name>     <path to local directory>     cifs     guest,uid=<user id to mount files as>,iocharset=utf8     0     0

Breaking it down a little bit:

  • <path to server>: This is the network name or IP address of the computer hosting the share (in my case the NAS). For example it could be something like “192.168.1.1” or something like “MyNas”
  • <share name>: This is the name of the share on that computer. For example I set up my NAS to share different directories one of which was called “Files”
  • <path to local directory>: This is where you want the remote files to appear locally. For example if you want them to appear in a folder under /media you could do something like “/media/NAS”. Just make sure that the directory exists (create it if you need to).
  • <user id to mount files as>: This defines the permissions to give the files. On Ubuntu the first user you create is usually give uid 1000 so you could put “1000” here. To find out the uid of any random user use the command “id <user>” without quotes.

So for example my added line in fstab was

//192.168.3.25/Files     /media/NAS     cifs     guest,uid=1000,iocharset=utf8     0     0

Then save the file “Ctrl+O” and then Enter in nano.

3) Mount the remote share

Run this command to test the share:

sudo mount -a

If that works you should see the files appear in your local directory path. When you restart the computer it will also attempt to connect to the share and place the files in that location as well. Keep in mind that anything you do to the files there also changes them on the share!




I am currently running a variety of distributions, primarily Linux Mint 17.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.
Categories: Linux, Tyler B Tags: , , , , ,

This… looks… awesome!

December 8th, 2009 No comments

Looks being the key word there because I haven’t actually been able to successfully run either of  these seemingly awesome pieces of software.

Amahi is the name of an open source software collection, for lack of a better term, that resembles what Windows Home Server has to offer. I first came across this while listening to an episode of Going Linux (I think it was episode #85 but I can’t remember anymore!) and instantly looked it up. Here is a quick rundown of what Amahi offers for you:

  • Currently built on top of Fedora 10, but they are hoping to move it to the most recent version of Ubuntu
  • Audio streaming to various apps like iTunes and Rhythmbox over your home network
  • Media streaming to other networked appliances including the Xbox 360
  • Acts as a NAS and can even act as a professional grade DHCP server (taking over the job from your router) making things even easier
  • Built in VPN so that you can securely connect to your home network from remote locations
  • SMB and NFS file sharing for your whole network
  • Provides smart feedback of your drives and system, including things like disk space and temperature
  • Built-in Wiki so that you can easily organize yourself with your fellow co-workers, roommates or family members
  • Allows you to use the server as a place to automate backups to
  • Windows, Mac & Linux calendar integration, letting you share a single calendar with everyone on the network
  • Implements the OpenSearch protocol so that you can add the server as a search location in your favorite browser. This lets you search your server files from right within your web browser!
  • Includes an always-on BitTorrent client that lets you drop torrent files onto the server and have it download them for you
  • Supports all Linux file systems and can also read/write to FAT32 and read from NTFS.
  • Sports a plugin architecture that lets developers expand the platform in new and exciting ways
  • Inherits all of the features from Fedora 10
  • Finally Amahi offers a free DNS service so you only have to remember a web address, not your changing home IP address

FreeNAS is a similar product, although I use that term semi-loosely seeing as it is also open source, except instead of being based on Linux, FreeNAS is currently based on FreeBSD 7.2. Plans are currently in the works to fork the project and build a parallel Linux based version. Unlike Amahi, FreeNAS sticks closer to the true definition of a NAS and only includes a few additional features in the base install, letting the user truly customize it to their needs. Installed it can take up less than 64MB of disk space. It can (through extensions) include the following features:

  • SMB and NFS as well as TFTP, FTP, SSH, rsync, AFP, and UPnP
  • Media streaming support for iTunes and Xbox 360
  • BitTorrent support allowing you to centralize your torrenting
  • Built-in support for Dynamic DNS through major players like DynDNS, etc.
  • Includes full support for ZFS, UFS, ext2, ext3. Can also fully use FAT32 (just not install to), and can read from NTFS formatted drives.
  • Small enough footprint to boot from a USB drive
  • Many supported hardware and software RAID levels
  • Full disk encryption via geli

Both of these can be fully operated via a web browser interface and seem very powerful. Unfortunately I was unable to get either up and running inside of a VirtualBox environment. While I recognize that I could just install a regular Linux machine and then add most of these features myself, it is nice to see projects like that package them in for ease of use.

This is definitely something that I will be looking more closely at in the future; you know once these pesky exams are finished. In the mean time if anyone has any experience with either of these I would love to hear about it.

[UPDATE]

While publishing this, the folks over at Amahi sent out an e-mail detailing many new improvements. Turns out they released a new version now based on Fedora 12. Here are their notable improvements:

  • Amahi in the cloud! This release has support for VPS servers (Virtual Private Servers).
  • Major performance and memory improvements, providing a much faster web interface and a 30% smaller memory footprint.
  • Based on Fedora 12, with optimizations for Atom processors built-in, preliminary support in SAMBA for PDC (Primary Domain Controller) with Windows 7 clients and much more.
  • Completely revamped web-based installer.
  • Users are more easily and securely setup now, the with password-protected pages and admin users.
  • Brand new architecture, with future growth in mind, supporting more types of apps, and more importantly, bring us closer to supporting Ubuntu and other platforms. Over 100+ apps are working in this release out of the gates!

It all sounds great. I will be looking into this new version as soon as I have a moment to do so.




I am currently running a variety of distributions, primarily Linux Mint 17.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.