[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: one last question on partitioning ;-)



On 23-Mar-2001 Anurag Jalan opined:
> Hi all,
> 
> With inputs from Kevin, Stefan on this list plus an excellent paper
> from IBM's Linux library... i think i am finally confident enough 
> to move my /home partition to the new drive during the weekend .
> 
> I just want to confirm one thing and thats this : once i unmount 
> /home from /dev/sda4 and mount it on say, /dev/sdb1 .... would the 
> space released from /dev/sda4 ( after deletion of the files ) be 
> added to the / partion ( /dev/sda3 ) ? FYI /dev/sda3 is /boot 
> and /dev/sda2 is the SWAP . I could use the additional space on
> the / partition .

The old partition becomes empty space. It won't be mounted as anything
until you tell the system to do it. It also can't be added to / but, it
can become another directory/partition if desired, say /var (not a good
idea if small), /opt (not much gets stored there these days that I know
of), /usr/local/bin (wouldn't have to be too awful large) or some other
name of your shoosing. I have /store1 and /store2 for various things,
like downloded files I'd need for future reinstall or tweaking.

Any of the normal directories (/var, /usr, /usr/local, and so forth)
would require you to move other files onto the free space, just as with
/home. Plus, some directories really need to stay on / or disaster can
happen quickly (/sbin, /lib, /etc, /proc, /bin, /tmp).

So, say /usr is on / and all of its subdirectories are under it. You
could gain some space by moving /usr/local if it would fit, or
/usr/local/bin or whatever. You _CAN_ mount things that way. This would
result in / getting more free space even though you didn't add the space
directly to /.

If you're careful, you can also use symlinks. I've successfully used them
in various ways. For example, say you have room for both /opt and
/usr/local/sbin on the partition, but not for all of /usr/local. The best
angle IMHO would be to mount the partition as /usr/local/sbin then remount
the partition so that the /usr/local/sbin directory is mounted. Then
create a /usr/local/sbin/opt directory and move the files from inside /opt
into it, then delete /opt. Or, even better, just move /opt to
/usr/local/sbin and that will create and delete the directory in one step.
Then create a symlink as:

        ln -s /usr/local/sbin/opt /

That way everything that needs /opt can find it, but it's really taking
up space on /usr/local/sbin.

The same warnings as before apply - don't try this on these directories
unless you want to spend a lot of time fixing things: /etc /lib /sbin
/bin /var /tmp /proc. That applies to any directories under them (just to
be safe; some can be but, that's for future testing).

-- 
Intel: where Quality is job number 0.9998782345!





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]