Re: Migrating /home from too small /dev/hda partition

Tony Godshall <[email protected]> Mon, 11 Aug 2003 11:17:02 -0700
Newsgroups gmane.linux.hardware.sony
Message-ID <20030811181702.GA3303@sanity>
According to Ryan,
> On Mon, 2003-08-11 at 09:35, Dan Whitacre wrote:
> > Hello all,
> > 
> > A few days ago, I rambled about many things, one of
> > which was having too small a /home dir, living on its
> > own /dev/hda7 partion that in my lack of wisdom, I
> > made way too small (61M) on install.  Well, I managed
> > to move it, and at the risk of condecending, I'll go
> > through the process:
> 
> Thanks for taking the time to write it out, I'm sure it will assist
> someone in the future .. and yes, you can move any partition anywhere
> you want without reinstalling through similar means to what you
> described.  Some other more vital partitions have other considerations
> and are not quite as simple though.

amen to that!

> > I did 'mv /opt/home /home'
> 
> A somewhat better way to copy the filesystem with the
> permissions ...

yes!  I like to make sure the new copy is good before I
remove the old.  I've had moves fail halfway and be a pain
to get back together.

I usually do something fairly cautious like this myself:

  cp -a /home/. /newplace/home/. \
  && mv /home /home.old \
  && ln -s /newplace/home/. /home

Then I check that everything still works ok before deleting 
the old dir.

Note that I don't typically map my physical partitions to
the traditional top level dirs.  I usually have a small / 
and large /big, and /home /usr /var are symlinks to /big/home 
/big/usr /big/var, etc.

Alternatively you could use LVM etc to resize volumes.  But
LVM seems complicated to me.