I create my own documentclasses and packages in some directory of tex\latex. The directory tex\latex itself might be in any other directory in any drive. I can register the packages/classes to Miktex as already posted in my answer here. Putting the documentclass or packages in a dedicated directory in a separate drive is practically useful to avoid data loss when the system crashes.
But how to do this for TeX Live?
Based on Ulrike's answer I do the following steps and it works.
Step 1
Open C:\texlive\2010\texmf\web2c\texmf.cnf to see how TEXMFLOCAL is defined.
% .... other settings before this line have been removed for simplicity.
%
% A place for local additions to a "standard" texmf tree.
% This tree is not used for local configuration maintained by
% texconfig, it uses TEXMFCONFIG below.
TEXMFLOCAL = $SELFAUTOPARENT/../texmf-local
%
% .... other settings after this line have been removed for simplicity.
Step 2
Open C:\texlive\2010\texmf.cnf and modify it as follows.
% (Public domain.)
% This texmf.cnf file should contain only your personal changes from the
% original texmf.cnf (for example, as chosen in the installer).
%
% That is, if you need to make changes to texmf.cnf, put your custom
% settings in this file, which is .../texlive/YYYY/texmf.cnf, rather than
% the distributed file (which is .../texlive/YYYY/texmf/web2c/texmf.cnf).
% And include *only* your changed values, not a copy of the whole thing!
%
OSFONTDIR = $SystemRoot/fonts//
%============== Below this row is my modification ====================
%
% My custom packages and classes are
% in E:/A/My LaTeX/MyLibrary/tex/latex/misc.
%
TEXMFLOCAL = $SELFAUTOPARENT/../texmf-local,E:/A/My LaTeX/MyLibrary
%
%
% It is wrong if you do like below
% TEXMFLOCAL = $SELFAUTOPARENT/../texmf-local,E:/A/My LaTeX/MyLibrary/tex/latex/misc
% or
%TEXMFLOCAL = $SELFAUTOPARENT/../texmf-local,E:/A/My LaTeX/MyLibrary% comments
Packages and classes must be in some subdirectory of tex\latex. In my example above, they are in E:/A/My LaTeX/MyLibrary/tex/latex/misc directory. I am not sure spaces in the path still work in OS other than Windows.
Step 3
Invoke texhash as follows.

Step 4
Done. Congratulation.
Old comments below this question should be removed because they might be no longer relevant to this final edit.
kpsewhich --var-value TEXMFLOCALand see what's the answer. – egreg Jun 07 '11 at 11:05;at the end. This ensures that a possible system-wide setting ofTEXMFLOCALis evaluated too. – AlexG Jun 07 '11 at 11:07texmf.cnfyou modified is actually used: Run the commandkpsewhich texmf.cnf. It should returnC:/texlive/2010/texmf.cnf– AlexG Jun 07 '11 at 11:44kpsewhich texmf.cnfsay? – AlexG Jun 07 '11 at 11:49texhashandkpsewhichread the correct configuration file, that is the one you modified, otherwise your modifications were made in vain. – AlexG Jun 07 '11 at 11:56TEXMFLOCALshould at least be shown bykpsewhich --var-value TEXMFLOCAL. I am running out of ideas :( – AlexG Jun 07 '11 at 13:22kpsewhich --var-value TEXMFLOCALoutput.texhashregisters files added to existing directories. – AlexG Jun 07 '11 at 14:31texmf.cnfdoesn't seem to be read) I suggest setting the environmental variableTEXINPUTSbyset TEXINPUTS=.//;E:/A/MyLaTeX/MyLibrary//;in a*.batfile which also does the TeXing of your document. – AlexG Jun 07 '11 at 14:35TEXMFLOCAL = I:/TeX-Roots/microtype,I:/TeX-Roots/UFlocaltexmf,...(commas between the roots, no slashes at the end). The variable TEXMFLOCAL is then used later on in the texmf.cnf like this:TEXMF = {!!$TEXMFMAIN,!!$TEXMFLOCAL, ...}. kpathsea reads all texmf.cnf. Settings in earlier ones wins. Check the list of pathes withkpsewhich -show-path=cnf. If you have a miktex installed: Check that you are not using itstexhash(trytexhash --version). – Ulrike Fischer Jun 08 '11 at 08:21...means etc (more texmf trees and/or variables). Additional information: I don't have a comma at the end of such a setting. There is somewhere a kpathsea.pdf which contains details about the syntax etc. – Ulrike Fischer Jun 08 '11 at 08:58texmf.cnfhanging around. – egreg Jun 08 '11 at 09:06kpsewhich --var-value TEXMF? The creation of thels-Rfiles depends on another variable (TEXMFDBS); I fear that many important parts are missing from yourTEXMF. – egreg Jun 08 '11 at 09:25TEXMFto that value in the "almost empty" one. Can you write down an answer showing exactly the contents of your "almost empty" file? – egreg Jun 08 '11 at 09:44,E:/A/My LaTeX/MyLibrarytoTEXMFLOCAL = $SELFAUTOPARENT/../texmf-localin the global texmf.cnf is the easiest way. But don't forget to executetexhashas well. – Friendly Ghost Jul 05 '11 at 18:26TEXMFLOCAL = ...inc:/texlive/2013/texmf.cnfand made the following observations: 1.) it doesn't seem to matter if you use a comma or a semicolon to separate the directories, 2.) the line must end with a line break/newline (didn't test if LF or CR or both are necessary), otherwise the value is not used. – Alex Oct 04 '13 at 14:58