plug New Partition

Leon Brooks leonb at ami.com.au
Fri May 29 09:42:47 WST 1998


Doug Clulow wrote:
> I have created a new partition in an attempt to transfer some of my HD
> space from Windows to Linux ;-).  My question is how can I incorporate
> the space into my current directory system.  What seems like the way to
> go is to put an entry into fstab like:

> /dev/hdb3      /usr   ext2    defaults  1  1

Well, if you don't mind *replacing* your /usr directory with an empty
partition, go right ahead... (-:

> /dev/hdb3 is the new partition, which is currently mounted under /new. I
> can't seem to find out if mounting under /usr will do anything nasty to
> my current /usr directory, and if so what  do I do to add it to my
> /usr/local space, which is full.

*** THIS WON'T WORK IF ANYTHING IS RUNNING FROM OR USING A LIBRARY IN
THE /usr/local/ STRUCTURE *** so stop anything that is, first

mkdir /victim
mount /dev/hdb3 /victim
echo >/victim/This_is_the_new_partition Yes it is
cp -a /usr/local/* /victim	# -av if you want to watch
umount /victim
mount /dev/hdb3 /usr/local

You should now have a new file called
/usr/local/This_is_the_new_partition containing "Yes it is" - now test a
few things that use /usr/local/whatever...

If it all works OK (and the mount will go away when the machine reboots
if anything really horrid is wrong), add this line to your fstab:

/dev/hdb3      /usr/local   ext2    defaults  1  1

...then do this (it's dangerous, so don't do it if you're unsure about
what's happening here)...

unmount /usr/local
rm -r /usr/local/*
mount /dev/hdb3 /usr/local

...you might also like to...

ldconfig

...just in case... (-:

Disclaimer: this is opinion only, I'm not in a position to actually test
it!

---
On a clear disk, you can seek forever.


More information about the plug mailing list