It just can't fit

I am playing around with openSuse on an older P4. I have a 6 gig hd as hda and a couple of other drives, and 80 gig and a 100 gig. Part of the 6 gig drive is used for swap. I would like to move the usr directory to another drive and link to it. But if I just move all the programs and then delete them from usr I don’t know if I will be able to set up the link. ln is in /bin so it won’t be out of sight but is this the correct way to do this???

Never did this, but…

At first I’d just copy the directory to the other drive and change the /usr location from / to the new device in Yast’s partitioner.

Take care to make a full copy, including dot (hidden) files. I’d also use the same filesystem (ext3, reiser, whatever) as the original. You may also rename the old /usr to something else, although I don’t think it is necessary.

If this doesn’t work you just have to revert the partition table (through Yast’s partitioner, of course) back to what it was.

After some testing, if it work you can safely delete the old /usr.

Well I did it so I will post here how so if anybody searches for something like this they can see how I did it.

I looked at were ln, rm and cp were. They all are in /bin not anywhere in usr. So I made another directory on one of the other drives. I called it new-usr. I then copied all files from /usr to /new-usr on the other drive. Then I did rm -R inside /usr. I then did rmdir to /usr. Now I just make a sym link named /usr that points to new-usr on the other drive. Everything seems to work fine.

Oh and just to be clear /usr never was in it’s own partition. So I didn’t have to mess with any partioning stuff at all.

I suppose I didn’t explain myself well. Most directories in the root tree can be explicitly mounted from any partition you like. If you don’t specify anything during installation, they are mounted in the same partition as /, the root directory. BUT, you can change this any time you like, it’s not set in concrete. And with Yast’s partitioner it’s absurdly simple, just select the partition and, in the “mount as” text box, type “/usr” without quotes.

Many people, for example, set /home in a separate partition, so in case of a system reinstallation their settings and personal files are preserved, as only the root (/) partition will be rewritten, and /home will still be seen as belonging to / by the filesystem, with the redirection (symlinking, if you will) being done transparently by the system.

This physical separation is also often done with /var, /temp (to avoid unnecessary journaling), even with /boot in older systems due to ancient HD cylinder size limitations.

What you did only creates an unnecessary step, with a (small) performance penalty. No need to go A -> B -> C if you can go A -> C, I think. OTOH, I understand an unwillingness to deal with partitions if you are not used to it, so… Whatever works for you.

Just my two cents.