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


Click here to return to the 'Another way' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another way
Authored by: Anonymous on Mar 26, '01 07:06:00AM

I used to do sys admin on Solaris systems and although its a few years since I last did any, I recalled we used to edit a file called fstab and use a mount command to do this. I was kind of suspicious when I saw the suggestion of using a symlink so I went and had a look see if a more UNIX like way would work.

Opened a terminal session and did a man on the mount command and fstab too. Both have man pages available (courtesy of the BSD stuff I guess).

Dug a little deeper and found three copies of an fstab file in /etc. Each with a different suffix. Typing the mount command on its own lists the current mounts and the df command also shows similar information.

Its similar enough to the various UNIX systems I've worked on before that I feel we ought to be able to do anything we like but its also ever so slightly different, enough that I wouldn't yet just type the mount commands and modify fstab files the way I used to.

I guess the bottom line is that for now the symlink approach is benign and fairly safe but that we ought to explore a more systematic way of doing this with mounts, fstab or even automounter. That might provide us a few tricks for deploying into corporate environments with NFS and such like. Its probably going to be similar solution to a traditional UNIX way of doing things but I'll bet there are some interesting wrinkles. Gott dig out all the old O'Reilly and Sun manuals now and go look see.

This probably applies to a whole load of other areas and I do think we could have a fascinating time getting to know this new OS.

Wow! MacOS, NeXTStep and UNIX in one box. I think I must have died and gone to Heaven ;-)



[ Reply to This | # ]
Another way
Authored by: robh on Mar 26, '01 07:29:54AM

OSX may have various standard unix files floating around but some of them should not be touched since they are created/managed from NetInfoManager.

By renaming the drive (or partition) as /Users you're effectively mounting it as that name. If you use the 'df' command you can see where the drive/partition is mounted.

OSX has a nice automounter that means you can just plug-n-play with things like SCSI Jaz removable drives. There's no need to mess with fstab and mount points, you just let OSX mount it and then you can name it whatever you want. I like that. Mounting new drives under FreeBSD took a bit of insider knowledge.



[ Reply to This | # ]
Another way - But this is wrong info!
Authored by: Anonymous on Apr 01, '01 05:35:06PM

If I call a partition ABCD then in df you can see it's mounted as /Volumes/ABCD

In the Finder, you can see a disk called ABCD, but this is not the same thing.


Which means that calling a partition /Users does NOT mount it at /Users,
which is what we want.

When I installed, I set up 4 partitions. MacOS X, MAcOS9, Users, and Recovery.

They have appeared at /dev/disk0s9 -- s12. MacOS X, where I installed MacOS X,
is mounted as /. The others are mounted as /Volumes/ABCD

The MAcOSX installer creates /etc, /var. /tmp, /usr on lower slices automatically it would
appear.


But I cannot get Mount to mount /dev/disk0s11 as /Users whatever i do.

Does anyone have any ideas?

Thanks

Nick Rich




[ Reply to This | # ]
Another way - But this is wrong info!
Authored by: Anonymous on Apr 02, '01 12:45:41PM
Taking a look myself at the fstab files in the /etc/ directory we see the following:

/dev/hd0a / ufs rw 1 1
/dev/hd0e /var ufs rw 1 2
/dev/hd0f /usr ufs rw 1 2
/dev/hd0d /tmp mfs rw,-s=12000,-b=8192,-f=1024,-T=sd660 0 0

[localhost:/etc] haplo% cat fstab.rd |more
/dev/rd0a / ufs rw 1 1
/dev/rd0e /usr ufs rw 1 2
/dev/rd0f /var ufs rw 1 2
/dev/rd0d /tmp mfs rw,-s=12000,-b=8192,-f=1024,-T=rd335 0 0

[localhost:/etc] haplo% cat fstab.sd |more
/dev/sd0a / ufs rw 1 1
/dev/sd0e /var ufs rw 1 2
/dev/sd0f /usr ufs rw 1 2
/dev/sd0d /tmp mfs rw,-s=12000,-b=8192,-f=1024,-T=sd660 0 0

that fact that I have done similar with different unix flavors would seemingly indicate that mounting a seperate disk/partition as /users would not be any problem.

It should be able to be accomplished by editing the 3 fstab files with a line similar to

/dev/sd0x /users ufs rw 1 1

where x is the partition and 0 is the drive number.

Note, I have not tried this yet myself because I do not have an extra partition or drive to work with currently. You should be able to get the drive/partition information from dmesg from the command line after you boot the machine.

Haplo

[ Reply to This | # ]
Another way - But this is wrong info!
Authored by: robh on Apr 03, '01 06:37:12PM

Doh. Apple added this /Volumes thing after the public beta.

After some experimentation I managed to mount a removeable scsi Jaz drive at /Jaz despite OSX wanting it automount it at /Volumes/Jaz.

First, with the disk automounted I got the drive details (/dev/disk1s4) using df. Next I unmounted the disk using umount /Volumes/Jaz I then fed a fstab line into NetInfoManager like this (as root):

echo "/dev/disk1s4 /Jaz hfs rw 1 1" | niload -m fstab .
(note the '.' at the end of that line)

Running NetInfoManager I can see the new mount entry under the "mounts" section.

I created an empty dir called /Jaz with "mkdir /Jaz" and then mounted the disk there with "mount /Jaz".

I hope that gives you some useful pointers, though using a symlink might be a lot less hassle.



[ Reply to This | # ]