On Tue, Sep 18, 2001 at 07:30:07PM +1100, Darrell Burkey wrote:
> I have a system that I partitioned poorly and now find that I have /home on
> a rather large partition and /var on a rather small partition. If I could
> easily swap these two mount points life would be good. I've been reading up
> on it but I'd hate to do this without asking here first as the following
> just seems to easy.
> 
> Is it just a matter of unmounting the filesystems and changing the mount
> points in fstab? Will this end up with all the files in the proper place but
> on swapped partitions?

Unfortunately not.

What you've got is:

  /home mountpoint using partition X
  /var mountpoint using partition Y

Now, in partition X, you'll have directories like "dazza", "www",
"fred", etc -- that is, every single file and directory in /home is in
that partition.  The partition has no inherent knowledge of the fact it
is being used as a /home.

And over in partition Y, you'll have directories like "log", "run",
"spool", and so on -- all the stuff you see under your /var directory.

If you change the /home mountpoint to use partition Y (e.g. by editing
/etc/fstab), what you'll now see if you look in /home will be:
/home/log, /home/run, /home/spool... which is not what you want, of
course.

I think you'll need to do some shuffling with a temporary partition of
some sort, but I'm not really sure of the best way to do that --
hopefully someone else can offer some good suggestions on how to do
that.  Basically, you need to copy everything from the small partition
to the big one, and vice versa.

I hope I've made it clear how it works.  Feel free to post again if I've
confused you.

Regards,

-Andrew.

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to