[1631] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: Weird mount problem!

daemon@ATHENA.MIT.EDU (Mike Sangrey)
Tue Oct 29 11:58:34 1996

To: redhat-list@redhat.com
CC: Info junkie <junkie@glcom.com>
In-reply-to: Your message of "Tue, 29 Oct 1996 07:57:46 EST."
             <Pine.LNX.3.91.961029074242.9762A-100000@glink.glcom.com> 
Date: Tue, 29 Oct 1996 10:48:50 -0500
From: Mike Sangrey <mike@sojurn.lns.pa.us>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

[A lot of stuff deleted, but not forgotten]

I've restated the problem in the form of a question below.  You've mentioned, 
"Another FAQ question?"  Maybe you're right, so I'll deal with it that way and 
maybe the FAQ maintainer will consider it.

Info junkie <junkie@glcom.com> wrote:
> note that home1  has exactly the same problem as home when mounted
> onto hda3 which is on the same disk.
> My plan was to offload that 91% full partition (/dev/hda2) 
> by moving the /home to /dev/hda3

Note that the symlink idea wasn't what you wanted -- completely forget it.

Here ya go:

Q: My root filesystem is getting kinda full. I've install another disk and I want to move my /home or /usr directory onto this new disk.  How do I do it.

A:  Let's assume that new disk is called "/dev/hda3" and you've decided to move the /home directory to this new disk.  The steps are as follows:

First, make a temporary place to mount the new disk.
0) mkdir /home1

1) mount /dev/hda3 /home1

Now, copy all of the stuff in /home to /home1
2) ( cd /home ; tar -cf - . ) | ( cd /home1 ; tar -xvpf - )

I sometimes do a recursive diff of the directories for extreme safety.  This really isn't necessary, but sometimes I'm paranoid.  Also, if you have a really big file in /home somewhere, diff will die of memory exhaustion.
3) diff -r /home /home1

Number "3)" should report nothing at all.

Again, for extreme safety, do
4) mv /home /home2

That will keep "/home" around for just a little, until you're real happy.

5) mkdir /home

6) unmount /dev/hda3

7) mount /dev/hda3 /home

8) give /home the same permissions and ownership that /home had before.

9) emacs /etc/fstab  # or what ever editor you like

Make sure you have a line in there that does
/dev/hda3        /home               ext2   defaults 0 0

10) Reboot

11) Check things out. Make sure you log in as a normal user.

Now you're real happy.
12) rm -fr /home2
13) rmdir /home1

-- 
  Mike Sangrey	<mike@sojurn.lns.pa.us>	(Home)
		<Mike.Sangrey@specmarkmet.com>(Work)
	"I've trademarked `William Della Croce, Jr.(tm)'.
		  Anyone using this name owes me $1,000,000."



--
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-Errata
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post