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

Tony Godshall <[email protected]> Tue, 12 Aug 2003 13:45:54 -0700
Newsgroups gmane.linux.hardware.sony
Message-ID <20030812204554.GB2751@sanity>
> On Mon, 2003-08-11 at 11:17, Tony Godshall wrote:
> > 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.

According to Vance Lankhaar,
> Try using rsync --archive. It can recover from partial copies. After
> all, it was written with the idea of *syncing* in mind.

Ah, yes, but better to think ahead.

My point was that it's better to copy and make sure the new
copy is ok, rather than move and leave a directory tree in a 
possibly awkward half-moved state with a key partition now
totally full.  But you are right, rsync is a good way to
recover if you've done it, and I have.  Once burned...