[techtalk] Mounted drive

Andre Pang andrep-ml at vjolnir.org
Sun Jan 30 04:56:46 EST 2000


On Sat, Jan 29, 2000 at 11:17:51AM -0200, Gustavo Sudre wrote:

> Hi guys!
>  Well, when i executed #df -m, i was surprised with the little space that
> left after my installations. So, i created hda5, linux native, with 1gb (my
> main linux partitions are hdb1 and hdb2 -> swap). But i've a doubt: how can
> i enjoy all this new space? I know i've to moutn it using mtab, fstab... but
> where should i mount it to? My first idea was /usr. But will my files be
> overwrritten, i mean, those files that are there now? And if i mount it to /
> ? Does this mean that every directory, such as /usr, /home ..., will be
> enjoying that space?

    the easiest way to add the space is probably to mount it to /usr.

    but yes, the problem is that when you mount hda5 to /usr, it will 'take
over' that directory, and /usr will be completely empty instead of having
the files which were there before.

    the fix for this is to create a temporary directory - call it /usr2 -
and mount /dev/hda5 /usr2.  then run a cp -av /usr /usr2, umount /usr2,
mount /dev/hda5 /usr, and you should see all the files copied across to your
new partition.

    after verifying that it works okay, umount /dev/hda5 from /usr, rm -rf
/usr/*, and mount /dev/hda5 /usr.  (so you can free up some space on your
root partition.)  you will have to make sure that you're not using _any_
files from /usr before you rm -rf the directory (be _very_ sure what you're
doing!) which may mean running Linux in single-user mode.  you can do this
by running 'init s' after booting, or typing 'linux single' at the LILO
prompt on startup.

    anyway, that's the short explanation for it.  email back if you're still
confused 8).


-- 
: Andre Pang <andrep at vjolnir.org> - Purruna Pty Ltd - ph# 0411.882299 :
:               #ozone - http://www.vjolnir.org/ozone/                :

************
techtalk at linuxchix.org   http://www.linuxchix.org




More information about the Techtalk mailing list