PDA

View Full Version : Change User Folder Mount Point




starscript
May 8, 2013, 09:24 PM
Hi,

I'm building a NAS server to store all my files such as movies etc.

I'm wondering is it possible to change the mount point of for say the user movie folder from /user/movies to 376.823.0.7/user/movies

I know I can do it in Linux by using fstab but not sure how I would go about in OS X.

Does any one have any idea or know how to do this?

I think this would be also hand for any one who wishes to store their users files or applications on another drive.


Thanks.



justperry
May 8, 2013, 10:01 PM
Hi,

I'm building a NAS server to store all my files such as movies etc.

I'm wondering is it possible to change the mount point of for say the user movie folder from /user/movies to 376.823.0.7/user/movies

I know I can do it in Linux by using fstab but not sure how I would go about in OS X.

Does any one have any idea or know how to do this?

I think this would be also hand for any one who wishes to store their users files or applications on another drive.


Thanks.

Create a symlink to the path on the external, that should work.

Bold :confused::confused:

Maximum allowed/working IP range is 255.

ipsychedelic
May 8, 2013, 10:07 PM
You seem to know your way around, but just in case I'll make it step by step (and try at your own risk blah blah ;)), but for regular folders on an external drive. I have zero experience with a NAS server, so this might work or be totally worthless (i.e you already tried and didn't work, because of the differences in accessing the drive).

Get the UUID:

diskutil info /Volumes/LABEL/ | grep UUID


Add the appropriate line to /etc/fstab (using either pico, nano, or vifs; the latter being the "recommended" one by the OS)

UUID=UUID /Users/USER/Movies hfs rw,auto


Like I said, I know nothing of NAS servers, so I don't know the filesystem it gets mounted with (in last example I used HFS because that's what my external drives are formatted into).

starscript
May 9, 2013, 12:33 AM
Create a symlink to the path on the external, that should work.

Bold :confused::confused:

Maximum allowed/working IP range is 255.

Good spot, I just picked numbers randomly

You seem to know your way around, but just in case I'll make it step by step (and try at your own risk blah blah ;)), but for regular folders on an external drive. I have zero experience with a NAS server, so this might work or be totally worthless (i.e you already tried and didn't work, because of the differences in accessing the drive).

Get the UUID:

diskutil info /Volumes/LABEL/ | grep UUID


Add the appropriate line to /etc/fstab (using either pico, nano, or vifs; the latter being the "recommended" one by the OS)

UUID=UUID /Users/USER/Movies hfs rw,auto


Like I said, I know nothing of NAS servers, so I don't know the filesystem it gets mounted with (in last example I used HFS because that's what my external drives are formatted into).


Ahhh that looks right to me. The server will be running AFP so to the mac it should look like a mac computer. I have used a test VM to see if the mac and server can talk and that seams fine.

I will change the fstab file on some random file, then crate a test user before changing my user files pointer.

I will post an up date if it works or not.

starscript
May 9, 2013, 01:09 AM
Add the appropriate line to /etc/fstab (using either pico, nano, or vifs; the latter being the "recommended" one by the OS)


UMMMM when I go to fstab I get this message ... I'm I navigating to the right place?
(Had to open in text editor nothing gets displayed in nano)

starscript
May 9, 2013, 01:11 AM
for got to attach the image

justperry
May 9, 2013, 01:50 AM
UMMMM when I go to fstab I get this message ... I'm I navigating to the right place?
(Had to open in text editor nothing gets displayed in nano)

for got to attach the image

Same here, default is empty, you just have to add text to it.

In terminal type "man fstab" without quotes to find out more.

satcomer
May 9, 2013, 04:57 AM
If you are planing this then consider some web sites to help you along with a NAS. First is the blog post Configuring OS X Mountain Lion Time Machine to Work With CIFS (SMB) Share (http://rajiv.sg/blog/2012/11/19/configuring-os-x-mountain-lion-time-machine-to-work-with-cifs-smb-share/) and to move your iTunes library using iTunes as explained in article How to move an iTunes library to an external drive (http://howto.cnet.com/8301-11310_39-10242259-285/how-to-move-an-itunes-library-to-an-external-drive/#!). Also you should already know how to move your iPhoto Library (Move the iPhoto Library to an External Hard Drive (http://osxdaily.com/2011/09/05/move-the-iphoto-library/).

Lastly you MOST Definitely should have a fast network using 1Gigabit switch like the D-Link 8-Port Gigabit 16 Gbps Desktop Switch (http://www.amazon.com/D-Link-8-Port-Gigabit-Desktop-DGS-1008G/dp/B003X7TRWO/ref=sr_1_2?ie=UTF8&qid=1368093243&sr=8-2&keywords=d-link+switch) using CAT 6 cable getting them cheaply from Monoprice.com (http://www.monoprice.com/products/subdepartment.asp?c_id=102&cp_id=10232).

ipsychedelic
May 9, 2013, 01:46 PM
for got to attach the image
Yes it doesn't matter. As a previous poster said its empty by default, and that message apparently is there since 10.6 or 10.5 so you can "rely" on it for the time being, for Apple hasn't make a move yet regarding how to handle such an scenario without fstab.

jasonvp
May 9, 2013, 02:32 PM
I'm wondering is it possible to change the mount point of for say the user movie folder from /user/movies to 376.823.0.7/user/movies

Let's assume your NAS is mounted on the Mac on /Volumes/NAS. If your username is starscript, and you want to move /Users/starscript/Movies to the NAS, then do so and use a sym link as was already suggested.


mkdir /Volumes/NAS/starscript
mv ~/Movies /Volumes/NAS/starscript
ln -sf /Volumes/NAS/starscript/Movies ~/

If you want the system to set your entire home directory to the NAS, you can do one of two things:

1. You'll need to sudo to root for this.

cd /
mv /Users /Volumes/NAS
ln -sf /Volumes/NAS/Users /


This will put all user directories, by default, on the NAS.

2. Use the System Prefs to move your specific home directory reference. In "Users & Groups", right-click on your name and go into "Advanced Options". From there, change your home directory to the NAS.

starscript
May 17, 2013, 02:12 AM
Let's assume your NAS is mounted on the Mac on /Volumes/NAS. If your username is starscript, and you want to move /Users/starscript/Movies to the NAS, then do so and use a sym link as was already suggested.


mkdir /Volumes/NAS/starscript
mv ~/Movies /Volumes/NAS/starscript
ln -sf /Volumes/NAS/starscript/Movies ~/

If you want the system to set your entire home directory to the NAS, you can do one of two things:

1. You'll need to sudo to root for this.

cd /
mv /Users /Volumes/NAS
ln -sf /Volumes/NAS/Users /


This will put all user directories, by default, on the NAS.

2. Use the System Prefs to move your specific home directory reference. In "Users & Groups", right-click on your name and go into "Advanced Options". From there, change your home directory to the NAS.

ahhh thats something I have missed.

I found the other day an advance user option that allow you to change the location of the home folder. You can get to it by right clicking on a user account in account administration.

I'm waiting on a Intel nick being delivered hopefully get it some point to day.
After I have set every thing up and don some testing I will post a tutorial including system settings etc in case any one wants to do the same.