[Gllug] Moving partitons

rich at annexia.org rich at annexia.org
Wed Nov 20 11:04:11 UTC 2002


On Tue, Nov 19, 2002 at 01:31:23PM +0000, Jim Bailey wrote:
> Hi all,
> 
> Could some one advise me as to the best way to move /home to a new
> partiton.

Here's a method that I've used successfully in the past. (Typed from
memory however, so YMMV).

Boot into single user mode (type 'linux single' at the LILO prompt).

Mount up the new home partition, eg. under /tmp/newhome.

cd /home && tar cflp - . | (cd /tmp/newhome && tar xfp -)

The extra 'l' flag tells tar not to stray outside one partition, and
the 'p' flag tells it to keep permissions as similar as possible.

If you want to verify the copy:

cd /home && ls -lR | md5sum
cd /tmp/newhome && ls -lR | md5sum

(Check the md5sums are the same).

cd /home && find -type f | xargs md5sum > /tmp/md5sum.old
cd /tmp/newhome && find -type f | xargs md5sum > /tmp/md5sum.new

diff -u /tmp/md5sum.old /tmp/md5sum.new

(There should be no differences).

Rich.

-- 
Richard Jones, Red Hat Inc. (London, UK) http://www.redhat.com/software/ccm
http://www.annexia.org/ Freshmeat projects: http://freshmeat.net/users/rwmj

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list