Dave ... is /usr part of your root at this time?
(You mentioned "shrinking the original".)   If so,
then it is more complicated.   Easiest way to do this
is if Linux was installed with /usr on its own disk.

The toughest part of the whole deal
is that packages are scattered.   Most applications do not
behave well,  playing in their own sand box.   Some are better.
For the most part,  the content of /usr and /opt is static,
making those directories excellent candidates for sharing.

This is still more art than science.
But to get /usr into its own filesystem:

        # allocated a new disk, dasdfmt, mke2fs
        # mount that at /mnt
        sh -c ' cd /usr ; exec tar cSf - ' \
                | sh -c ' cd /mnt ; exec tar xpSf - '
        umount /mnt
        mv /usr /usr-old
        mkdir -m 555 /usr
        # mount new disk at /usr and make that permanent
        # later 'rm -r /usr-old' once you're satisfied

I used "cSf" and "xpSf" on the tar commands.
You may need additional options.   The S is for sparse files,
of which I find few if any.   GNU TAR handles device files well,
but does not handle named sockets,  so you may get an error if you
encounter one in the source directory.   Usually ignore such errors.

Shrinking the root,  now with much more space,
is more than we want to talk about now.

-- R;

Reply via email to