Linked by Thom Holwerda on Mon 23rd Feb 2009 17:29 UTC
General Unix UNIX's method of handling file systems and volumes provides you with an opportunity to improve your systems' security and performance. This article addresses the issue of why you should split up your disk data into multiple volumes for optimized performance and security.
Thread beginning with comment 350347
To read all comments associated with this story, please click here.
Thoughts on /usr and /opt, etc..
by cjcox on Mon 23rd Feb 2009 23:35 UTC
cjcox
Member since:
2006-12-21

My understanding of the intent of /opt.

There's the distribution... mainly in the normal places.

However for large subsystem packages that you want to consider "self contained" bin, lib, etc, and so forth, those large packages would install themselves in /opt. Those large packages being packages provided through some kind of "officially" supported means.

/usr/local, if present is for the end user to house applications... which might include entire subsystems.

Obviously, when it comes to *ix, nothing is set in stone though.

The advantages of not lumping everything into /usr... or /usr/local (depending on OS), is that you might get more flexibility with regards to storage isolation and security.

With regards to performance, if you have multiple drives and depending on your RAID (or lack thereof) setup, you might want to consider something like:

/bin
/lib (different disk from /bin)
/usr (mainly bin)
/usr/lib (different disk from /usr/bin)
/opt/* (alternate disks potentially for large subsystems)

This has the potential of speeding up program loads.

Just something else to consider.

Reply Score: 1

darknexus Member since:
2008-07-15

/opt is one of those directories that really doesn't have a set use. Some systems, i.e. Slackware, install large packages such as KDE into /opt, others don't. Some, such as Crux Linux, use /opt the way others use /usr/local (/usr/local is nonexistent on Crux).
On Linux, I use /opt like /usr/local, but for software that is to have its own structure. Managed packages don't go there, /opt is for self-compiled software that for whatever reason would need to be kept under its own folder. For instance, Mysql goes into /opt/mysql if I compile it from source. Same with GNOME, if I wish to be on the bleeding edge, it goes under /opt/gnome if I've compiled it. I do not put other structures under /usr/local, that is reserved for self-compiled software that fits the standard folder structure.
For *BSD, I use /opt like /usr/local on Linux, as /usr/local is reserved for installed ports and packages, not for locally compiled software not under control of the ports tree.
Naturally there are no set rules involving these directories. That's just the way I do it. Ah, the wonderful world of the fhs, eh? Some parts of it are not standard at all.

Reply Parent Score: 2