BradTrupp.com --
Tags --
Old Articles -- Mac Mini HTPC - Network Attached Storage (Apple)
Mac Mini HTPC - Network Attached Storage (Apple)
(2007/08/23)
Mac Mini HTPC - Network Attached Storage
By Brad Trupp (c) 2007
My primary systems are still Windows XP and because of that, all my NAS or network attached storage uses SMB protocols for Windows Workgroups.
At the moment, I use a Buffalo Linkstation but I plan to set up a spare PC using FreeNas or Ubuntu real soon.
|
From Wikipedia, the free encyclopedia -- Server Message Block (SMB) is an application-level network protocol mainly applied to shared access to files, printers, serial ports, and miscellaneous communications between nodes on a network. It also provides an authenticated Inter-process communication mechanism. It is mainly used by Microsoft Windows equipped computers, where it's known simply as "Microsoft Windows Network".
|
Connecting to the Network for the first time
Using the Finder's menu bar, open up the "Go" menu and select "Connect to Server".
Enter the server address with the "smb:" prefix (for example smb://nas9/usbdisk1 where //nas9/usbdisk1 is the share name.
Enter the workgroup and password information as necessary. Magic will happen and the drive icon should appear on your desktop.
Automate the Drive Mount
Making the drive mount automatically really should be as simple as dragging the mounted drive icon it to "Login Items" (under Systems Preferences / Accounts ) however this approach never seemed to work for me.
I decided to write a short Apple Script to do the mount instead and add the script to my "Login Items" instead.
Basic steps are:
- Fire up Apple Script Editor
- Enter the command line "mount volume "smb://server name/share name"" for each share you want to mount. The quotes around "smb://server name/share name" are needed or the script fails. In my case the command was "mount volume "smb://nas9/usbdisk1"".
- Test the script by clicking "Run". Good things should happen. If the drive was mounted from your earlier adventures, just right-click on the drive icon and "Eject" it before testing the script.
- Save the working script as a script.
- Save the script as an application.
- Add your new Apple Script application to your "Login Items" (under Systems Preferences / Accounts ) and you are good to go.
- Test by restarting your computer.
There is a good article on how to automount smb network shares in OSX at Happy Beggar.
Add a SymLink to make navigation easier
Once the NAS drive was mounting automatically, create a symlink from the network storage to the Movies directory.
|
From Wikipedia, the free encyclopedia --
In computing, a symbolic link (often shortened to symlink and also known as a soft link) consists of a special type of file that serves as a reference to another file or directory. Unix-like operating systems in particular often feature symbolic links.
Unlike a hard link, a symbolic link does not point directly to data, but merely contains a symbolic path which an operating system uses to identify a hard link (or another symbolic link). Thus, when a user removes a symbolic link, the file to which it pointed remains unaffected. (In contrast, the removal of a hard link will result in the removal of the file if that file has no other hard links.) Systems can use symbolic links to refer to files even on other mounted file systems. The term orphan refers to a symbolic link whose target does not exist.
Symbolic links operate transparently, which means that their implementation remains invisible to applications. When a program opens, reads, or writes a symbolic link, the operating system will automatically redirect the relevant action to the target of the symlink.
|
To create the symlink --
- Open the Terminal application. It hides in the Utilities directory under Applications.
- Enter "cd Movies" to change to the Movies directory off of your home directory
- If you enter "ls /Volumes", you will see the "mount point" for your shared storage. Using my example above, it is "usbdisk1".
- Enter "ln -s /Volumes/usbdisk1" to create the symbolic link.
Now when you look in your Movies directory, you will see the new link to your network storages and it work like any other directory. Front Row will be so happy.
What's Next?
Previous step -- Extending Quicktime with additional Codecs...
Next step -- Alternatives to Quicktime and more great software...
Tags: Old Articles
Share: Del.icio.us | Digg | Facebook | Google Bookmarks | Reddit | Technorati | Twitter | Windows Live | Yahoo! My Web