begin Darrell Burkey quotation:
> 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 second Andrew's remarks.

Go to /var and do "du -Hs" to find out how many bytes are stored, there.
Then, do "df -h" to find out how much free space there is on /home (and
elsewhere).

If there's enough free space on /home to add a copy of /var's files
alongside its existing contents, then you can probably shuffle files
around without having to repartition.  (Don't forget to also verify that
the total size of your current /var is big enough to comfortably hold
the existing contents of /home.)

Assuming there's sufficient "wiggle room", do this:

Go to single-user mode.
Do "cd / ; cp -axr /var /home".
Spot-check the new directory inside /home, to make sure everything seems 
to be there.
Do "rm -rf /var".
Do "mkdir var".
Do "cd / ; cp -axr /home/* /home/.??* /var"
Spot-check the new home directories and whatever stuff within /var.
Do cd / ; umount /home /var".
Edit /etc/fstab, to exchange mounting points for the two directories.
Do "mount -a" to remount according to the revised /etc/fstab.

Warning:  It's morning here, and  I am absolutely not a morning person.
There may well be bonehead errors in the above on account of
insufficient caffeine.  But it will at least illustrate the concept.


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

Reply via email to