# Mounting directories on second disk



## Phishfry (May 12, 2019)

I have a machine that will not boot up off of NVMe so I used a small SATA device to jumpstart the box.
When I installed FreeBSD on it I put /usr on the NVMe.
My plans were to build NanoBSD on this box and I wanted to take advantage of the speedy disk.
So it seemed logical to put all of /usr on it.
In fact all I really needed on it were /usr/src, usr/ports and usr/obj for NanoBSD.
With all of /usr mount on it I found problems when I disconnected the device, because so much more is in /usr

So what should have been my strategy here?
3 separate partitions on the NVMe drive and each one mounted at their respective /usr/ locations?
(With FAILOK set in fstab)

I am retasking the box and trying to take lessons from it.
I realize the traditional UNIX way was separate partitions for many of these directories. So I am lacking in the fundamentals.
Separate partitions for sub-directories is foreign to me.


----------



## tingo (May 13, 2019)

Usually, I just mount a large hard drive somewhere, like for examples /zs. Then I create directories and stuff in there and just symlink those to the correct places in /usr, /home and so on.
So for example /zs/distfiles might be linked to /usr/ports/distfiles.


----------



## D-FENS (May 13, 2019)

Alternatively one could use also ZFS mountpoints if using ZFS or nullfs mounts.


----------

