Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Change a disk's mount point System 10.4
Tiger only hintIf you're interested in changing a disk's mounting point in 10.4, here's how to do it. One might use this to move the /Users directory to some other drive, for example.

[robg adds: A little pre-hint warning; I haven't tested this one, and mucking about with a drive's mount point isn't something to be done lightly. If you're going to use this hint, please make sure you have a good backup, and know what you're doing. You'll also need to have root powers for most of the following steps...]
  1. Using Disk Utility, read the drive's Universal Unique Identifier (UUID). Click on the volume you wish to move, then click the Info button and find the Universal Unique Identifier line. You can select the text here and copy it to the clipboard, too. For this example, we'll assume the volume's UUID was 12345.

  2. Create new directory where you want to mount your drive. For example, sudo mkdir /foo.

  3. Edit your /etc/fstab file, and add a line with the UUID and mounting point information (don't forget to add appropriate r/w and file system information):
    UUID=12345 /foo hfs rw 1 2
  4. Load the updated /etc/fstab file into NetInfo:
    niload -d fstab / < /etc/fstab
  5. Mount drive using Disk Utility. The drive should be mounted in your new directory -- /foo in this example.
  • Currently 1.40 / 5
  You rated: 1 / 5 (5 votes cast)

10.4: Change a disk's mount point | 14 comments | Create New Account
Click here to return to the '10.4: Change a disk's mount point' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Change a disk's mount point
Authored by: emale on Aug 11, '05 12:19:28PM

Interesting hint, but does anyone also know a way to mount network volumes to a special directory?

[ Reply to This | # ]
10.4: Change a disk's mount point
Authored by: ocdinsomniac on Aug 11, '05 12:47:35PM

I might be able to help with this, but I'd need more info: What sort of network mounts? NFS? AFP? What exactly do you want to do?

I use automount to mount an NFS volume at startup. To get the network mount to show up somewhere other than the default mount point (/private/var/automount/server_name), I use an automount map. I also use a symlink for other/additional mount points. I do not know how to do this with AFP mounts (i.e. mounts created via "Connect to Server"). There are also methods using NetInfo Manager, but I've found them less reliable.

If you're interested in learning more about what we're doing, let me know and I'll post detailed info on my blog:

[ Reply to This | # ]
10.4: Change a disk's mount point
Authored by: AndySpry on Aug 11, '05 01:13:00PM

I would be extremely interested.

I am using NFS to mount the home directories for my family on all our Macs. I currently have one server and three other systems. I have been using NFSManager to create the shares and activate connections. This stores the information in NetInfo. However, it requires manual reconnection after reboot before anyone can log into one of the network accounts. Since I have added a 10.4 iMac G5 to the mix, things have gotten even worse. If the G5 goes to sleep when being used by one of the network accounts, the network account and system are totally hung when waking requiring a power cycle of the system.

I would like a more reliable setup for this since I don't want to start synchronizing home directories on all 4 machines. My server is an older G3 iMac with two mirrored firewire drives. So information redundancy and synchronization overhead are not needed.

[ Reply to This | # ]
10.4: Change a disk's mount point
Authored by: ocdinsomniac on Aug 11, '05 04:47:02PM

Ugh! That sounds rough.

So I've posted a rather lengthy and detailed article about the method we use in the lab to, among other things, automount NFS exports on our client systems. I'm still proofing it, and there may be a lot you don't need, but hopefully there's something you can use. If you have any questions, feel free to use the comments and I'll answer as soon as I can.

Good luck!

[ Reply to This | # ]
networked home directories
Authored by: sjk on Aug 13, '05 06:43:48PM

Just curious why you're using NFS instead of AFP on an all-Mac network. There are still apps that use resource forks (e.g. in preferences files), which you lose with NFS.

[ Reply to This | # ]
10.4: Change a disk's mount point
Authored by: ocdinsomniac on Aug 11, '05 12:36:19PM

This is an interesting hint. But in my clean installs of Tiger, I have no fstab file. I do have /etc/fstab.hd, which only contains the following text:

This file does nothing, contains no useful data, and might go away in
future releases. Do not depend on this file or its contents."

Anyone know what's happened to fstab in Tiger?

[ Reply to This | # ]
10.4: Change a disk's mount point
Authored by: escowles on Aug 11, '05 03:49:48PM

fstab has always been used only in single-user mode -- that's why you need to load the info into NetInfo for it to have any effect.


[ Reply to This | # ]
10.4: Change a disk's mount point
Authored by: ocdinsomniac on Aug 11, '05 04:49:35PM

Ah! Thanks! I missed that NetInfo part.

I never knew how to get tht UUID number for a drive. And now I do. Cool.

[ Reply to This | # ]
10.4: Change a disk's mount point
Authored by: macshome on Aug 12, '05 09:13:07AM

It's just not installed by default anymore. fstab worked fine in Jaguar and Panther in multi-boot mode. I've used it several times when setting up failover clusters. The main thing to remember is that you had to use the disk name as defined for the partition, not the traditional disk number as you would on other *NIX. Mac OS X has dynamic disk mounting and the disk number might change from boot to boot.

AFAIK it works fine in Tiger as well, but I've not tested it yet.

Breaking my server to save yours.

[ Reply to This | # ]
Authored by: sjk on Aug 13, '05 07:12:32PM

That's incorrect, Esme. I've used an entry like:

UUID=383FD42C-EA30-48A4-B260-BE51F9A206FC /Users hfs rw

... in /etc/fstab on 10.3 & 10.4 to mount the users volume on /Users without loading data into NetInfo.

Works flawlessly, except for an ignorable "no such file or directory" warning from the mount command run from /etc/rc when booting.

I disagree with gidds' post that claims the symlink method of users volume relocation is "much safer and easier". Well, at least the "safer" part because (IMO) there's less risk of some obscure error with a directly mounted volume than referencing it through a symlink. Pretty sure I've read of trouble (maybe a bogus installer?) caused by such a symlink although that was a few years ago and may be irrelevant nowadays. Whichever method works to your satisfaction is what's best for you. :-)

[ Reply to This | # ]
10.4: Change a disk's mount point
Authored by: gidds on Aug 11, '05 02:19:28PM
A much safer and easier way to achieve approximately the same effect is just to create a symbolic link. In the Terminal, type:
ln -s /Volumes/mydrive mypath/mynewdir
and Bob's your uncle!

Alternatively, if you just want to move your home directory, simply set a new home directory in NetInfo. (That lets you put different home directories on different drives, too.)


[ Reply to This | # ]

10.4: Change a disk's mount point
Authored by: Gigacorpse on Aug 12, '05 11:29:43AM

That's what I do and it is the easiest way to go for moving the home directory.

[ Reply to This | # ]
10.4: Change a disk's mount point
Authored by: jaysoffian on Aug 16, '05 04:00:03PM
Under 10.4 I use this succesfully in /etc/fstab:

LABEL=Users     /Users  hfs     rw
It worked fine under 10.3 as well. You don't need to load the data into niload since the volume is mounted at boot before netinfo is running, hence /etc/fstab is used. You also don't need to use the UUID.

[ Reply to This | # ]
LABEL in /etc/fstab
Authored by: sjk on Aug 16, '05 06:15:29PM

Cool... thanks for the tip! For some reason I wasn't able to get that working in 10.3 but I'll give it another try on 10.4 because of your success.

[ Reply to This | # ]